Site icon Winhelponline

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. Start Microsoft Edge Chromium.
  2. Open Settings and more (…) → Settings → Appearance → Customize browser.
  3. 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:

  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.
Exit mobile version