title: Ajax requests ASAP right before </body>, or on document ready too?
body: <p>I'm optimizing a page, but I can't tell the difference in results between these (the first one is obviously faster, but I'm not sure if it slows the rendering of the page a little or something):</p>
  
  <p>This one will start the request ASAP, and modify the DOM on document ready:</p>
  
  <pre><code>&lt;script&gt;
  $.ajax({
      url: '/some-url',
      success: function() {
          $(document).ready(function() {
              // do something
          });
      }
  });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>This one will start the request on document ready:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      $.ajax({
          url: '/some-url',
          success: function() {
              // do something
          }
      });
  });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Which one is recommended?</p>