Top "Onbeforeunload" questions

The onbeforeunload event is triggered before a user navigates away.

Is there any way to use window.onbeforeunload on Mobile Safari for iOS devices?

Looks like Apple has disabled the window.onbeforeunload event for iOS devices (iPhone, iPad, iPod Touch). Unfortunately I can't find …

javascript iphone ios mobile-safari onbeforeunload
Mozilla firefox not working with window.onbeforeunload

I'm using window.onbeforeunload to display a message to the user on windows close, the function works well with Chrome …

javascript jquery firefox dom-events onbeforeunload
Use JQuery or onbeforeunload for IE and FF

I'm working in a Flex4 application, using javascript, in the "index.template.html" document. I'm having an issue being able …

javascript jquery flex4 onbeforeunload
Way to know if user clicked Cancel on a Javascript onbeforeunload Dialog?

I am popping up a dialog box when someone tries to navigate away from a particular page without having saved …

javascript jquery dom-events onbeforeunload
Can I prevent window.onbeforeunload from being called when doing an AJAX call

I have an AJAX-based grid control. We hook into the window.onbeforeunload event to check if they have unsaved data …

javascript ajax onbeforeunload
addEventListener not working with onbeforeunload

window.addEventListener("onbeforeunload",function() {return "are you sure?"}); ^ This does not seem to work... at all... the page will simply …

javascript events google-chrome addeventlistener onbeforeunload
Preventing Firefox reload confirmation

I'm displaying certain records in an editable table. The user when attempts to reload the table while editing a record …

javascript firefox google-chrome reload onbeforeunload
Cancel onbeforeunload event handler?

I have an onbeforeunload event handler attached to the page which executes every time the page reloads / gets redirected. window.…

javascript jquery onbeforeunload
Using onbeforeunload without dialog?

I'm trying to post data when a user leaves my page. I have finally managed to find a working solution, …

javascript jquery onbeforeunload