WebPagetest Forums
Elements Seem to Load Willy-Nilly Depending on Location - 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: Elements Seem to Load Willy-Nilly Depending on Location (/showthread.php?tid=13175)



Elements Seem to Load Willy-Nilly Depending on Location - ajm_76 - 08-20-2014 03:27 AM

Hello all,

I was wondering if someone could assist in interpreting some results. Depending upon the location selected for testing, the page's elements appear to be loading in an order in which they are not extant in the source. Of particular interest is the footer .js file, sometimes loaded at the top, sometimes loaded where it should be loaded.

http://www.webpagetest.org/video/compare.php?tests=140819_19_RHG,140819_PF_R9K,140819_X8_R2H,140819_X5_2d5494250e​025fc3ca7626b1ac6823ee

Many thanks,
AJ


RE: Elements Seem to Load Willy-Nilly Depending on Location - pmeenan - 08-26-2014 06:00 AM

You're seeing the results of the preload scanner. As it is currently (in Chrome) it treats all scripts as high priority, regardless of where it finds it in the document : https://code.google.com/p/chromium/issues/detail?id=317785

I literally just set a patch for review today to hopefully improve things: https://codereview.chromium.org/457413002/

All of the browsers (post-IE 7) have a fair bit of leeway on the order that they choose to download resources to try and get the page to be interactive and render as soon as possible so you will see things behave differently depending on what browser you test with (and even with the same browser depending on the timing and sequence of events).

There's ongoing work to let site owners provide hints about "important" and "less important" content (layzload, defer, async, etc) so it's a very active area right now.


RE: Elements Seem to Load Willy-Nilly Depending on Location - ajm_76 - 08-27-2014 12:24 AM

Ah, okay. Thanks.

AJ