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.

Search Support

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

Mac How do I disable Restore Previous Session when firefox is closed?

more options

On my Mac (Sierra) How do I disable Restore Previous Session while firefox is closed? Alternately, how can I delete a tab from the list WITHOUT having Firefox open. A malicious message is locking up the browser.

On my Mac (Sierra) How do I disable Restore Previous Session while firefox is closed? Alternately, how can I delete a tab from the list WITHOUT having Firefox open. A malicious message is locking up the browser.

All Replies (3)

more options

There used to be an add-on that can stop those type of pages. But it is not compatible with the new browser.


A way out of the trap is to (force it if needed) Close Firefox. Wait about 20 seconds for Firefox to finish closing. Right-click on the Firefox icon and select Open New Window. +++++++++++++++++++++++++++++++++ Sometimes this works. If it opens, close it by Menu > File > Exit. This will flush out that web page from the Session Store.

more options

diveares said

Alternately, how can I delete a tab from the list WITHOUT having Firefox open. A malicious message is locking up the browser.

When you crash (force quit) Firefox to shut it down, of course, Firefox will attempt a crash recovery. When there is a site you want to avoid, you may need to modify a settings file or hide your session history files from Firefox so that it can't restore the unwanted page at the next startup. Here's how:

Step #1: Open the profile folder

Windows

Type or paste the following into the Windows Run dialog or the system search box, and press Enter to launch Windows Explorer into this folder:

%APPDATA%\Mozilla\Firefox\Profiles

You should see at least one semi-randomly-named profile folder there. (If you see more than one, you'll want to figure out which one has the unwanted session history in it by checking each one.)

Double-click into the profile folder.

Mac or Linux

Your Firefox profile folder would be accessible in a different way than on Windows. Please see these articles for information on how to locate it:

Step #2: Your Choice of...

Modifying a Settings File

At startup, Firefox will check whether to restore tabs automatically or show you a list so you can make your own selections. In the most recent versions of Firefox, you may need to click a button to see the list.

In your profile folder, locate the file named prefs.js and open it in a text editor -- if you are running Windows, make sure to right-click > Edit or right-click > Open Wish to avoid executing the script.

Paste this at the end and save the change:

user_pref("browser.sessionstore.max_resumed_crashes", 0);

When you save, make sure to avoid adding any formatting (save using a plain text format) or changing the file name (you don't want to end up with .txt on the end).

If you're not sure it worked, you could also do the next option.

Hiding Session History Files

This is less convenient if you want to restore some of your tabs, but if you don't care, you may prefer this.

  • Right-click the sessionstore-backups folder and rename it to OLDsessionstore-backups (later you can mine the files in this folder for any important tabs you want to restore)
  • Check for any files with these names and:
    • sessionstore.jsonlz4 - created by Firefox 56 when it shuts down normally - rename to OLDsessionstore.jsonlz4
    • sessionstore.js - created by Firefox 55 and earlier when it shuts down normally - rename to OLDsessionstore.js
    • sessionstore.bak - obsolete file from years ago - delete

When you start Firefox up again, it should just show the home page.

Success?

If you need to read the contents of any of those hidden files, you can use this tool on my websites to extract out a list of the tabs:

https://www.jeffersonscher.com/res/scrounger.html

more options

Oh, if you have Firefox set to restore your previous session windows and tabs at startup, it's probably best to hide all the session history files rather than changing the crash recovery settings.