Chrome always quit when I click on the X button on a tab, without asking me anything! Even when I close Chrome he do not alert me if I am willing to relay close it?

Many times it happened that accidentally I clicked on X button.


4 Answers 4


If you accidently close all your tabs you can reload Chrome and press CTRL + SHIFT + T.

This will restore your previous session for all your tabs.

You could also look for a Chrome extension such as Windows Close Protector.

  • 1
    True, if I accidently close all tabs I can reload chrome and press CTRL + SHIFT + T. But what happen if I have written text in some page? The text is not restored.
    – radu c
    Jun 20, 2011 at 10:31
  • @Ek then the plugin I linked is the better option in that case as it asks you if yo want to close the tab
    – Matt
    Jun 20, 2011 at 10:56
  • in that case, you can edit the Preferences file in your user-data directory to set exited-cleanly to false, then start Chrome, and it will ask if you want to restore your session, in which case it will use the Current Tabs file to restore your tabs and the Last Session file to restore the text and other form-field settings. Yes, it’s a kludge, but it works in those (hopefully) rare instances.
    – Synetech
    Jun 26, 2011 at 19:27
  • But what happen if I have written text in some page? The text is not restored. I have noticed that if you hit Ctrl-Shift-T to reopen a closed tab (No, you don't have to reload Chrome!!), sometimes the text is restored - sometimes it's not. It highly depends on the website and what kind of text input forms it is using. The best website design will actually prevent you from closing the tab by prompting you to confirm if you want to navigate away and lose the input. But yea, we don't see a lot of that around.
    – ADTC
    Sep 15, 2013 at 19:22
  • 1
    Chrome plugin 'Windows Close Protector' doesn't work now. Dec 23, 2015 at 10:57

Just to update this answer, Chrome now has a menu option for this. You can require a long press of CMD-Q so that any accidental press won't exit chrome.

On Mac click on the Chrome menu and check: "Warn Before Quitting"

  • 1
    Thanks for warn before quitting.. It was driving me crazy since accidental cmd+Q was quitting chrome and restore will not retrieve old sessions. I always clicks cmd+Q instead of cmd+W (when I close a single tab..).. You are the man.. Feb 1, 2013 at 6:59
  • Just to be clear, this isn't under settings, it's under "Chrome" in the system menu bar (next to the Apple menu).
    – Von
    Feb 10, 2014 at 1:50
  • 2014 is here and this is still the right answer.
    – Hugo
    Apr 5, 2014 at 13:35
  • Too bad it's only for Mac... Apr 17, 2017 at 0:09

If you don't mind installing a Chrome extension...

The Chrome Toolbox extension, written by Google, has an option called "Confirm before closing multiple tabs." You can find it here:


It has a number of other interesting options also.

  • 2
    Google seems to have removed this extension.
    – Von
    Feb 10, 2014 at 1:49

You can also "restore the last session," which will include text in text boxes, if you closed the program accidentally.

  • Go to your Chrome shortcut, right click, select "send to desktop (create shortcut)"
  • The new shortcut will be named Google Chrome (2), rename this to Restore Last Session
  • Right click and select properties
  • At the end of the target field (....\chrome.exe"), leave a space and add --restore-last-session
  • Click Apply, then OK.

So now you have an easy way to get back all the tabs.

Note: It won't restore incognito windows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .