What's the proper way to deal with AJAX error because of page reload?

What's the proper way to deal with AJAX error because of page reload?

Sometimes, when using jquery.ajax(), the AJAX error callback will be triggered if the user reloads the page and the AJAX request is aborted.  Is there something I can check in the jqXHR object that is guaranteed to be that way only when the AJAX error callback has been triggered for this reason?  Otherwise I have an error popping up on the page just before it reloads, which looks a bit ugly.