Slow server script makes IE stall
I am working on a php web application which involves calls to 3rd party web services. Recently I've run into problems because some of the web services are slow and/or time out. (When this happens the service throws an error after 5-6 minutes, which is handled by the web application)
However, the problem arise that while waiting for the result/timeout, all other connections to the web application in the browser (other windows/tabs in IE) stall. It seem to be a problem with the browser, because if opening a secondary window in another browser (e.g. Chrome) the web application serves pages with no delay.
I've considered setting up the web service call asynchronously (a separate server.side process, or an ajax call in the browser), but in the mean time I'd like to know why IE is putting all connections to the web app on hold while waiting for one page? Could it be that a custom header or other trivial markup trick would tell IE to go on with connections to other pages at the same host?
the problem arise that while waiting for the result/timeout, all other connections to the web application in the browser
What you're seeing is normal and expected behavior, if you're using sessions. The default file-based session handler places a lock on the session file when the session owner makes a request. Once the request finishes, the lock is released. In the meantime, if the user makes any further requests, those requests will wait for the lock to be released before they can continue. This behavior prevents a race condition that could otherwise result in session data being lost.
If you aren't using sessions, or you've written your own session handler and it doesn't do locking (most do not, you have to code that behavior yourself), then yeah, IE's being freaky and I have no further suggestions.
I've considered setting up the web service call asynchronously