WebPagetest Forums
onload before document complete, 8 sec. gap? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: onload before document complete, 8 sec. gap? (/showthread.php?tid=14648)

onload before document complete, 8 sec. gap? - yogesh - 12-13-2016 06:41 AM

Typically, I find document complete and onload to be similar, but I'm not sure why there's such a difference between them in this result. What is actually measured for document complete? The onload event in this case appears to occur shortly after 2s, the document complete occurs later after 11s.


Any ideas what could cause this behavior? Thanks for your help!

RE: onload before document complete, 8 sec. gap? - sertovs - 03-15-2017 06:12 PM

Looking at the Chrome DevTools Timeline (Performance), there are scripts in http://www.sears.com/ that insert iframes after the onload event: s_code-min.js, utag.js (Tealium tag manager), etc. WebPagetest has reported the onload event for the top site but Document Complete seems to wait for all of these iframes to finish loading.

The initial view doesn't seem to change visually after onload, except for the "Members earn 20% in points on Sears Marketplace purchases" banner. However, inserting iframes dynamically triggers the busy indicators in Chrome and Firefox - see https://www.stevesouders.com/blog/2013/06/16/browser-busy-indicators/.