Current time: 12-07-2019, 07:40 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JS files are coming top in waterfall instead of coming at the end
06-07-2013, 08:39 AM
Post: #1
JS files are coming top in waterfall instead of coming at the end
If you see the waterfall, it showing the JS files are loading at line 14 and 15. But if you open and see the view source of the page, javascript files are included at the end in page source.

Is there a bug in webpage test ?

http://www.webpagetest.org/result/130606...1/details/

JS : http://ir.ebaystatic.com/z/qb/yvhv3fhwwu...suvbuhy.js

if you see in chrome network panel you can see that JS files are coming as expected the end.
Find all posts by this user
Quote this message in a reply
06-08-2013, 05:17 AM
Post: #2
RE: JS files are coming top in waterfall instead of coming at the end
It's a feature of the way the Chrome prioritises the download of resources, Firefox does something similar but it's more subtle.

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
06-08-2013, 07:27 AM (This post was last modified: 06-08-2013 07:28 AM by kbprakash@gmail.com.)
Post: #3
RE: JS files are coming top in waterfall instead of coming at the end
if its happening because of the chrome optimization, why i am not seeing it in my local latest chrome browser?
Find all posts by this user
Quote this message in a reply
06-08-2013, 04:31 PM
Post: #4
RE: JS files are coming top in waterfall instead of coming at the end
You should be able to see it in the local browser too, I can...

If you test channel4.com, the difference in waterfalls is reasonably noticable when highlighted - https://twitter.com/andydavies/status/34...28/photo/1

Channel4.com, Chrome - http://www.webpagetest.org/result/130608...1/details/

Channel4.com, IE9 - http://www.webpagetest.org/result/130608...1/details/

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
06-12-2013, 12:58 AM
Post: #5
RE: JS files are coming top in waterfall instead of coming at the end
Interesting! To avoid the blocking we move scripts to the bottom of the page. now chrome is making high priority and loading them on top. Wondering if there is any documentation (from chrome or any blog posts) to understand when and why chrome does it and how doe it improves the performance.
Find all posts by this user
Quote this message in a reply
06-12-2013, 07:30 PM
Post: #6
RE: JS files are coming top in waterfall instead of coming at the end
(06-12-2013 12:58 AM)kbprakash@gmail.com Wrote:  Interesting! To avoid the blocking we move scripts to the bottom of the page. now chrome is making high priority and loading them on top. Wondering if there is any documentation (from chrome or any blog posts) to understand when and why chrome does it and how doe it improves the performance.

There is but I can't find it right now - this is the closest I get http://www.igvita.com/slides/2012/web-pe...urious/#25

Remember it's the preload scanner doing this i.e. it's looking for the blocking resources and scheduling their download so they get downloaded sooner.

Even though the preloader is scheduling the download of scripts early, if they were higher in the document they would still block rendering until they've been downloaded and executed so by placing them at the bottom they don't block rendering.

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
06-14-2013, 03:43 AM
Post: #7
RE: JS files are coming top in waterfall instead of coming at the end
Here is the write-up from the changes that were made to the scheduler in Chrome 27: https://docs.google.com/document/d/1JQZX...&forcehl=1

I wouldn't change anything on the page because of it though, the scheduler is an evolving work in progress and hopefully it will get smarter about balancing priorities across images and scripts based on where they are on the page.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)