Check about:sessionrestore
If a session is lost, hopefully the restore pages open automatically, but if not go to about:sessionrestore in the location bar. Your page should look similar to this:
If this page is empty or the
is disabled, continue reading.Restoring from a backup file
- Open the Troubleshooting Information page by entering about:support in the Firefox address bar.
- In the Application Basics section, check the Distribution ID line.
- If it contains mozilla-MSIX, this means you are using the MSIX (Microsoft Store) Firefox version. In this case:
- Press +R on the keyboard. A Run dialog will open.
- Type in:
%LOCALAPPDATA%\Packages\Mozilla.Firefox
without pressing Enter. A list of an only folder will appear. - Click on the suggested folder. Then add:
\LocalCache\Roaming\Mozilla\Firefox\Profiles\ - Click . A window will open containing profile folders.
- Open the folder which name matches the ending of the Profile Folder line of the Application Basics section.
- Otherwise, click the
- If it contains mozilla-MSIX, this means you are using the MSIX (Microsoft Store) Firefox version. In this case:
- A file system view of your profile folder will show up.
- In the profile folder (for example, xxxxxxxx.default-release), if you scroll down a bit, you should see the sessionstore-backups folder.
- Make a copy of the sessionstore-backups folder.
- Shut down Firefox. Generally, you want to avoid file system operations (move, copy, delete) in this folder while Firefox is running. The copy of the unaccessed backups folder was necessary and should be safe.
- Move the file called sessionstore.jsonlz4 to another location (like your desktop). Moving rather than deleting is a precautionary step.
- Note: This file does not exist while Firefox is running.
- Navigate to the sessionstore-backups backup folder you made.
- Review the files in this folder by date modified (you can ignore their names, any file in this folder should be restorable). If the most recently modified file is particularly small compared to others, it may be mostly blank, and you'll want to use the bigger one.
- Copy your chosen file into the main profile folder. (Not the original sessionstore-backups folder, but the one above it.)
- Rename the file to sessionstore.jsonlz4.
- Start up Firefox.
- Open the Troubleshooting Information page by entering about:support in the Firefox address bar.
- In the Application Basics section, click the button in the Profile FolderProfile Directory line (shown below on macOS).
- A file system view of your profile folder will show up.
- In the profile folder (for example, xxxxxxxx.default-release), if you scroll down a bit, you should see the sessionstore-backups folder.
- Make a copy of the sessionstore-backups folder.
- Shut down Firefox. Generally, you want to avoid file system operations (move, copy, delete) in this folder while Firefox is running. The copy of the unaccessed backups folder was necessary and should be safe.
- Move the file called sessionstore.jsonlz4 to another location (like your desktop). Moving rather than deleting is a precautionary step.
- Note: This file does not exist while Firefox is running.
- Navigate to the sessionstore-backups backup folder you made.
- Review the files in this folder by date modified (you can ignore their names, any file in this folder should be restorable). If the most recently modified file is particularly small compared to others, it may be mostly blank, and you'll want to use the bigger one.
- Copy your chosen file into the main profile folder. (Not the original sessionstore-backups folder, but the one above it.)
- Rename the file to sessionstore.jsonlz4.
- Start up Firefox.
Conclusion
If you feel that you are more prone to losing your session – sessions with lots of tabs may fall into this category – or would just like insurance, the recommended extension Tabs Session Manager helps keep sessions safe.
Based on information from How to Restore a Browsing Session from Backup (reddit.com/r/firefox)