HTML, JS | Pause page loading until an Async function in head completes
Go to solution
Solved by Mira Yurizaki,
2 minutes ago, Aleksa Djordjic said:Tnx for the info, and that is how i do it on the main page, load some stuff (scripts) and hide/show elements based on the login, but i would like to do it without any redirecting, i want to literally pause the page loading until that action completes
You can't pause page loading by way of pausing the HTML file being downloaded and rendered, because web browsers need the entire HTML document before it knows what to do with the web page. You'd have to send a minimal HTML document and use JavaScript to add the content after the fact.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now