开发者

IE7 Ajax calls blocked by max connections

I am doing comet long polling to retrieve notifications from the server. There is significant delay when requesting new pages quickly. The long poll request is held for 60 seconds. I'm pretty confident cause is that IE7 is waiting for these requests to complete. The delay is gone if I up the MaxConnectionsPerServer value in the registry.

I tried calling abort on the ajax requests on wi开发者_StackOverflow社区ndow unload, but that didnt work. I have alerts to make sure that the abort is being called.

What else can I do?


You are correct, the issue is due to the 2-connection limit in IE.

Your best option is to move the long-held requests to a different domain (or subdomain), which will bypass the connection limits. Taking that idea further, you can use random subdomains with wildcarded DNS to make the solution even better.

Be aware that this has security implications for your code, as all current browsers block cross domain requests by default. Your workarounds will possibly include cross-site HTTP requests, JSONP, and various HTML5 features such as postMessage.

I've described the problem in a bit more detail here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜