Browser waits for ajax call to complete even after abort has been called (jQuery) Browser waits for ajax call to complete even after abort has been called (jQuery) javascript javascript

Browser waits for ajax call to complete even after abort has been called (jQuery)


Thank you for your replies! It turns out I was completely wrong about this being a browser issue - the problem was on the server. ASP.NET serializes requests of the same session that require session state, so in this case, the next page didn't begin processing on the server until those ajax-initiated requests completed.

Unfortunately, in this case, session state is required in the http handler that responded to the ajax calls. But read-only access is good enough, so by marking the handler with IReadOnlySessionState instead of IRequiresSessionState, session locks are not held and the problem is fixed.

Hope this information proves useful to others.


Regarding Todd's own answer to this question...

I just had this issue with PHP and the same solution would have worked. However I needed the information in the session. For PHP developers you can call session_write_close() to close and write out your session in the middle of the request. This will free up the session for the other requests.


You might want to check a weird side effect of abort()

When the abort() method is used, the readystatechange event fires in Explorer and Mozilla. Worse, readyState = 4, which means that the average xmlhttp script assumes the data has been loaded correctly. This can give very weird effects.

documented here:

http://www.quirksmode.org/blog/archives/2005/09/xmlhttp_notes_a_1.html