最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Concurrent Ajax requests in Chrome - Stack Overflow

programmeradmin1浏览0评论

I have read limitation on concurrent ajax requests to a particular domain from chrome browser to be 6. Earlier I had tested and confirmed that. But now I see that even 100 requests are getting sent to the server from chrome browser concurrently and all are active at the same time. Can someone guide if something has changed. I use chrome 72. I can assure you that the calls have indeed hit the server as I can see the required Database entries corresponding to the call. But earlier these calls would be in waiting mode until some previous call finished.

Update Some additional observations may or may not be relevant. I tested this with 2 servers - 1 has IIS 10 and this limitation is not seen. The other has IIS 8 where I can see that only 6 are sent to server at a time.

I have read limitation on concurrent ajax requests to a particular domain from chrome browser to be 6. Earlier I had tested and confirmed that. But now I see that even 100 requests are getting sent to the server from chrome browser concurrently and all are active at the same time. Can someone guide if something has changed. I use chrome 72. I can assure you that the calls have indeed hit the server as I can see the required Database entries corresponding to the call. But earlier these calls would be in waiting mode until some previous call finished.

Update Some additional observations may or may not be relevant. I tested this with 2 servers - 1 has IIS 10 and this limitation is not seen. The other has IIS 8 where I can see that only 6 are sent to server at a time.

Share Improve this question edited Mar 8, 2019 at 9:12 ckv asked Mar 6, 2019 at 4:15 ckvckv 10.8k20 gold badges102 silver badges152 bronze badges 8
  • am sure these are not concurrent and they might be starting a few ms apart – Mr. Alien Commented Mar 8, 2019 at 4:25
  • @Mr.Alien Few ms is fine. But that is not the question. If browser allows only a limited concurrent connections then the call should not hit server until some previous call returns. I am pretty sure I had seen that behaviour few weeks back but not able to see now. – ckv Commented Mar 8, 2019 at 4:56
  • Could you share how you did the test? – hashedram Commented Mar 8, 2019 at 6:45
  • Does the server supports HTTP2? If so you are seeing all requests being processed in a single connection, read this. – Munim Munna Commented Mar 8, 2019 at 6:47
  • 1 Look at the protocol column in network tab, it should say h2 or http1.1, if the column is not there right click on column headers to enable it. – Munim Munna Commented Mar 8, 2019 at 8:15
 |  Show 3 more comments

2 Answers 2

Reset to default 13 +50

This behaviour has not been changed for HTTP/1.1.

You can get more clear picture if you enable the WaterFall. If you see the waterfall, at one point of time only 6 request will get fired(sent to server) and rest all will be in pending mode.

Note, request with status "Pending" appearing in the network tab doesn't mean that the request is sent to the server.

Following is the screenshot from Version 74.0.3726.0

You can get max number of simultaneous connection for each browser by running a test (previously on a service like browserscope but the service is dead now, so you may do it manually)

The results based on your version and configurations.

Here is my network test results using Google Chrome Version 72.0.3626.121 (Official Build) (64-bit):

16. data: URLs = yes
15. Link Prefetch = no
14. Cache Resource Redirects = yes
13. Cache Redirects = yes
12. Cache Expires = yes
11. || CSS + Inline Script = no
10. || CSS = yes
9. Async Scripts = no
8. || Script Iframe = yes
7. || Script Image = yes
6. || Script Stylesheet = yes
5. || Script Script = yes
4. Max Connections = 24
3. Connections per Hostname = 6
2. Check Latency = 251
1. PerfTiming = yes

So it's maximum of 6 connections per hostname and 24 for different hostnames for Chrome 72.

Hope it helps.

发布评论

评论列表(0)

  1. 暂无评论