With Firefox 4 (and 5) the feature which asks if you want to save the tabs on exit/close is no longer active by default. This feature was great for me because I restart Firefox from time to time to refresh my RAM or just restart the machine and I don’t want to add everything in bookmarks or lose some tabs that I am intending to read/view later.

Solution

1. Open the about:config page by typing that in the Firefox’s address bar, then press Enter

About-config in the address bar

2. Agree to the warning screen by clicking the I’ll be careful, I promise! button

3. Locate the preference browser.showQuitWarning (type it or part of it in the filter on the top), if its value is false, double click on it and the value will change to true.

4. Repeat step 3 for the following preferences:

  • browser.warnOnQuit
  • browser.warnOnRestart
  • browser.tabs.warnOnClose

Now every time you close or restart Firefox it will warn you and ask if you want to save the tabs or not. You can modify these settings to your needs, by following the above steps (double click will set the values to false).

This is tested on Firefox 4.x and Firefox 5.x.