Session Restore is a useful feature in Firefox that remembers certain information about your previous browsing session so that you can continue work right where you left off the last time.
The feature saves open windows and tabs, the size of each window and its position on the screen, as well as all text that you have entered in forms in any of the open tabs.
When I look back, I can think of a couple of occasions where Session Restore failed to restore the previous session on my system. It was my fault sometimes, for instance when I disabled the "remember my browsing and download history" option in the browser's preferences. At other times it was the browser's fault.
I was in shock whenever that happened as I thought that I lost all of the open tabs in the browser. While I only have about 50 or so open at all times, I have usually not bookmarked the tabs which means that most of the information are lost for good.
What many Firefox users do not know is that Firefox saves two files with Session Restore information to the user profile:
Restoring the Firefox session
Once you have backed up both session files, you can start to investigate the issue and try to restore the previous session.
First thing you may want to do is compare the size of the sessionstore.js and sessionstore.bak file. If either file has a size of 0, it is empty and not usable anymore.
With Firefox closed down completely, open one then the other file in a text editor of choice. It should display session information in text form. If you see corrupt text or no information at all, it is clear that the Session Restore file is corrupt and not usable anymore.
You can still try and extract web addresses from it if some information are still displayed in it. This may allow you to recover at least some websites that you had open previously.
Before you do so, try deleting the broken sessionstore.js file and rename the sessionstore.bak file to sessionstore.js.
This attempts to restore the browsing session from the backup. Note that it does not include tabs, windows or forms that you have opened in your last session, and that it may include tabs, windows or form data that you have closed in the previous session.
Where the Session Restore files are stored
The browser stores the sessionstore.js and sessionstore.bak file in the user profile directory.
Firefox 33 changes
Mozilla has improved the Session Restore feature in Firefox 33. The core changes are as following:
Recovering the session with help of the backup session file should work if the main file has been corrupted. It may not help you directly if a Firefox setting prevents the browser's Session Restore feature from working correctly.
You can however still open the file in a text editor to extract the information manually from it if they are still listed in the main or the backup file.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.