title: jQuery.ajax() inside a loop
body: <p>If I call <code>jQuery.ajax()</code> inside a loop, would it cause the call in current iteration overwrite the last call or a new XHR object is assigned for the new request?</p>
  
  <p>I have a loop that do this, while from console log I can see requests done <code>200 ok</code> but just the result data of the last request in the loop is stored by the request <code>success callback</code> as supposed .</p>
  
  <p>the code:</p>
  
  <pre><code>var Ajax = {
      pages: {},
  
      current_request: null,
  
      prefetch: function () {
          currentPath = location.pathname.substr(1);
  
          if(this.pages[currentPath])
          {
              var current = this.pages[currentPath];
              delete this.pages[currentPath];
  
              current['name']=currentPath;
              current['title']=$("title").text().replace(' - '.SITE_NAME, '');
              current['meta_description']=$("meta[name=description]").attr('content');
              current['meta_keywords']=$("meta[name=keywords]").attr('content');          
          }
  
          var _Ajax = this;
          //the loop in question *****
          for(var key in this.pages)
          {
              $.ajax({
                  method: 'get',
                  url:'http://'+location.hostname+'/'+key,
                  success: function(data) {
                      _Ajax.pages[key] = data;    
                  }
              }); 
  
                      console.debug(this.pages);
          }
  
          if(current)
          {
              this.pages[currentPath] = current;
          }       
  
      } 
  };//Ajax Obj
  for(var i in pages)
  {
      Ajax.pages[pages[i]]={};
  }
  
  $(function() {
      Ajax.prefetch();
  });//doc ready
  </code></pre>