Firefox - Restore Previous Browsing Session

How to Restore Previous Browsing Session in Firefox

   Information
This tutorial will show you how to reopen the previous browsing session in Firefox from when it was last closed.





OPTION ONE

To "Restore Previous Session" On Demand in Firefox


1. While in Firefox, do step 2 or 3 below depending on if you have the Menu bar on or off.

2. Click/tap on the Firefox button, History, and Restore Previous Session. (see screenshot below)
Firefox_button.jpg
OR

3. Click/tap on History (Menu bar) and Restore Previous Session. (see screenshot below)
Firefox_Menu_Bar.jpg






OPTION TWO

To "Restore Previous Session" Automatically when Firefox Starts


1. While in Firefox, click/tap on Tools (menu bar) and Options. (see screenshot below)
Always-1.jpg
2. Click/tap on the General icon, under Startup select Show my windows and tabs from last time to the right of When Firefox starts, and click/tap on OK. (see screenshot below)
NOTE: The default setting is Show my home page.
Always-2.jpg


That's it,
Shawn



 
Last edited:
If FF crashes during close

On my PC, I run multiple profiles and use most of them on a daily basis (often several times per day).
Sometimes FF would crash during close (at least once/fortnight).

I suspect that a Flash Player vs NoScript interaction was the culprit.
I had Process Explorer open and I noticed that when I closed FF, Flash Player tried to start.
I think that maybe NoScript closed too early, which gave Flash a chance to start up (I often leave up to 100 tabs open).

When this happened, it was impossible to use the built-in Session Restore function.

Note:
I haven't seen this since FF 17 came out.
I'm using FF 18 now (fingers crossed). :)

If you notice that your previous session has been lost when you start FF and the tutorial instructions won't work, you may be able to save your previous session using Option 1 below.

Profile Information

Default Profile Location: "C:\Users\<user name>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile name>"
Default Profile Name: "<8 characters>.default" My default profile name is "rz7xuytc.default". Yours will be different.
Option 1 - Replace sessionstore.js with sessionstore.bak

You can replace sessionstore.js file with the sessionstore.bak file (you will lose any tabs that weren't Bookmarked).

  1. Go to the FF Profile folder
  2. Copy the sessionstore.js file and the sessionstore.bak to a new location (i.e. make a backup of those files)
  3. Close FF
  4. Delete the sessionstore.js file
  5. Change the name of the sessionstore.bak file to sessionstore.js
When you restart Firefox, your previous browsing session should be restored (not the session that just crashed, but the one prior to that).

Option 2 - Edit sessionstore.js

If you have opened lots of tabs (that you didn't bookmark) you can edit the sessionstore.js file to try and save your current session.

Note:

This option will only work if you notice that FF has crashed during close.

I run a script which allows me to choose which FF profile I want to run (I have multiple profiles) and when FF closes it runs CCleaner (to purge any leftover nasties) and then returns to my FF Profile menu.
I can tell when FF crashes, because the CCleaner notification doesn't appear.
  1. Go to the FF Profile folder
  2. Copy the sessionstore.js file and the sessionstore.bak to a new location (i.e. make a backup of those files)
  3. Close FF (most likely from the Task Manager)
  4. Edit the sessionstore.js file (see Editing below)
When you restart Firefox, your previous browsing session should be restored (the session that just crashed).

Be aware that this doesn't always work for me (50% success rate).
It's possible that I added syntax errors during the editing. :cry:

Editing
I discovered (through experimentation) that I could edit the sessionstore.js file to restore the lost session.

At the very end of the sessionstore.js file you will see something like this:"session":{"state":"running", <data/text to end of file>
For example:
"session":{"state":"running","lastUpdate":1358472611761,"startTime":1352630698661,"recentCrashes":0},"scratchpads":[]}

You need to replace the above with this data from the sessionstore.bak file:"session":{"state":"stopped", <data/text to end of file>
For example:
"session":{"state":"stopped","lastUpdate":1358349460055,"startTime":1352630698661,"recentCrashes":0},"scratchpads":[]}

You should use an editor that can highlight JavaScript syntax (Notepad++, Dreamweaver, etc.).
That will allow you to see if you accidentally added any syntax errors (e.g. deleted a bracket).
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
n/a
OS
W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
CPU
AMD Phenom II x6 1100T, 3.3 GHz
Motherboard
ASUS M4A88T-M/USB3 (AM3)
Memory
12GB DDR3 1333 G-Skill (4GB x 2), G-Skill (2GB x 2)
Graphics Card(s)
NVIDIA GeForce GTX 660
Sound Card
Realtek?
Monitor(s) Displays
Samsung S23B350
Screen Resolution
1920x1080
Hard Drives
WD Green 2TB (SATA), WD Green 3TB (SATA), WD Blue 4TB (SATA), WD Blue 6TB (SATA)
PSU
Cooler Master
Case
Antec GX300 Tower
Cooling
3x Antec TRICOOL 120mm Fans
Mouse
Wired Optical
Internet Speed
DSL
Antivirus
Avast
Browser
Pale Moon (64 bit)
Other Info
2018-12-27 Upgraded HDDs
2015-12-10 Upgraded case, graphics card, storage
2015-08-15 Upgraded motherboard & RAM
2015-07-15 Upgraded LM17.1 to LM17.2
Back
Top