When using window.onbeforeunload
(or $(window).on("beforeunload")
), is it possible to display a custom message in that popup?
Maybe a small trick that works on major browsers?
By looking at existing answers I have the feeling this was possible in the past using things like confirm
or alert
or event.returnValue
, but now it seems they are not working anymore.
So, how to display a custom message in the beforeunload popup? Is that even/still possible?