Document Complete (onLoad event) waits until all images of my site are loaded

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Document Complete (onLoad event) waits until all images of my site are loaded



My wordpress website is using SiteOrigin page layout builder and does a “heavy” usage of SiteOrigin Slider.



I’m doing some performance test with Webpagetest and Google Site Speed and I’m getting awful results on Document Load times.



It seems that the Javascript event onLoad, which triggers the Document Complete is waiting all the images of the slider to load, and thus, giving google’s and the user, the perception that the website is not loaded. The load spinner of the browser keeps spinning until this event is triggered.



Is there any way to avoid the event to “wait” until all the images are loaded?



My website: https://rourevell.com/
WebPageTest url: https://www.webpagetest.org/result/180810_4V_107ce8d0f3c6cdb3889ad1ce039ae25c/
Google Page Speed Insights url: https://developers.google.com/speed/pagespeed/insights/?utm_source=analytics&url=https%3A%2F%2Frourevell.com&tab=mobile



PS: I know I have to reduce the size of the images, because they are pretty big and don’t have the correct size, but IMHO this is another topic and does not discard the current posts’s topic.



Thank you very much for your support guys!




1 Answer
1



The DomContentLoaded Event might be what you're looking for. It triggers once the dom is ready, without waiting for images, iframes and stylesheets.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered