title: JQuery AJAX HTTP Connections
body: <p>If I have a jQuery POST call that looks something like:</p>
  
  <pre><code>$.post(url : "myserver/1", data : params, success: function () { 
      $.post(url : "myserver/2", data : params2); 
  });
  </code></pre>
  
  <p>How many HTTP Connections would this be opening?  I'm assuming it opens 2.  </p>
  
  <p>I'm trying to replicate what a webpage would do in a Python script (as a performance testing type script).  It's much faster if I do: (pseudo code)</p>
  
  <pre><code>for i in 0 to 5000:
       Open HTTP Connection
       POST
       POST
       Close HTTP Connection
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>for i in 0 to 5000:
       Open HTTP Connection
       POST
       Close
       Open HTTP Connection
       POST
       Close
  </code></pre>
  
  <p>I assume the second test is what the browser would be doing.  I essentially want to replicate how fast 5000 hits (back to back) to the page would be.   Obviously I could parallelize this task -- but that's not what I'm looking for here</p>
  
  <p>Now, assuming jquery is making 2 HTTP connections, is there an easy method of maintaining a persistent connection?</p>