允许在流行的浏览器有多少并发AJAX(XmlHtt prequest)的要求? [英] How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?

查看:375
本文介绍了允许在流行的浏览器有多少并发AJAX(XmlHtt prequest)的要求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firefox 3中,得到的答案是6%域:只要第7 XmlHtt prequest(在任何选项卡),以同一个域中被触发,则排队,直到其他6光洁度之一。

什么是其他主流浏览器的数字?

此外,是否有解决这些限制的方法,而无需我的用户修改其浏览器设置?例如,是否有限制JSONP请求(使用脚本标记注入,而不是XmlHtt prequest对象)的数量?

背景:我的用户可以XmlHtt prequests从网页服务器,要求服务器运行在远程主机上的SSH命令。如果远程主机下来,ssh命令需要几分钟失败,最终$ P $执行任何进一步的命令pventing我的用户。

解决方案

一个技巧,你可以用它来增加并发conncetions的数量是从不同的子域名托管你的图像。这些将被视为单独的请求,每一个域就是将被限制为并发最大。

IE6,IE7 - 有两个限制。 IE8是6,如果你的宽带,2,如果你是拨号。

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 are the numbers for the other major browsers?

Also, are there ways around these limits without having my users modify their browser settings? For example, are there limits to the number of jsonp requests (which use script tag injection rather than an XmlHttpRequest object)?

Background: My users can make XmlHttpRequests from a web page to the server, asking the server to run ssh commands on remote hosts. If the remote hosts are down, the ssh command takes a few minutes to fail, eventually preventing my users from performing any further commands.

解决方案

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.

这篇关于允许在流行的浏览器有多少并发AJAX(XmlHtt prequest)的要求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆