title: How to process jquery ajax requests in the order they were requested
body: <p>I am making a java servlet page that checks a list of domain names and it checking each name through a jquery ajax request.  It works fine except the results are being appended to the DOM out of order.  What is the best method to process requests in the requested order but also be asynchronously like a long polling effect. I am new with javascript. </p>
  
  <p>This is the code I am using for the requests:</p>
  
  <pre><code>$.ajax({
      async:true,
      type:'GET',
      url:servlet,
      success:function(data){
          $('p').append(data+"&lt;br&gt;");
      }, 
  }); 
  </code></pre>
  
  <p>I was thinking of sending a sequence number to the java servlet which would return it through JSON but I was wondering if there was a simpler way.</p>