Is it possible to display a custom message in the beforeunload popup?
tl;dr – You can’t set custom message anymore in most modern browsers A quick note (since this is an old answer) – these days all major browsers don’t support custom message in the beforeunload popup. There is no new way to do this. In case you still do need to support old browsers – you … Read more