Mobile app version of vmapp.org
Login or Join
Welton855

: Parallel downloading of JavaScript files on page load Below is a quote from one of the Yahoo performance pages: While a script is downloading, however, the browser won't start any other

@Welton855

Posted in: #Javascript #PageSpeed #Performance

Below is a quote from one of the Yahoo performance pages:


While a script is downloading, however, the browser won't start any
other downloads, even on different hostnames.


When I look at page load of our website, I can see that many scripts are being downloaded at the same time:



Am I mistaken, or should the quote should instead read like this?


While scripts are downloading (there can be several scripts downloading
at the same time), the browser won't start any other downloads, even
on different hostnames.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Welton855

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kaufman445

Depending on the browser you use, that may be correct. As javascript may alter the page content, add new dom elements etc., the execution of anything after one script is blocked until that script gets executed. Nevertheless the download of other resources may happen in parallel.

The best advice is to put script tags in the bottom of your body and pack them together to minimize the communication overhead of multiple requests. Steve Sounders has written two good books about all this called "High performance websites" and "Even faster websites".

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme