jQuery Ajax Abort On Timeout - Strange Behaviour
I have been battling with a strange problem with the latest version of jQuery. When I run a $.ajax, and give a timeout, I can see the timeout value works in that chrome / firefox shows the xhr request as being cancelled after the timeout period.
The problem I have is, subsequent ajax calls to the same domain, from that browser all get stuck in Pending state after the first one timed out. Running them in a seperate browser is fine. They only stick in pending in the original browser until I either
1) Kill all instances of that browser and log back in
2) Restart the webserver
3) Wait for the actual request on the web server to finish after which the pending ones continue (I purposely have a long sleep in it to exaggerate the problem)
My theory is that even though the original timed out request is aborted by jQuery, the browser still seems to hold on to or keep track of the request and won't allow subsequent ones to continue to that domain.
Is this expected behaviour, or is there a way to prevent this behaviour? The application I am building is heavily dependent on correct behaviour of the timeouts but if it means subsequent ajax calls get stuck pending, its obviously not ideal.