I want to identify cases when an Ajax call is made and then it is interrupted due to some user action (for example, the user goes to another page)?
I see that when this happens, my onreadystatechange handler is called using readyState == 4 (DONE) and status == 0.
The question is, is there a way to make sure that it really matches the described scenario (the request is interrupted due to user action)? I want to avoid masking other potentially more dangerous errors.
source
share