I found recently that IE9 times out requests if they don't give a response in 10 seconds and after that you just see the "Internet Explorer cannot display this page" page that sucks tons. Unfortunately we have several actions that take more than 10 seconds and I don't know how to bypass this issue. In Microsoft official sites they ask you to change a registry key to increase the timeout, this is totally not an option for most of our customers that have very limited access to their computers, some of them cannot install other browsers, etc... so changing timeouts and recommending to use other browsers are not real options so this must be solved in the code.
I came out with the idea of making dummy "keep-alive" AJAX requests while the other request was going on to "trick" the browser to think something is going on, but the browser is stupid enough to show this "I cannot display this page" screen after 10 seconds the http request is thrown, even though there are AJAX requests going on [see attached picture of this].
I am running out of ideas here and any suggestion or solution to this problem is mostly welcomed.
I'm not sure what you think the Ajax requests would be 'keep[ing]-alive'? If you've initiated a page load in the main browser window then Ajax requests from the page waiting to be unloaded will have nothing to do with it. Also note that messing with the registry is an entirely valid response in this case because to get the timeout as low as 10 seconds the registry must have already been messed with, the default timeout value has never been less than 5 minutes.
Things you can try in the meantime:
On the server side are you buffering the output (ie. generating the entire page, then sending it)? If so I would experiment with turning that caching off and sending chunks of the page as they're rendered - AFAIK the timeout is the gap between the request being initiated and any data in the response being received. Sending some data, even just the response headers, before the timeout should stop the error popping up.
Break the action into chunks that you can do in less than 10 seconds
Request the page with Ajax instead of by navigating to it
I tried the AJAX thingy hoping that if the browser was busy throwing requests the other one might not timeout, this was a wild shot and it didn't work, which it makes sense.
About the registry there are two keys: KeepAliveTimeout and ReceiveTimeout both set to 10 seconds, everybody in my office have them to 10 seconds and I have seen other people with the same problem, maybe it is something related to IE9 in a W7 x64 machine? Maybe in some Windows update the registry was changed, I don't think my colleagues where messing around with it manually and very certainly most of our customers/users will not have permissions to touch the registry.
I think we will try the first option you suggested, the last one would be my preference but that involves a huge refactoring for what we don't have time at this moment.
I have W7 x64 with IE10 and neither of those settings exist in my registry. I think it's likely the settings are getting added by some common bit of software, eg. anti-virus or internet protection suite, or even some sort of IE toolbar.
Joined: Apr 08, 2009
Rob Crowther wrote:I have W7 x64 with IE10 and neither of those settings exist in my registry. I think it's likely the settings are getting added by some common bit of software, eg. anti-virus or internet protection suite, or even some sort of IE toolbar.
That's a point of view I didn't even think about, I will have to talk about it with the IT "Crowd".