javascript - 增加并发 HTTP 调用

标签 javascript jquery ajax http browser

我在 SO 上浏览了很多帖子,但没有找到任何合适的解决方案

我是从最大并发连接到一个域限制的答案之一得到的

IE 6 and 7:      2
IE 8:            6
IE 9:            6
IE 10:           8
IE 11:           8
Firefox 2:       2
Firefox 3:       6
Firefox 4 to 46: 6
Opera 9.63:      4
Opera 10:        8
Opera 11 and 12: 6
Chrome 1 and 2:  6
Chrome 3:        4
Chrome 4 to 23:  6
Safari 3 and 4:  4

如何调用超过浏览器设置的最大http调用到一个域。

我经历过这个

One trick you can use to increase the number of concurrent conncetions is to host your images from a different sub domain. These will be treated as seperate requests, each domain is what will be limited to the concurrent maximum.

IE6, IE7 - Have a limit of two. IE8 is 6 if your a broadband, 2 if you are dial up.

但我没有这样的场景。我正在获取指向一个 Web 服务器的特定数据。我将如何克服这个问题。

I am having 14 http calls to same server at starting which is the reason it takes long to load the actual page. How to increase performance of my website through concurrent ajax/http calls

最佳答案

您可以做的是将该负载分配给许多子域。您可以在这些客户端之间使用 www1、www2、www3、www4 和循环法,而不是仅使用 www。

您需要配置您的网络服务器,以便 www* 子域结束到同一个地方。

关于javascript - 增加并发 HTTP 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39486006/

相关文章:

jquery - 用 jQuery 收集表单中的所有项目

php - 将 php 语法与 ajax 结合起来

asp.net - ASP.NET CORE 中的 Request.Files

javascript - Heroku "We' 抱歉,出了点问题。”由于 javascript_include_tag

javascript - 如何使用过滤器插入换行符?

javascript - 使用 Node.js 监控 Mongo 的更改

javascript - jQuery递归

javascript - 使用 PHP 在 javascript 函数中检索 json

javascript - JQuery 滚动/分页选项卡

javascript - 如何从异步调用返回响应?