<?xml version="1.0" encoding="UTF-8"?>
<entry>
  <body>Most likely you've been taught to put your javascript &lt;code&gt;&lt;script&gt;&lt;/code&gt; tags in the &lt;code&gt;&lt;head&gt;&lt;/code&gt;.  Well, according to the "Yahoo! Exceptional Performance team":http://developer.yahoo.com/performance/, you shouldn't. In fact, "they advocate":http://developer.yahoo.com/performance/rules.html#js_bottom that you should place your javascript &lt;code&gt;&lt;script&gt;&lt;/code&gt; tags at the very bottom of your document--just above the &lt;code&gt;&lt;/body&gt;&lt;/code&gt; closing tag.

If external javascript files are included in the &lt;code&gt;&lt;head&gt;&lt;/code&gt;, the browser downloads those js files before rendering the rest of the page.  Who wants to wait?  If you include the scripts at the bottom of your document, the page loads up _then_ fetches the scripts.  In most cases, this is desirable.
=more=
Some cases you wouldn't want to put javascript at the bottom:
# You're loading up valuable page content with javascript.
# Some inline javascript relies on your external javascript files.
# Your boss told you to put them in the &lt;code&gt;&lt;head&gt;&lt;/code&gt; tag.

Thanks to "Robert Nyman":http://www.robertnyman.com/2008/04/23/where-to-include-javascript-files-in-a-document/ for the reminder.</body>
  <comments-count type="integer">0</comments-count>
  <comments-open type="boolean">true</comments-open>
  <created-at type="datetime">2008-04-24T08:54:29-07:00</created-at>
  <entry-class>article</entry-class>
  <feature type="boolean">false</feature>
  <id type="integer">8</id>
  <noborder type="boolean">false</noborder>
  <permalink>put-your-javascripts-at-the-bottom</permalink>
  <published type="boolean">true</published>
  <published-at type="datetime">2008-04-24T09:07:24-07:00</published-at>
  <title>Put Your Javascripts At The Bottom</title>
  <updated-at type="datetime">2009-05-10T18:08:32-07:00</updated-at>
  <user-id type="integer" nil="true"></user-id>
</entry>
