how to check if page is loaded first time in javascript

Can non-Muslims ride the Haramain high-speed train in Saudi Arabia? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. Note:- Overriding the window.onload () function will disable any other function from attaching to it and window.onload () function sometimes respond after all the resources (images and so on) are loaded and not only the page. Is there a way to tell when your react app page is done loading the page / assets? The test is designed to help make your site faster by identifying what about a webpage is fast, slow, too big, and so on. 2 - Page loaded due to Back button @AlexanderWigmore: I have no idea why it's popular either, I guess it's just from the 11k views on the question. This returns a loading state while the document is loading. Better to externalize it completely. And of course you could do without jQuery and attach the listeners for DOMready and window.onload manually. Submit form. While using W3Schools, you agree to have read and accepted our, , ,