Elements Seem to Load Willy-Nilly Depending on Location

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_2d5494250e025fc3ca7626b1ac6823ee

Many thanks,
AJ

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 : 317785 - chromium - An open-source project to help move the web forward. - Monorail

I literally just set a patch for review today to hopefully improve things: Issue 457413002: Defer late and async scripts - Code Review

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.

Ah, okay. Thanks.

AJ