I make ajax requests to the site, you need to process 20-30 requests at the same time, but the following happens:

enter image description here

ajax requests for 6 requests.

Is it possible to somehow get around these restrictions or do it with a min delay (1ms), or implement it with curl?

  • And on which side are you interested in the solution, on the browser side, on the site code side, or on the server side? - Stanislav Belichenko February
  • Browser side - bogdan
  • Maybe you should look in the direction of SPA and asynchrony? - sowd

2 answers 2

In general, the essence is as follows - all browsers have a certain maximum number of open connections with a single host. If you believe these answers, then it was for 2015:

Firefox 2: 2 Firefox 3+: 6 Opera 9.26: 4 Opera 12: 6 Safari 3: 4 Safari 5: 6 IE 7: 2 IE 8: 6 IE 10: 8 Chrome: 6 

Accordingly, there are three options for solving the issue:

  1. If we are talking about the decision on the side of the user, that is, the browser, then of course you can change this setting in different browsers in different ways.
  2. If we are talking about a solution at the server level, then we can advise or make requests to different hosts, that is, 6 goes to site1.com, 6 to site2.com, and so on.
  3. If we are talking about a decision at the code level, then I would advise to reduce the exorbitant number of requests and do them all in one fell swoop, well, or at most - six :)

For the third option, it may well be that you can write a proxy code on the js side, so that it packs all the requests into several and sends them, then unpacking them back, if it is not possible to combine all requests directly.

  • The first one is the best for me, how can I remove the restriction in the browser and can there be any restriction in windows? - bogdan

The browser has a limit on the number of parallel requests to a single resource (domain), in different browsers this value is varied:

  Firefox 2: 2
 Firefox 3+: 6
 Opera 9.26: 4
 Opera 12: 6
 Safari 3: 4
 Safari 5: 6
 IE 7: 2
 IE 8: 6
 IE 10: 8
 Chrome: 6 

In order to circumvent this limitation, subdomains are created that will refer to one ip-address:

  a.mysite.com
 b.mysite.com
 c.mysite.com
 ... 

The browser perceives them as completely different sites. To create your own subdomain, in the hosting settings, find the section with the DNS settings and add the CNAME record

CNAME record setup

(this image may differ from your hosting provider)

You also need to configure virtual hosts on the server so that they all refer to 1 directory. Contact your hosting provider for assistance.


Sending simultaneously 30 http-requests indicates an incorrect formulation of the problem. If you need two-way client-server communication, I advise you to familiarize yourself with the Websocket protocol - all browsers already support it. If you don’t like web sockets, try long- polling long polling queries. Otherwise, your resource faces an avalanche-like increase in load.

  • The task is somewhat standard, and is needed purely for one launch. Thank you all for the answers. - bogdan