Recouping a lost Firefox Browsing Session

If there’s one thing that really pisses me off is when you have multiple windows with a plethora of tabs opened (during a research binge), when all of a sudden Firefox crashes and then, upon restart, nada!  Lately, Firefox seems to crash more and more upon closing down –at least during pre-4 versions.

Apparently Firefox 4 now has a GUI option to do the same (a feature implemented incredibly late), but here’s how I’ve dealt with the problem. Keep in mind this only works for the first run after Firefox has failed to recoup the previous session; Don’t shut Firefox down –or you’ll overwrite your backup session, contrary to some advice on the Net! Keep Firefox running, until you’re to terminate it –as noted in the instructions below. Proceed under your own responsibility.

  1. Locate your Firefox Profile folder (on OS X: ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default). xxxxxxxx will vary from user to user.
  2. Copy sessionstore.bak to somewhere “safe” (out of your Profile), such as your desktop.
  3. Now, and only now should, you shut Firefox down.
  4. Back at the desktop, rename the newly copied sessionstore.bak to sessionstore.js (this file should be the backed up session you’re trying to salvage)
  5. Still at the desktop, copy sessionstore.js over to Profile (see 1.) Note: *NIX command line [cp] deletes the target file so; If your system/utility behaves differently than cp, first delete the target file before copying the file over.
  6. Start Firefox.

With any luck, you’ll get a window prompting you to accept either a fresh new session (don’t select this) or to restore the lost session (choose this). I believe it also sometimes just kicks into the salvaged session.

Note: some people like to copy their Profile before any hacking. I’ve never seen the value to this, but then again I’ve almost always had the common sense to run UNIX based systems (and my nickname is not “butterfingers”). On the other hand, you should probably follow this advice if you run Windows. In any case, you’ll have a backup of sessionstore.js (sessionstore.bak) on your desktop, with the procedure above (although this does not take take of passwords and bookmarks).

If you’re savvy, you should be able to make a script to do this auto-magically, but I’ll leave this for the initiated. In any case, if you’re using version 4, there’s no need for a script (see above).

Maurice Cepeda

All rights reserved on the article, defined as the text and any original material and medium –including photographs when specifically mentioned in at least one of the following corresponding elements: caption, alternate text, or title. Quoted texts, and other material not copyrighted by Maurice Cepeda, are used under the concept of fair use and are the properties of their respective owners –including photographs, audio recordings, videos, or any other products in any form or fashion– as are all brands mentioned. If copyrighted videos and/or audio recordings should make themselves into articles, note that they are not hosted herein; if you are the copyright holder of any such material (and have a problem with fair use), approach the appropriate hosting site. Note that any audio or visual material incorporated under fair use, either hosted locally (if that should come to be) or otherwise, will most likely be of lesser quality, thus, “fair use”. By reading this article, the reader forgoes any accountability of the writer. The reading of this article implies acceptance of the above stipulations.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s