What happens if I send some ajax request, and immediately change the page (say follow some link) before the request returns? I mean I suppose the XHR object sends a request
I had to deal with the same issue few days ago .. seems like its not that complicated to deal with.. We should able to distinguish the weather its a ajax error of some sort or user abort the request.. of course we don't get specific event from xhr object .. that's why ajax error comes with an exception ...combination of both xhr object and exception value we can solve this.
var message = '';
$('whatever').ajaxError(function(e, xhr, settings, exception) {
// logic
if (!xhr.status){
if (exception=='abort'){
message = 'User aborted AJAX request !';
}
}
}