Saturday 2 January 2016

Firefox's session managers strikes again, 50+ open tabs lost!



... but read on for a quick and dirty solution ...


New day, new gripes, but here’s a common one, Firefox’s session manager. Well it has improved a lot over the years, so much so that when my browser was eating 2GB and running like treacle due to what seemed like an extension memory leak, I turned off all extensions and then re-enabled the essentials one, I didn’t turn on the Session Manager extension, and trusted Firefox’s built in one.
 
Obviously one day the browser crashed and I restarted it as I had done several times, and expected it to offer me the option of opening the previously open tabs. For whatever reason it didn’t happen, I just ended up with a single tab. Restarting the browser again, hoping that it would pick the old session, was a mistake. I now had a backup copy that only had a single tab in it.

So this is point at which restoring old session store files etc. has all failed. Problem was that looking at the session.js file (found in the directory C:\Users\furbian\AppData\Roaming\Mozilla\Firefox\Profiles\****.default) it appeared all my old tabs and some even older were present as a jumbly.

But no matter what I did, it would not re-open those tabs, maybe if I looked into how the file is structured I could find a way to move the old tab URL’s into the area where it reads those from when opening a new session? So I tried browsing for details on how the session store file is structured, and didn’t come across much, other than this :-

http://forums.mozillazine.org/viewtopic.php?f=38&t=622036&start=30

.. and this ...

http://www.ghacks.net/2013/06/03/how-to-restore-firefox-sessions-if-session-restore-is-not-working-correctly/

These forums were useful, but I couldn’t get the HTML code to work, so took a simpler approach.

Loaded Sublime edit, opened the file and replaced all http:// with “\nhttp://” basically just line breaking before each URL, and now it was just gunk with a lot of URL’s on individual lines. Some had extraneous parameters added on, but I had a good list I could whittle down to the 50 odd tabs I had open quite easily, a few further search and replaces to clean it up, and that the job was done.

Oh I’ve now gone back to using Session Manager again, as it stores an excellent frequent history, and has never caused me to loose a single open tab.

No comments:

Post a Comment