Top "Onbeforeunload" questions

The onbeforeunload event is triggered before a user navigates away.

How to disable a "Reload site? Changes you made may not be saved" popup for (python) selenium tests in chrome?

I am running automated (python) selenium tests on a chrome browser, and sometimes when a page is reloaded a popup …

javascript python selenium google-chrome onbeforeunload
ASP.NET, jQuery, dirty forms, and window.onbeforeunload

In my ASP.NET web app, I'm trying to create a universal way of warning users before navigating away from …

asp.net jquery onbeforeunload
confirm before onbeforeunload

I need to prompt the user before he leaves the page, on confirmation close the tab and if not do …

javascript jquery html onbeforeunload onunload
Internet Explorer calling window.onbeforeunload on window.open and AJAX calls

Ok, I have spent a while on this problem and this is what I have gathered: If you make an …

ajax internet-explorer window.open onbeforeunload
beforeunload on IE 11 - do not prompt user does not work

When adding a listener to the global window object for the beforeunload event, IE 11 (and 10) does not behave as Chrome …

javascript internet-explorer-11 onbeforeunload
Run Javascript code only if 'beforeunload' function returns true

I'm using JQuery to capture the unload event when a user navigates away from a page. This works just fine, …

javascript html onbeforeunload
window.onbeforeunload, but for a frame?

I'm trying to put up a warning message about leaving a webpage, but it is nested inside a frameset. Apparently …

javascript frame frameset onbeforeunload
onbeforeunload doesn't seem to work in Safari or Chrome

I am working on this page: http://www.weloveflyers.co.uk/order.php After someone has entered their order details …

javascript google-chrome safari onbeforeunload
mailto link (in chrome) is triggering window.onbeforeunload - can i prevent this?

Possibly related to How to open mailto link in Chrome with Window.open without creating a new tab? Hi all. …

javascript mailto onbeforeunload
Multiple onbeforeunload() and onunload() events

I have a strange issue from a client in that our code, which they include uses onbeforeunload() to trigger a …

javascript dom-events onbeforeunload