If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

In that microsoft link, it clearly states, "With the timeout property, Web developers can specify the length of time in milliseconds for the host to wait for a response before timing out the connection". It actually says that on Microsoft's own website, so it must be true ... but apparently not ... read on ...

I have implemented the timeout precisely as described in that document, except I have given it a value of 20000 milliseconds.

And the result is .... (drumroll) ... it has no effect whatsoever. The request times out after 10 seconds as before.

I can implement an AJAX poll once every 5 seconds, but this seems complete overkill for a problem which Microsoft themselves say is easy to fix with a single line of code!!! Only it doesn't work on my browser ...

since 10000 milliseconds is fewer than 20000 milliseconds, it would break the laws of physics if a 20000 ms timeout had any effect on something that was over with in ten seconds...

No. The timeout occurs after 10 seconds. The cURL timeout is 10 seconds. The slight overhead associated with running the rest of the script, and performing the AJAX calls pushes the TX/RX time slightly above 10 seconds, hence the timeout. By setting the timeout to 20 seconds, no timeout should occur.

Originally Posted by felgall

The comments say you are using an activeXObject in IE for the Ajax call - that was needed for IE4 through IE6 but IE8 and later have used the same code as other browsers.

That is interesting! I will try that. I think I probably still need to support IE6 and earlier, I can conceive of a couple of ways to get round the problem (the simplest one I can think of is to poll for a flag which PHP raises in $_SESSION when the script completes). I wonder how many clunky old machines are still using IE6. (Reminds me of some old engineers I use to work with, who insisted that there is nothing that can't be done in Fortran 77 on a VAX, and that there's no need for these new-fangled desktop computers ... )

That is interesting! I will try that. I think I probably still need to support IE6 and earlier, I can conceive of a couple of ways to get round the problem (the simplest one I can think of is to poll for a flag which PHP raises in $_SESSION when the script completes). I wonder how many clunky old machines are still using IE6.

Most web sites dropped support for IE6 several years ago when the number of users fell low enough for them to decide to ignore all the complexities that antiquated browser presented. Many web sites have now dropped support for IE7 as well and it may soon be possible to ignore any of the IE9 only issues as the number of people using that browser is now also rapidly falling.

Most IE users are now using either IE8 or IE10 and the IE10 users are expected to gradually shift across to IE11.

Mind you, I have fixed the issue by way of a very simple work-around: I just buffer the AJAX response in $_SESSION, then poll the server for the contents of the buffer each time the AJAX request times out. It's a very neat and simple solution!