Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Jun 20 '11 at 8:51

This question came from our site for power users of web applications.

My answer might help. – Vinayak Feb 26 '15 at 21:58
up vote 9 down vote accepted

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.

share|improve this answer
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. – Ek Kosmos Jun 20 '11 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 '11 at 10:56
Yes, thank you. – Ek Kosmos Jun 20 '11 at 11:20
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 '11 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 '13 at 19:22

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"

share|improve this answer
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.. – Krishnabhadra Feb 1 '13 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 '14 at 1:50
2014 is here and this is still the right answer. – Hugo Apr 5 '14 at 13:35

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.

share|improve this answer

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.

share|improve this answer
Google seems to have removed this extension. – Von Feb 10 '14 at 1:49

You must log in to answer this question.

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