If you have this problem:

1) You have set the option in Mozilla Firefox to open all of your tabs automatically, each time the browser starts,
2) You do not see the warning “You are about to close n tabs. Are you sure you want to continue?” when you try to close the Firefox window (intentionally or by accident), and
3) You do not want Firefox 3.0 to ask you each time you close it, if you like to save or not save your browsing session, but save the session automatically,

…then you can jump straight to the solution!

But if you are curious about the details, you may continue to read below! :-)

A short introduction

Firefox 3 is by far the best browser I know!

It is secure, it supports Web standards and CSS 2.1 (and now, CSS 3, too!), it is fun to use, it has a built-in Session Saver (when you close Firefox with all of your opened tabs, it can re-open them next time you start it), and there are a variety of very useful add-ons (extensions) made for it, which extend its functionality and make it even better!

(NOTE: Firefox 3.5 was released on June 30th, 2009, but I will wait maybe a couple of more weeks, before upgrading to it, because still some very useful add-ons for Firefox 3.0 are not yet upgraded to be compatible with version 3.5.)

When I made the switch from Firefox 2.0 to Firefox 3.0, one thing puzzled me, though: the standard warning, when you close a Firefox window with more than 2 tabs open — it has disappeared… well, in a way, at least!

Firefox close all tabs warning

Firefox 2.0 » Firefox 3.0

As you (probably) know, Firefox can automatically save your browsing session, when you close it. This means, when you close the Firefox window, all tabs that you have open inside it, will be re-opened next time you start it again. This is controlled via an option, found in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time” [screenshot].

So, in Options, if you select “When Firefox starts: Show my windows & tabs from last time”, you can safely close Firefox, and next time it starts, it will restore your browsing session — for this to work, though, you must have all tabs opened inside one window, or else, only the last window that you have closed will have its tabs re-opened on next startup.

You can also decide if you want your tabs re-opened, each time you close the Firefox window. In this case, you can de-select “When Firefox starts: Show my windows & tabs from last time” and instead, choose “Show a blank page”. Then Firefox 3 will ask each time you try to close it, what do you prefer: your session saved, or not.

But if you’re like me, then you may prefer all opened tabs to be saved automatically, and without any questions upon closing Firefox. In this case, you will select “When Firefox starts: Show my windows & tabs from last time” in Options and the dialog “Save and Quit?”, “Quit?”, “Cancel?” will not be shown when you close the Firefox window.

There’s one problem, though.

Firefox 3.0 will not warn you when you close a window with multiple tabs!

Well, this is not exactly true. It will not warn you, when several conditions are met:

1) In Tools > Options > Main > Startup, you must specify the option “When Firefox starts: Show my windows & tabs from last time” (this is pretty common, especially for people who upgraded from Firefox 1.5/2.0 > 3.0, because most users prefer to re-open all tabs automatically, when they start Firefox), and…

2) You are closing the last open window of Firefox. (I prefer have all of my tabs opened inside one window — thus, when I close Firefox, all my tabs inside this window will be re-opened. But let’s suppose, you have two windows open, inside each window there are several tabs. When you try to close the first window, Firefox will warn you. When you try to close the second one, it will not warn you.)

The strangest thing is that the warning “You are about to close n tabs. Are you sure you want to continue?” will not appear, in this case, no matter what is the setting that you have specified in Tools > Options > Tabs > “Warn me when closing multiple tabs” [screenshot]!

In Firefox 2.0, when you try to close a window with multiple tabs open, and if you have checked the option in Tools > Options > Tabs > “Warn me when closing multiple tabs”, Firefox will always warn you, before you close the window, no matter if the window you are about to close is the last (and only one), or if you have set the option in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time”.

In Firefox 3.0, when you try to close a window with multiple tabs open, and if you have checked the option in Tools > Options > Tabs > “Warn me when closing multiple tabs”, Firefox will warn you, before you close the window, only if you have specified “Open my home page” or “Open a blank page” in Tools > Options > Main > When Firefox starts (it will present you with the dialog “Save & Quit”, “Quit”, “Cancel”)… But if you have specified there “When Firefox starts: Show my windows & tabs from last time”, then Firefox will not warn you, but will silently close all tabs!

And this is intentional (as of Firefox version 3.0), because, as far as I know, there were several bugs logged in this regard (including bug 419009, “Warning if closing multiple tabs is not working”), but the functionality remained the same! If the user has specified “When Firefox starts: Show my windows & tabs from last time”, then, when closing Firefox, all of his tabs will be automatically restored, and there’s no data loss. But the user might close Firefox by accident, and in this case, there’s no way for him to be warned! And the option “Warn me when closing multiple tabs” was supposed (in Firefox 2.0) to fix just that: accidental closing of all of your opened tabs! But it’s gone in Firefox 3.0: now you can’t be warned before you close Firefox, if you have specified all of your tabs to be restored automatically, when Firefox starts!

Some claim that there’s an easy “fix” for this: The user is supposed to select “Show my home page” or “Show a blank page” in Tools > Options > Main > Startup, but in this case, Firefox will ask each time it is closed, if you want or do not want to save all of your tabs! (And this is something I don’t need — I want Firefox to open all of my tabs automatically, without asking!) Also, in this case, you might also accidentally click the wrong choice and have your session deleted (if you select “Quit” instead of “Save and Quit”).

I have searched for a true workaround for a long time. I wanted:

1) Firefox to automatically save all of my tabs & re-open them next time it starts, inside one window, and
2) I wanted to be warned, when I try to close the Firefox window.

I think I have found a very good (almost perfect)…

Solution to the problem

You will need to install one Firefox add-on first — “Tab Mix Plus”; it currently works for Firefox 3.0/3.5, and can be downloaded from here:

https://addons.mozilla.org/en-US/firefox/addon/1122

I will also recommend you to install the “Session Manager” addon, which works for FF 3.0/3.5:

https://addons.mozilla.org/en-US/firefox/addon/2324

(Session Manager will complement the other add-on pretty well, but this step is not required.)

In Tab Mix Plus, there’s an option which can restore the default behaviour of Firefox, when you try to close it!

To activate it in Firefox, go to Tools > Tab Mix Plus Options > Events > Tab Closing > “Warn me when closing multiple tabs”. If you check this option, then Firefox 3 will act as before: If you have multiple tabs open, and try to close the Firefox window, it’ll show you the standard warning “You are about to close n tabs. Are you sure you want to continue?”.

And you’ll see the warning, even if in Tools > Options > Main > Startup: “When Firefox starts: Show my windows & tabs from last time” is set!

That’s it! :-)

Final notes

— In Firefox options, I have set Firefox to remember my opened tabs session automatically, when I close Firefox. I open all tabs inside one window, so for me this option works very well: If I try to close the window with all opened tabs, Firefox now gives me a warning, as I expect. If I try to close the window by accident, I can click on ‘Cancel’ and if I really want to close it, then I select ‘Close Tabs’ and next time Firefox opens, all of my tabs are restored!

— For added “extra security”, I have also installed Session Manager add-on (see download link above). So in the rare case that I will close one Firefox window with some tabs open and then will see that in the background, there was one more window open (this may happen sometimes), I can still recover my session with all opened tabs, using the Session Manager — I can simply revert then to a previous backup session, using Tools > Session Manager > Backup Sessions [screenshot].

— I have tested this on Windows XP SP3, Firefox 3.0.12 and Tab Mix Plus 0.3.7.3, and it works as described. Only remember that Firefox will not give you a warning, if you try to close it using File > Exit (in this case it will silently close, but still reopen all of your tabs next time, if you have specified this in Options). But if you try to close Firefox window using the standard Windows shorcut (Alt+F4) or if you click on the close button on its window (top right), the warning will appear.

— I do not know what is the default behaviour of Firefox 3.5, when closing (and I did not test Tab Mix Plus with FF 3.5.x, too). I may update this article in the future, if needed. A reader just confirmed that the bug exists in Firefox 3.5.x, too (thanks, iffi!:-) and that the latest version of Tab Mix Plus fixes the bug in FF 3.5, as it does in FF 3.0. That’s good to know!

— Tab Mix Plus add-on has much more options, but I needed just the warning on closing multiple tabs; feel free to explore all of its other features, though! :-)

I hope this information will be useful to other Firefox users, too!

Also, feel free to leave any comments and notes you may have — I always appreciate constructive feedback and discussion!

UPDATE (2009/08/08): I can confirm that this fix works with latest Firefox 3 (3.0.13) and Firefox 3.5 (3.5.2).

4 thoughts on “Firefox 3.0/3.5 doesn’t warn when closing multiple tabs (a solution)

  1. You will need to install one Firefox add-on first — “Tab Mix Plus”; it currently works for Firefox 3.0/3.5, and can be downloaded from here:

    You actually have to get the dev-build version for Firefox 3.5, as the the add-on site’s version is for “2.0 – 3.1b2pre”.

  2. @Craig:

    You are right, thanks for the note!

    But I hope, meanwhile, that the add-on’s “official” version will be updated quite soon, to work with Firefox 3.5.x! For now, though, I am with FF 3.0.12 & Tab Mix Plus 0.3.7.3 — there are some other very useful extensions, that don’t have updated FF 3.5-compatible versions, and this is the reason why I still did not upgrade to 3.5.

  3. I was having the same problem. I changed my: Tools>Options>Privacy Tab settings from Never Remember My History to Use Custom Settings For History, then unchecked the ‘Remember’ boxes. Now I get the warning message when closing multiple tabs.

  4. @3lions:

    There’s no point to not remember History in Firefox (as a workaround). The solution which requires simply to install an addon (Tab Mix Plus) and configure it, works much better, I think… :-)

Leave a Reply

Your email address will not be published. Required fields are marked *