By default, Microsoft Edge doesn’t issue a warning if you close your Microsoft Edge browser window with multiple tabs open. Sometimes we may accidentally close the browser window and wondering how to restore the session back.
You can press Ctrl + Shift + T to reopen the tabs closed during the last browser session.
Additionally, you can force Microsoft Edge to warn you when you attempt to close the browser window accidentally with multiple open tabs. Here’s how to do that.
Enable Warning on Closing Multiple Tabs in Microsoft Edge
To enable the warning on closing multiple tabs in Microsoft Edge Chromium, follow these steps:
- Start Microsoft Edge Chromium.
- Open Settings and more (…) → Settings → Appearance → Customize browser.
- Turn on or off “Ask before closing multiple tabs” toggle switch.
The browser will prompt you when closing the browser with tabs open.
Note that the above feature (“Ask Before Closing Multiple Tabs”) was enabled in Edge Chromium version 89.0.774.75 as an experimental flag that had to be enabled/disabled via edge://flags/
page. In recent versions of Edge, this is no longer an experimental setting/flag; you can enable it directly via Settings.
Google Chrome, though based on Chromium, does not have this feature yet. For Chrome, you can use the Chrome Close Lock extension from Chrome Web Store. Alternately, visit the following page and keep it always open:
Prevent browser close tab: https://maki-chan.de/preventclose.htm
As long as the above page is open, it prevents Chrome from closing accidentally. It shows you the window close warning when you attempt to close the browser window. This is accomplished by the following JScript code run by the above webpage:
window.onbeforeunload = function() { return "Would you really like to close your browser?"; }
For Microsoft Edge (legacy)
Microsoft Edge (legacy version) shows the confirmation dialog below when you close the app with multiple tabs currently open. If you have dismissed the dialog after accidentally enabling the “Always close all tabs” option and clicking “Close all,” Edge will no longer show you the prompt from the next time, and the setting is saved to the registry.
You’ll need to edit the registry to get back the multiple tabs closure warning when exiting Edge.
Follow these steps:
- Start the Registry Editor (regedit.exe)
- Go to the following branch:
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main
- Double-click the DWORD value named
AskToCloseAllTabs
- Set the value data for
AskToCloseAllTabs
to1
- Exit the Registry Editor.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
A strong-willed person, his world is full of infinite possibilities
I reached the correct spot in the registry, but the ‘AskToCloseAllTabs’ wasn’t there. I just installed the new version of Edge, maybe this has been removed.