Enable Warning on Closing Multiple Tabs in Microsoft Edge

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:

  1. Open Edge Chromium and visit the following page:

    Alternately, you can open the edge://flags/ page and search for the option “Ask Before Closing Multiple Tabs”. This flag/option is available in Edge Chromium version 89.0.774.75 and higher.

  2. Set the flag to “Enabled” and restart Edge Chromium.
  3. Restart Microsoft Edge.
  4. You can now turn on or off “Ask before closing multiple tabs” in Settings and more (…) → Settings → Appearance → Customize browser.
    edge tab close warning flagThe browser will prompt you when closing the browser with tabs open.edge tab close warning flag

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:

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:

  1. Start the Registry Editor (regedit.exe)
  2. Go to the following branch:
    HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main
  3. Double-click the DWORD value named AskToCloseAllTabs
  4. Set the value data for AskToCloseAllTabs to 1
  5. 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!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

2 thoughts on “Enable Warning on Closing Multiple Tabs in Microsoft Edge”

  1. 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.


Leave a Comment