Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many PENDING ajax requests are allowed in modern browsers?

Tags:

First, I want to make clear that I am not talking about this question How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers? , which is about simultaneous requests.

Instead, I want know if there is a limit on the number of pending ajax requests, before the browser potentially starts cancelling them or throwing errors.

Running some simple tests, I've seen that when the limit of about 6 simultaneous requests is hit, the browser will start queuing requests in a graceful manner. Once a 'slot' becomes available, it is used and a new request is sent to the server.

I have also seen that Chrome, Firefox and even IE will gracefully handle a queue of about 100 requests.

like image 444
DanC Avatar asked Aug 19 '11 18:08

DanC


People also ask

How many AJAX requests are there?

It is worth noting that browsers can generally only handle 6 ajax requests at a time, this may catch you out.

How many XHR requests are allowed?

How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers? Bookmark this question. Show activity on this post. In Firefox 3, the answer is 6 per domain: as soon as a 7th XmlHttpRequest (on any tab) to the same domain is fired, it is queued until one of the other 6 finish.

What type of requests does AJAX use between the server and the browser?

AJAX just uses a combination of: A browser built-in XMLHttpRequest object (to request data from a web server) JavaScript and HTML DOM (to display or use the data)

Is there a way to limit the time an AJAX call will run?

Not possible. It's the browser's responsibility.


1 Answers

I also guess that it's indicated from maximum number of current opened connection and here's the situation in IE Max-Connections and this thread also may help How many concurrent AJAX requests are allowed in popular browsers?

like image 111
Mina Kolta Avatar answered Oct 18 '22 08:10

Mina Kolta