I have a simple exit pop script, below. It was working fine. Today i restarted Chrome (at which point i think it updates itself) and exit pop message got replaced with generic one. Exit pop still works fine on IE. Anyone else seeing this? To test make sure you close ALL Chrome windows and restart Chrome.
Coding gurus any fixes??? I tried googling this and cannot find anything.
http://screencloud.net/v/yaG
<script language="javascript">
var PreventExitPop = true;
function ExitPop() {
if(PreventExitPop != false) {
return "WAIT! \n\nWe are the most exclusive....... \n\n"
}
}
window.onbeforeunload = ExitPop;
</script>
Same here , 3 diff script, no go
and same s... with Firefox
I was actually going to make a post to ask about the same thing, Firefox for me also.
It looks like "onbeforeload" is no longer supported with Chrome 51
https://productforums.google.com/for...me/TGpWRjUwrEM
No Solution here ?
Custom message is not allowed anymore, from Google Chrome 51 and future versions.
These pages show the update: https://developers.google.com/web/up...reload-dialogs
https://www.chromestatus.com/feature/5349061406228480
"Unfortunately, it is often used to scam users."
However, there is a solution, in fact, it is more "fancy" that the custom exit alert message.
If you go to for example: 3weekdiet.com and then try to close the window, you'll see an exit alert and a custom HTML message. This might substitute the classic exit alert message, worth a try.
The current status of the custom js dialog according to my recent testing (2 days ago).
I may have some browsers outdate, since on the link jurtzi posted it states that Safari has this implemented also.
NOT WORKING:
Chrome - no custom dialog
Opera - no custom dialog
Firefox - not firing exit at all
WORKING:
Safari
Ie
Edge
You can workaround this by creating JS code to follow the mouse, if it moves in the off window direction, fire a dialog.
Yeah on Exit intent , but we already have that , just need the exit too , still same everywhere not working Chrome, Opera , firefox
What about that one that I just crafted for you 
It's a mix between exit intent and unblockable alert box.
Works on all browsers and mobiles I've tested so far (which are just chrome, firefox, and chrome mobile on android, so more tests are welcome)
http://dev.funnelflux.com/tests/newexitpop.html
Here's the code, you'll want to change the 2 variables at the top with your message and the redirect url:
<script>
window.exitMessage = "Your custom message here";
window.redirectURL = "http://bing.com";
function exitStopper()
{
alert(window.exitMessage);
if( window.redirectURL )
{
window.location.href = window.redirectURL;
}
}
window.addEventListener('blur', exitStopper );
document.body.addEventListener("mouseleave", function(e)
{
if( e.offsetY <= 0 )
{
exitStopper();
}
}, false);
</script>
Bump :-) still no other solution ?
I just tested the above script on Safari and Chrome browsers. Unfortunately, it gives me these responses - Safari is good - but Chrome is not:
1. Safari - Custom message fires fine and then you click close and redirects to page
2. Chrome - fires repeatedly until you click the stop (Version 56.0.2924.87 (64-bit))