Advantage of loading javascript files in footer instead of header?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5329807/benefits-of-loading-js-at-the-bottom-as-opposed-to-the-top-of-the-document">Benefits of loading js at the bottom as opposed to the top of the document</a>  </p>
</blockquote>



<p>Ive read that it is, but why is it beneficial to load javascript files before the end of the body rather than in the document head? </p>

<p>Ive heard its to do with page loading speed. However as I understand the page content is loaded before the javascript is run, so why does it make a difference? Thanks </p>
