HOW TO AVOID THE WARNING MESSAGE “Leave Site?” WHILE CHANGING URL IN A CLIENT SCRIPT

There is a way – when needed – to disable this confirmation dialog, which is adding the following line of code just before the call that triggers the URL change:
window.onbeforeunload = null;

Leave a comment

Your email address will not be published. Required fields are marked *