Prevent browser closing
Turn the switch on and the browser will ask before this tab is closed or reloaded.
About Prevent Browser Closing
This page uses the beforeunload event, the same thing websites use to warn about unsaved work. While the switch is on, closing the tab, reloading it or going to another address brings up a confirmation from the browser. You cannot change its wording, because every browser shows its own. Browsers also ignore the request unless you have clicked or typed on the page first, and flipping the switch counts. It cannot stop a crash, a forced quit, a shutdown or a browser that is closed by the system.
- Keeping a tab with a long form, a download page or a live session from being closed by accident.
- Protecting a tab that others on a shared screen might close.
- Trying out how the leave-page warning behaves in your browser.
- Pinning a tab that must stay open during an upload or an exam.
How to use Prevent Browser Closing
Step 1
Click the switch so it turns on.
Step 2
Keep this tab open and use it as normal.
Step 3
If you try to close or reload, the browser asks. Press Stay to remain, or Leave to go.
Good to know
- The prompt text is set by your browser and cannot be changed by a web page.
- This protects this tab only. It does not lock the browser, other tabs or the computer.
- The guard is cleared if you reload, because the page starts again with the switch off.
Common questions
Why did the browser not ask me?
Browsers only show the prompt if you have interacted with the page, and some skip it on mobile or when the tab is closed from the system. Click on the page, check the switch is on and try again.
Can it stop someone from closing the browser?
No. It only asks for a confirmation, and the person can still choose to leave. It cannot block a forced quit, a crash or a shutdown.
Does it save my work?
No. It does not keep or send anything. It only asks before the tab goes away.