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
Combined version of nisanth074 and Peter V. Mørch answers, that worked for me.
Example:
var isPageBeingRefreshed = false;
$(window).on('beforeunload', function(){
isPageBeingRefreshed = true;
});
$.ajax({
// Standart AJAX settings
}).error(function(){
if (!isPageBeingRefreshed) {
// Displaying error message
}
});