IE7 Ajax causes blocking by maximum connections

I am doing a long comet poll to receive notifications from the server. When requesting new pages, there is a significant delay. A lengthy survey request is conducted within 60 seconds. I am sure IE7 is waiting for these requests to complete. The delay failed if I exceeded the MaxConnectionsPerServer value in the registry.

I tried to cause an interrupt on ajax requests when the window was unloaded, but this did not work. I have warnings to make sure the interrupt is being called.

What else can I do?

+4
source share
1 answer

You are right, the problem is related to the limit of 2 connections in IE.

Your best option is to move long requests to another domain (or subdomain) that will bypass the connection restrictions. Taking this idea further, you can use random subdomains with wildcard DNS to make the solution even better.

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

I described the problem in more detail here .

+3
source

All Articles