I am searching for an event which does the same as the ajax correspondent:
$(document).bind("ajaxStart", function() {
//do something
});
but for all kinds of requests, like:
$(document).bind("requestStart", function() {
//do something
});
so it should be fired by "href links", changes in window.location, form submits and so on…
Is there any script or possibility which provide this?
If you are looking to find out when a page is being left (no matter how), you can use the non-standard
beforeunloadevent that is supported by all major browsers.