is there a way to see which elements of a website are still loading so that window.onload can’t fire yet?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know of a global way of doing this – it could well be there is none.
The only thing in that vein that comes to mind is checking images for whether they have successfully loaded. I guess you could walk through each image and check for those properties.
However, you will be having a hard time to tell apart failed image load processes and those still under way. To make that distiction, you would have to work with the
onerrorevent for each image and set some sort of “failed” flag.What is going to be really, really hard is controlling slowly loading scripts: If a script loads slowly, there is no execution of JavaScript for that moment, so there is no way to detect any delays here except by using the
asnycordeferproperties… But I guess that would require fundamental changes to whatever JavaScript you are using.