Skip to content Skip to sidebar Skip to footer

What Is The Ajax Response When Closing The Browser In The Middle Of A Call?

If I send an ajax request, and before the response was returned by the server the user closed the browser, what happens with the response? For some reason I get it to the error ca

Solution 1:

You might want to look at the abort progress event and the accompanying gory details. It is highly likely that the browser will fire the onreadystatechange handler with abort as the state. jQuery (or whichever library you are using) will assume that the request failed and fire the higher level error handler.


Post a Comment for "What Is The Ajax Response When Closing The Browser In The Middle Of A Call?"