0

I have two Ajax calls in my MVC code, for both I have set async: true, but however after first request is made and if I try to make 2nd Ajax request, the 2nd is waiting first to get response, only after getting first Ajax response, 2nd request's result is appended. I am not finding solution for this.

Code is as below:

First call:

var page_request = $j.ajax({
    url:pageurl+'?rel=tab',
    async:true,
    dataType:"html",beforeSend: function () {
        middlePanel.html('Loading...');
    },
    success: function(data){
        middlePanel.html(data);                     
        fitBoundsWithoutSeco();                        
    },
    error: function (xhr, textStatus, errorThrown) {
        middlePanel.html(textStatus);
    }
});

The second is same as first.

rahularyansharma
  • 11,156
  • 18
  • 79
  • 135

1 Answers1

0

simultaneous requests in web browsers are limited to 6. any chance you are hitting this limit after your first ajax call? (due to other requests from your page)