This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Buscar en Ayuda

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox remembers closed windows and opens them when no tabs left on main window

  • 5 respuestas
  • 10 tienen este problema
  • 1 visita
  • Última respuesta de cor-el

more options

It's a rather weird issue, and I would expect others to have the same issue unless for some reason Firefox is behaving differently for me... It has annoyed me for quite some time, so now I'm finally [being unlazy and] reporting it.

Steps to reproduce:

  • 1. Use option "when Firefox starts: show windows and tabs from previous session".
  • 2. Use a lot of tabs (i.e. in your main window).
  • 3. Sometimes, something opens in a pop-up window (i.e. without tabs, buttons, ... and with a disabled URL bar) which you close later, and continue working in your main window.
  • 4. Close Firefox, restart Firefox, and it remembers your main window with your tabs. It does NOT open the other window(s) that I temporarily used (they are supposed to have been closed permanently).
  • 5. In your main window, close all your tabs.
  • 6. Close Firefox, restart Firefox, and suddenly all the pop-up windows that I temporarily used, re-appear. This can be a LOT of windows. One of them, Firefox re-uses as your "main window", while the rest remain pop-up windows.

What I then (have to) do is close the tab in the "main window" (so the window is forgotten next time I restart Firefox) and close all other pop-up windows. And then repeat this for each window until I finally got rid of all these windows.

I have no idea how to really close such pop-up windows and make Firefox forget them so they don't re-appear.

Thanks in advance if anyone can help me.

It's a rather weird issue, and I would expect others to have the same issue unless for some reason Firefox is behaving differently for me... It has annoyed me for quite some time, so now I'm finally [being unlazy and] reporting it. Steps to reproduce: * 1. Use option "when Firefox starts: show windows and tabs from previous session". * 2. Use a lot of tabs (i.e. in your main window). * 3. Sometimes, something opens in a pop-up window (i.e. without tabs, buttons, ... and with a disabled URL bar) which you close later, and continue working in your main window. * 4. Close Firefox, restart Firefox, and it remembers your main window with your tabs. It does NOT open the other window(s) that I temporarily used (they are supposed to have been closed permanently). * 5. In your main window, close all your tabs. * 6. Close Firefox, restart Firefox, and suddenly all the pop-up windows that I temporarily used, re-appear. This can be a LOT of windows. One of them, Firefox re-uses as your "main window", while the rest remain pop-up windows. What I then (have to) do is close the tab in the "main window" (so the window is forgotten next time I restart Firefox) and close all other pop-up windows. And then repeat this for each window until I finally got rid of all these windows. I have no idea how to really close such pop-up windows and make Firefox forget them so they don't re-appear. Thanks in advance if anyone can help me.

Modificadas por SPQRobin el

Todas las respuestas (5)

more options

Strange. By default, Firefox remembers up to 3 closed windows. After restoring your session, if you go to

History > Recently Closed Windows

you should see up to 3 entries. But they should never open automatically on their own, because in your session history file (sessionstore.js) they should be marked as closed.

If no one else has any suggestions for what might be going on here, I'll propose some "before and after" tests you could conduct with various files. (I have to think about the procedure before writing it out.)

more options

In your steps #4 and #6, how are you closing Firefox? For example:

  • orange Firefox button or File menu > Exit
  • click red X on the last window (approve closing all tabs if needed)
  • right-clicking Windows Task Bar button > Close All Windows.

In your steps #5 and #6, when you close all the tabs in your main window, doesn't Firefox exit automatically, so you wouldn't need to do #6? If not, could you mouse over or click the Firefox icon on the Windows Task Bar to see whether other windows remain open somewhere hidden?

more options

Which security software (firewall, anti-virus) do you have?

It is possible that your security software is restoring an older copy of the sessionstore.js file.

Are there any numbered files sessionstore-##.js files present in the Firefox profile folder?

You can use this button to go to the Firefox profile folder:

  • Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
more options

I always close Firefox using the red X button. It doesn't ask me to approve closing all tabs, since I use the option "when Firefox starts: show windows and tabs from previous session".

In #5, I close all tabs so I have only one empty "new tab" open, i.e. Firefox is still running but without any real tabs left, and *then* I close Firefox. There aren't any windows other visible, they only re-appear when re-starting Firefox in #6.

I use Firefox on my laptop and desktop and use Firefox sync (I have the issue on both). I use default Windows firewall settings, use Microsoft Security Essentials on my desktop and no anti-virus on my laptop.

There's only one sessionstore.js on both computers.

more options

It is usually best to get used to using the Firefox > Exit menu entry to close Firefox. That is the preferred way and only use the close X if you want to close a specific window when multiple windows are open. The menu item ensures that Firefox gets closed properly where the close X can possibly fail in some cases when a plugin is active or globally installed extensions possibly added by security software are present.

Note that if you close tabs or windows and immediately close Firefox that it is possible that those latest changes aren't saved to the sessionstore.js file, so you can try to wait at least 15 seconds before closing Firefox after having closed a lot of tabs/windows.