title: If I keep JavaScript at bottom or keep JavaScript in <head> inside document.ready, are both same thing?
body: <p>If I keep JavaScript code at bottom or keep JavaScript code in <code>&lt;head&gt;</code> inside <code>document.ready</code>, are both same thing?</p>
  
  <p>I'm confused between these two methodologies, <a href="http://api.jquery.com/ready/" rel="nofollow">http://api.jquery.com/ready/</a> and <a href="http://developer.yahoo.com/performance/rules.html#js_bottom" rel="nofollow">http://developer.yahoo.com/performance/rules.html#js_bottom</a>.</p>
  
  <p>Is there any benefit to putting JavaScript code at bottom (just before <code>&lt;/body&gt;</code>) even if I keep the code inside.</p>
  
  <pre><code>   $(document).ready(function() {
         // code here
     });
  </code></pre>
  
  <p>As JavaScript is attached in </p>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript" src="example.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>