Saturday, June 11, 2016

Why add scripts at the bottom of the webpage for improving speed

Most current browsers can download a maximum of two components in parallel for each host name. However, when downloading a script, no other downloads can occur. That download must finish before moving forward.
So, when feasible, it makes perfect sense to move these files to the bottom of your document in order to allow the other components (images, css, etc) to load first.
snippets


This is a procedure that we all don't perform enough. Though not always feasible, you can many times speed up your website by placing your script tags next to the closing <body> tag.