title: sending jquery ajax requests in a loop
body: <p>I have "Spatial Selection" implemented on Map in my Web Application, which selects the number of Streets. After Selection, I get unique street Id for all the Streets which are selected using "Selection Handler".</p>
  
  <p>My next step is to send Ajax request to Server per Street Id and get back the response. Currently, I am doing this using only single For Loop and sending Ajax request for Each Street Id as follows.</p>
  
  <pre><code>for (var index in streetIds) {
      sendAjaxRequest(streetIds[index]);
  }
  
  function sendAjaxRequest(streetId) {
    $.ajax({
        type : 'POST',
        url :  OpenLayers.ProxyHost + this.url,
        data : streetId,
        success : function(response) {
            sos.parseSOSObservations(response);
        },
        error : function(x, e) {
            alert("Something went wrong in the request" + e);
        }
    });
  }
  </code></pre>
  
  <p>For Example: If user has selected 1000 streets over map, then my program will send 1000 post request which will obviously slow down my application and block the browser. </p>
  
  <p>Can any one please suggest, How can I handle multiple concurrent number of Ajax request in this case along considering the performance of Web Application? </p>