Have you been browsing in Firefox when the software crashed, and now you can’t restore your session? We understand; Firefox is one of the best-known web browsers in recent times and losing tabs you had open can be demoralizing. Luckily, the browser does its best to help you continue where you left off. Moreover, there are third-party add-ons that can save your session as an additional backup. While you can’t use them after the disaster, they can be a valuable failsafe in the future. With that said, we will immediately dive into how to recover a Firefox session.
1. Use the automatic Firefox session recovery feature
We mentioned that the browser works hard to assist users during abrupt reboots, system crashes, or accidental software quitting. To clarify, Firefox will preserve your current session in memory, as long as the tabs are opened in the regular window, meaning not a Firefox Private Browsing one. If it does not load immediately, you can manually quit the window via the Quit Firefox option. Reopen Firefox to see if the tabs in a window are back.
2. Restore a previous Firefox session manually
We understand that sometimes Firefox doesn’t do what it should. Luckily, it saves profile session history behind the scenes and lets you restore it manually. Here’s the procedure to manually recover a session in Mozilla Firefox:
- Click the three-line menu button in the top right corner.
- Click the Restore Previous Session item.
- Confirm the decision by clicking the option with the same name.
- The window with your last browsing session should open in a new window.
Enable restore previous session feature
If nothing is happening so far, we suspect that you may have disabled the feature in Firefox or that you were not logged in to a specific profile. The best way of checking whether you can open a previous Firefox session is:
- Click the menu button with three lines in the top right corner.
- Select Settings.
- Go to the General tab on the left-hand side. As a shortcut, you can also type about:preferences in a new tab.
- Find the “Startup” section and make sure there’s a checkmark in front of the Open previous windows and tabs option. It may also be named Save previous session.
Turn on Firefox crash recovery via a hidden setting
The crash recovery feature may also be disabled using advanced methods. Enabling the Firefox crash recovery feature via the Config page works like this:
- Type about:config in the address bar.
- Use the filter box to type browser.sessionstore.resume_from_crash and double-click it.
- That should change the setting from false to true or from true to false. Even if previously enabled, this will refresh it. To clarify, it should look like this: browser.sessionstore.resume_from_crash default boolean true
- Close the browser and restart it to see if the Firefox session window appears.
3. See session tabs via the Firefox Library and History features
The fact you cannot restore the recently closed window doesn’t mean all hope is lost. Unless you used the Firefox Private Browsing window, the browser will store a list of tabs via its History and Library features. We already demonstrated recovery of Firefox history. Keep it open since you’ll need it for the next method. In short, you can do one of the following:
- Click the menu bar in the upper right corner → Go to History → Select Recently Closed Windows → Pick Recently Closed Tabs if you need specific tabs.
- Pick the Library toolbar button → Select History → Choose the Recently Closed Windows tab.
Both features depend on the Firefox profile data we will mention above. Thus, if they are missing, the problem is that the browser will only load the most recent one, which may be empty. However, the browser also saves the last few sessions, usually the second and another one. We will teach you how to switch them around next.
4. Using Firefox profile data to view and read sessions
This is the point where things get less user-friendly because you must dig through your computer’s storage to find files that contain your session information. However, these cannot be opened in text editor software. We explain two ways to reading that data shortly.
Finding Firefox user profile data for sessions
Refer to the Firefox history guide we pointed out above for extra information if you need to. However, the abridged version is to do one of the following only if Firefox is still open:
- Click the three-line menu.
- Go to the ? button.
- Select Troubleshooting Information.
- Choose Help, then Troubleshooting Information again.
- Type about:support in the address bar and go to that page.
You can now click the Open Folder (Windows and Linux) or the Show in Finder buttons. Note the file path under profile names. If Firefox is closed, open your Windows Explorer or chosen file explorer on Linux. Then, go to:
- ~/.mozilla/firefox on Linux
- %APPDATA%\Mozilla\Firefox on Windows
You will now see profiles.ini, installs.ini, and randomly named folders such as j1hcxbyk.default-release or other profile names. Open them, and you’ll see the files we explained in the history guide such as:
- recovery.jsonlz4 — Your current session/last session
- recovery.baklz4 — The backup of the last/current session
- previous.jsonlz4 — The session before the last one
- upgrade.jsonlz4.ID-of-Firefox-Build — A session active before the last software update
Restoring Firefox session data files
Now you have a list of one to three last sessions. Although recovery.baklz4 should be a backup of recovery.jsonlz4, it doesn’t hurt to:
- Rename recovery.jsonlz4 to something like recovery.jsonlz4-old.
- Rename recovery.baklz4 to recovery.jsonlz4.
- Start Firefox again and see if the session is back.
If that doesn’t work, close Firefox again, then repeat step 1, then instead of step 2, do this:
- Make backups of previous.jsonlz4 or upgrade.jsonlz4.ID-of-Firefox-Build by adding -old at the end.
- Rename previous.jsonlz4 to recovery.jsonlz4. Start Firefox to see if you rescued the session.
- If you didn’t, revert the name change. Now rename upgrade.jsonlz4.ID-of-Firefox-Build to recovery.jsonlz4 and launch Firefox again if you want to go back to the time before the last Firefox update.
Browsing Firefox session data files (optional)
The method above forces you to restore a session to see which tabs were active. That can be time-consuming and may mess up your session. If you get in the habit of making manual backups through renaming so Firefox can generate new files, we have better solutions. Since the session restore format in Firefox is compressed and unreadable, you can view it via:
- An online Firefox profile session preview lz4json scrounger tool
- A GitHub (or similar) application that can decode a lz4json file compression
Both let you preview your session file before you import it.