You maybe already see a confirm box with 2 buttons: Leave This Page and Stay On This Page when you try to leave current page by closing browser/tab or navigating to another page/link.
Some people think this feature is annoy as they have to click Leave this Page button all the time to close the page/tab but others think this is very useful if they’re on a form with some fields. All changes they made or information they filled would be lost if they make a mistake, no chance to roll back. Stay on this Page button will save time for people in many cases.
Display Leaving Confirm Box Leave This Page Or Stay On This Page
Note: we can add some break lines (\n) to make the message clear and easier to understand.
So, if they made a mistake or are not sure, click Stay on this Page to stay. Or they’re sure and want to leave, click Leave this Page.