Browser Exit Warning

Workarounds and usability notes.

Browser Exit Warning

Postby John Robin Dove » Thu Feb 20, 2020 12:24 pm

Browser Exit warning used to work well but now it seems to fail. It triggers an object but does not stop the page being left. I am using Firefox.
UPDATE
I've just done some testing amd browserExitWarning still works with Internet Explorer but not Firefox, Chrome and Edge.

UPDATE 2
Oops. Sorry. False alarm. I just read this on Stack Overflow "In Firefox you MUST do some real interaction with the page in order for this message to appear to the user." And yes, it's true so no further action required.
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: Browser Exit Warning

Postby Clifton » Thu Feb 20, 2020 3:21 pm

A login page takes care of interaction allowing the browserExitWarning() function to work.
Then you can activate or deactivate the exit warning message depending on the purpose that is being served.

I use it in our new LearnToType.Today program to alert logged in users if they try and close the browser window without logging out.
 
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron