title: Does xmlhttprequest keep connection open after request has been processed?
body: <p>I have done a simple ajax...</p>
  
  <p>The request and response header both contain the Connection: <code>Keep-Alive</code></p>
  
  <p>I goggle a bit and saw that the client thus maintain a persistent connection
  with the server. This support pipelining, where client may send multiple request without waiting for each response.</p>
  
  <p>So i have some questions:</p>
  
  <ol>
  <li>Where does the xmlhttprequest actually open a connection to the server?</li>
  <li>Does creating many xmlhttprequest object open their own connect or it send it on a same connection using pipelining...?</li>
  <li>I want to handle simultaneous request.. Can i queue the request(store parameters) ..and in the onreadystate provide function to handle it.. i.e. calling the function that make request recursively? or it's not a good idea at all?</li>
  <li>When is the connection closed..at what stage?</li>
  </ol>
  
  <p><em>Other info:</em>
  I don't want to use jquery or any other librarie for the ajax.You can propose though. i
  can check how they work.
  I'm using javascrip and php(codeigniter framework).
  I want to be able to handle multiple request(2)..and queue request that are
  made when the limit has been reached.</p>
  
  <p>Thanks in advance :)</p>