I'm not using a packet sniffer. I use a simple web server that is asynchronous. I judge what the browser (FF 21.0a2) does based on the requests I see coming in and being logged and what I see in the Web Console.
Here's the server-side log output::
[I 130403 08:32:39 web:1462] 200 GET / (::1) 4.41ms [I 130403 08:32:39 web:1462] 200 GET /static/style.css (::1) 7.53ms [I 130403 08:32:49 web:1462] 200 GET /static/script.js (::1) 10001.42ms [I 130403 08:32:49 web:1462] 200 GET /static/photo.jpg (::1) 1.12ms
(notice that the /photo.jpg wasn't loaded till 08:32:49 which was *after* /script.js) was loaded)
The output on the Web Console is also interesting: http://cl.ly/O1Zl Again, notice the 10 second delay till the /photo.jpg is loaded.
Anything else I can do to help with debugging this?
Comment
Browsers will absolutely start downloading images while waiting on a script to load, last I checked.
But yes, any script not needed to actually render the page should go at the bottom.
Replies
Not sure actually. Try my slowpage code and you'll notice that photo.jpg is NOT downloaded till after script.js is finished.
Are you measuring that with a packet sniffer, or some other tool?
If that's actually happening, it sounds like unwanted fallout from https://bugzilla.mozilla.org/show_bug.cgi?id=792438 that should be fixed, so I'd be very interested in it.
I'm not using a packet sniffer. I use a simple web server that is asynchronous. I judge what the browser (FF 21.0a2) does based on the requests I see coming in and being logged and what I see in the Web Console.
Here's the server-side log output::
[I 130403 08:32:39 web:1462] 200 GET / (::1) 4.41ms
[I 130403 08:32:39 web:1462] 200 GET /static/style.css (::1) 7.53ms
[I 130403 08:32:49 web:1462] 200 GET /static/script.js (::1) 10001.42ms
[I 130403 08:32:49 web:1462] 200 GET /static/photo.jpg (::1) 1.12ms
(notice that the /photo.jpg wasn't loaded till 08:32:49 which was *after* /script.js) was loaded)
The output on the Web Console is also interesting: http://cl.ly/O1Zl
Again, notice the 10 second delay till the /photo.jpg is loaded.
Anything else I can do to help with debugging this?