Search code examples
ajaxgoogle-chromexmlhttprequestjquery-ajaxq

Multiple ajax request parallel issue


I am trying to make 100 ajax request in $.when at a time on Chrome :

var task = [];
List.forEach(function (item, index) {   // List length is 100       
    tasks.push(ajaxUploadTrackable(item));   
}

$.when.apply(null, tasks).then(function (result) {
  // do somthing
}

enter image description here

but some request got failed. please give me any idea. is there pending time limitation or maximum number of requests at a time???


Solution

  • Insted of loop check for sync and async

    Put your AJAX call in a function and call it from the AJAX callback: check Link