I watched several threads here, mostly used this: window.onbeforeunload = function (e) {var e = e || window.event;
// IE and Firefox if (e) {e.returnValue = 'Are you sure?'; }
// For Safari return 'Are you sure?'; };
but it looks like this will confuse the situation with the refresh of the page and the closing page, is there any way to distinguish between these two situations?
Allan shore
source
share