i apologise if this is something i should be able to look up. all of the terms i wanted were way overloaded..
here is my problem: when i open a page, it fires off a
[this is an edit from the previous answer, which had outstanding questions that I have since resolved]
jQuery throws the error event when the user navigates away from the page either by refreshing, clicking a link, or changing the URL in the browser. You can detect these types of errors by by implementing an error handler for the ajax call, and inspecting the xmlHttpRequest object:
$.ajax({
/* ajax options omitted */
error: function (xmlHttpRequest, textStatus, errorThrown) {
if(xmlHttpRequest.readyState == 0 || xmlHttpRequest.status == 0)
return; // it's not really an error
else
// Do normal error handling
});