How to configure Firefox to show a quit warning on exit - gHacks Tech News

How to configure Firefox to show a quit warning on exit

I have configured my version of Firefox to show the windows and tabs that I had opened the last time whenever I open it.

It is the most comfortable option for me, as I can keep sites open in the browser instead of having to save them as bookmarks. Plus, I can continue work without having to open sites again first.

While the browser's session restore feature is very convenient, some of you may only want to use it at times, but not all the time.

There is no option in Firefox to give you that choice when you close the browser, as Mozilla removed it in Firefox 5.

It is still possible to configure Firefox to warn you on exit, so that you can decide whether to keep the open tabs or start without session restore the next time you open it.

That feature requires some digging in Firefox's advanced configuration though.

Show quit message on exit in Firefox

quit firefox warning

The message above is displayed if you have configured Firefox to display a warning when you close the browser. You can use it to save and quit, which would load the open tabs the next time you start the browser, quit, which won't save the tabs and therefore also do not load them, or cancel to stop the closing.

So how do you get that message in Firefox?

  1. Type about:config in the browser's address bar and hit the enter key on your keyboard.
  2. Confirm you will be careful if a warning message is displayed to you.
  3. Search for the preference browser.showQuitWarning.
  4. Double-click the preference.

This sets the preference to true, which means that Firefox will display the quit dialog when you close the browser.

Note: The dialog is only displayed if you have configured Firefox to display the home page or a blank page. If you have configured it to display tabs and windows of the last session, it won't be displayed.

browser showquitwarning

You can undo the change at any time by repeating the four steps outlined above. This sets the preference to false and marks it as inactive as a consequence.

Setting the preference to true can be useful if you want to save session information at times, but not all the time. It is also preventing accidental closings of the browser as the prompt is displayed to you whenever you close the Firefox browser.


We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Previous Post: «
Next Post: »


  1. Lucky Limat said on February 11, 2014 at 2:51 pm

    Thanks for useful info.

  2. GiddyUpGo said on February 11, 2014 at 6:11 pm

    Firefox extension Tab Mix Plus does this and more…
    Have you tried this extension?

    1. Martin Brinkmann said on February 11, 2014 at 7:17 pm

      It is offering too much in my opinion. Great for users who need it, but not for me.

  3. Stan said on February 12, 2014 at 2:32 am

    It is not necessary to show that Quit Firefox message on closing it.

    You clicked to close Firefox, and have it set to open windows and tabs from last time. It will do just that.

    If you have it set in the General tab in Options, to “Show my windows and tabs from last time”, AND you have another Firefox window open and try to close it, you will get a warning box that says
    “You are about to close two tabs. Are you sure you want to continue?”
    and there will be a box to tick that says, “Warn me when I try to close multiple tabs”.

    If you’re really worried about loosing all your tabs, use the Session Manager extension.

  4. grateful said on June 7, 2014 at 1:21 am

    This is so useful if you’re in the habit of hitting ctl-Q (quit) when you mean to hit ctl-W (close window) just because of the cancel option!

  5. George P. Burdell said on April 24, 2015 at 2:27 am

    It appears that the subject Preference is still available in FF 37, but that it does not do what it used to do.

    The ground has shifted under this configuration option.

  6. Anonymous said on January 10, 2017 at 1:26 am

    thank u

  7. Anonymous said on August 1, 2017 at 9:25 pm

    It doesn’t work, I’ve tried it multiple times. Is there anything else I should try?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.