: 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
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.
More posts by @Welton855
1 Comments
Sorted by latest first Latest Oldest Best
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".
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.