I have a large table of "extra" data that is populated from a large number of ajax requests when the page loads. These queries may take up to 1 minute. While this data is loading, the user can perform actions on the page that trigger additional ajax requests. The problem I am facing is that the user action causing the additional ajax request does not end until all other ajax requests in the queue have been processed. This is due to the use of all browser connections of the same domain and jQuery ajax queue.
Unfortunately, changing subdomains is not an option and does not create a synchronous queue so as not to use all the same connections to the domain.
What I would like is an option to “prioritize” requests by first placing a user request.
Is there an easy way to accomplish this using jQuery ajax queue?
EDIT:
If there is no way to manage the request queue (as it starts to display), can the $ .ajax beforeSend callback function be used to “defer” the requests requested in the queue?
source share