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

341 views Asked by At

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

There are 1 answers

0
peabrainiac On

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