Tuesday, May 27, 2014

Put Javascript file at the end of the document

Unlike StyleSheets, it is better to place (java)scripts to the end of the document. Progressive rendering is blocked until all StyleSheets have been downloaded. Scripts cause progressive rendering to stop for all content below the script until it is fully loaded. Moreover, while downloading a script, browser does not start any other component downloads, even on different hostnames.
So, always have scripts at the end of the document.

No comments:

Post a Comment