Every once in a while I hear about placing HTML <script>
tags later in the HTML document rather than in the <head>
element.
Some people, or so I've heard, even advocate placing one's scripts as the last few tags before </body>
.
Is this due to a performance issue? Perhaps loading up a script is a blocking IO operation, considering that script-dependent scripts are placed after other scripts like so:
<script src="jQuery.js"></script>
<script src="myScriptThatUsesjQuery.js"></script>
Even if that's the case, why would placing one's scripts near the end of the HTML document help?
Thanks!