How to Stop Firefox From Opening Last Session

If terminated unexpectedly, the Mozilla Firefox browser is configured to restore up to 10 of the tabs, and the last three windows. While restoring the last session can be convenient at times, it can be annoying if it happens every time you open the browser. 

These settings may also compromise your privacy as they will keep you logged into the sites you had previously signed into. This is particularly the case for a computer that is used by several people. Throughout this guide, you will learn the circumstances under which the browser restores your previous session. 

Learn why you need to deactivate the restore last session settings on your Firefox browser. The guide also describes several methods that may be used to stop Firefox from opening the last session. 

How to Stop Firefox From Opening Last Session

Method 1:Reconfigure the Restore Session Settings 

Launch the Mozilla Firefox browser on your desktop, and then type about:config into the address bar on the browser before pressing the Enter Key. You may get a warning prompt following this operation, just click on the ‘Accept the Risk and Continue’ button to open the Configuration Editor window. 

Now type browser.sessionstore.resume_from_crash into the search field on the Configuration Editor and then press Enter. Click on the toggle button on the grid that comes up to change the selection. Use the toggle to change the selection from browser.sessionstore.resume_from_crash default boolean true to browser.sessionstore.resume_from_crash user_set boolean false.

Once done, close the Configuration Editor window, and restart the Firefox browser to check whether the previous session is still reopening. 

Method 2:Clear the Profile Folder 

For added privacy and security, you may need to clear the contents of your Firefox profile folder. Check to see whether you have the user.js file in your Firefox profile folder. It is this file that sets the browser session restore feature to either a true or false state. 

The information found in this folder is used by the built-in Session Restore feature, enabling you to start from where you left off if the browser restarts. Since you will not be needing the information in this folder anymore, you can as well delete it. 

Click on the Help button on your Firefox browser, and then navigate to Troubleshooting Information> Profile Directory. The procedure thereafter depends on the operating system you are using, as illustrated below:

In Windows

If you are using the Firefox for Windows browser version, select the ‘Show folder’ option. Having located the folder, select its contents and delete them. Thereafter, you need to click on the three-bar menu button, and select Exit (the Power Button Symbol) to close the browser.

In Linux

From the Profile Directory settings, select ‘Open Directory’. Clear the contents of this directory before closing the browser. To close the browser, navigate to File> Quit. 

In Mac 

From the Profile Directory menu, select the ‘Show in Finder’ option. Clear the contents of your profile folder and then navigate to Firefox> Quit Firefox to close the browser. 

Method 3:Reconfigure Your Preferences on the General Panel 

The General panel on your Mozilla Firefox browser allows you to customize such things as what pages the browser displays when launched. You may also use this panel to customize the Firefox tabs settings to your specific needs. 

The following steps will help you stop Firefox from opening the last session when launched: 

Step 1: Launch the Firefox browser on your computer and then click on the three-bar Menu icon towards the top-right corner of the window.

Step 2: Now click on the General option from the left lane of the window. The next step will depend on the version of Firefox you are using. 

Step 3: In older Firefox versions, you only need to uncheck the checkbox adjacent to ‘Restore Previous Session’. In later Firefox versions, you need to navigate to the ‘When Firefox starts’ section and click on the selection to expand the drop-down menu. 

Select the appropriate option from this drop-down menu depending on what you would like the browser to display when launched, as follows:

  • Show my home page: Configures Firefox to open the preset home page whenever it is launched. If you choose this option, you need to set up the homepage accordingly. 
  • Show a blank page: If you select this option, the browser will be displaying a blank page whenever you launch it. 
  • Show my windows and tabs from last time: This selection tells the browser to reload your previous browsing session when launched. Since you need to stop Firefox from opening the last session, you should avoid this option. 

Once you are done, close the Options menu and then restart the Firefox browser to check whether the issue has been resolved.

How to Disable Firefox Previous Session Restore in Ubuntu or Debian 

If you are using the Firefox browser on Debian or Ubuntu distribution, you can still disable the Previous Session Restore feature. To do this, you need to manually run the following script: 

Step 1:Create a New Shell Script File 

You can create a new shell script using any of your preferred text editors, such as Gedit. In this regard, you need to open the text editor, and then type the following command into the blank editor window:


Whereby USER is your user name on the system. Alternatively, you could just replace the “/home/USER” part with “~”. 

Step 2:Save The File 

To save the file you just created, click on File, and then select the ‘Save As’ option. Name the file ‘’, When prompted to do so. Next, click on the ‘Save in folder’ option, and then select Desktop from the drop-down menu. 

Step 3:Assign Execution Permissions to the Script File 

At this point, you need to assign the appropriate permissions to the file you saved in step 2. This makes it possible for the file to be executed/run on your computer. To do this, right-click on the file and select Properties from the context menu. 

Navigate to the Permissions Tab, and check the checkbox next to the “Execute: Allow executing this file as program” option. Close the window and use the following step to execute the file. 

Step 4:Run the Script File 

Finally, find the on your Desktop and double-click on it to run it. This should stop Firefox from opening the last session in Ubuntu or Debian operating systems. 

When Does Firefox Restore the Last Season? 

By default, Firefox is configured to restore up to 10 browser tabs that were open just before it was terminated. There are several scenarios under which the Firefox browser will automatically restore your previous browsing session, including: 

When You Have Selected ‘Restore Previous Session’s From the Menu 

If your Firefox browser is automatically loading the previous session every time you open it, the ‘Restore Previous Session’ Setting is enabled on the browser. To get the previous session back on your browser, click on the three-bar Menu button on the Mozilla Firefox browser—towards the right side of the toolbar. 

Next, you need to select the ‘ Restore Previous Session’ option. This should automatically reload the tabs that were open when the browser was last terminated. 

Restarting the Browser with Add-ons Disabled 

If you need to troubleshoot the Firefox browser for problems, you need to use the Safe Mode. This operation will automatically Disable all the Add-ons on the Firefox browser. In such a case, Firefox will automatically reload the last session the next time the browser is launched. 

Following a Crash 

Though designed to offer enhanced stability and reliability, the Firefox browser may crash from time to time. This may be caused by issues on the website you are trying to access, accidental power loss, or even a software problem. In either case, the browser will be forced to terminate unexpectedly.

Following such a Crash, the browser will automatically reload your previous browser session the next time it is launched. If the browser happens to crash for a second time, you will get a ‘Firefox – Restore Previous Session’ prompt the next time you launch it.

In such a case, you should click on the ‘Restore Session’ button, if you wish to reload the tabs that were open when the browser crashed. If you would rather start a new browsing session, just click on the ‘Start New Session’ button on the notification window. 

Following a browser Update 

The Firefox browser may also reload your previous session following an automatic browser update. After downloading and installing the necessary Mozilla Firefox browser Update files, you will be required to restart the browser for the update to take effect. 

Once you have restarted the browser, Firefox will automatically reload your previous browsing session. 

When the Browser is Configured to Restore Previous Session at Startup 

Your Firefox browser may be reloading the previous session because it is configured to do just that at Startup. By default, the browser is configured to open a single tab, displaying the specified homepage. However, it may also be reconfigured to reload the previous session every time the browser is launched. 

To stop Firefox from opening the last session, in this case, you need to configure your Firefox settings accordingly. 

Why Should You Stop Firefox From Automatically Reloading Previous Session? 

If enabled, the automatic ‘Session Restore’ settings on the Firefox browser will keep you logged into the sites you had signed into before the browser was terminated. If another person was to launch the Firefox browser after you, they would have access to your account(s) on those sites. 

Then there are those nefarious plugins or extensions that are designed to take advantage of such a scenario to collect personal data. Other than that, it can be very annoying to have to close the previous session tabs every time you launch the Firefox browser. 

To prevent Firefox from opening the last session at startup, you need to disable the ‘Session Restore’ crash recovery feature on the browser. 

How to Disable Automatic Previous Session Restore on Firefox 

The various Mozilla Firefox versions, whether for Windows, Android or Mac, allow you to configure how the browser looks and works. For instance, it allows you to stop the browser from reloading your previous browsing session after every reboot. 

Then there is the ‘Session Restore Crash Recovery’ feature that is enabled on Firefox browsers by default. This one needs to be Disabled manually, as described later in this guide. To do this, you need to reconfigure the appropriate settings in the Firefox Advanced settings. 

Discussed below are some of the methods and steps you can use to achieve this: 

Final Verdict 

The Previous Session Restore feature on the Mozilla Firefox browser is designed to automatically reload the previously closed windows and tabs following a crash or update. This feature may be disabled manually, as described earlier in this guide. 

Whether you are running Windows, Mac, Ubuntu, or Debian operating system, this guide will help you stop Firefox from opening the last session at startup.