If I use Ajax to send a request, and this request will take a lot of time ..... if I want to send an anther request, what should I do?
the current behavior of the second request (I made) until the first request receives a response.
NOTE: I want to make this behavior for the whole application (any new request is executed immediately, without waiting for the first to finish) My application using (Ajax + PHP + jQuery + Symfony)
Suppose the first request takes a long time:
$.ajax ({ type: "GET", url: url1, success: function (html) {
At any time, I want this request to execute and complete the first.
$.ajax ({ type: "POST", url: url, success: function (html) {
var xhrReq; xhrReq = $.ajax(...);
source share