Mozilla launches improved Session Restore in Firefox 33

I rely a lot on Firefox's Session Restore feature. I have configured the browser to always open the last session when it gets opened and for the most part it works just as advertised.

Advertisement

While there are other methods to ensure that, like bookmarking tabs regularly before you close the browser, it is not really as comfortable of an option as the built-in session restore feature.

With that said, the Session Restore feature of Firefox is far from perfect. While it does a good job normally, I sometimes experienced issues in regards to that.

Sessions would not be loaded but the Firefox home page would. That's a big problem if you rely on the feature as you may not be able to recover all websites that were open during the last browsing session.

You can try and recover sessions, but that may not work all the time. Some users have helped themselves by using third-party add-ons instead like Session Manager which provides you with more control over the whole saving and restoring process.

Mozilla just announced that it has made improvements to Firefox's Session Restore feature that it plans to ship with Firefox 33.

The new feature attempts to minimize data loss in regards to sessions by improving how backups are stored and recovered again.

firefox new session restore

The new backup process

  1. Firefox writes contents of Session Restore to sessionstore-backups/recovery.js whenever it is required.
  2. Before that happens, it will move the previous recovery.js file if tests return it as good to recovery.bak in the same folder.
  3. Usually, recovery.js and recovery.bak contain both the state of the browser 15 seconds apart from each other.
  4. When Firefox is shut down, a new sessionstore.js file is written to the main profile folder.
  5. During start up, if sessionstore.js is valid, it is moved to previous.js in the sessionstore-backups directory.
  6. On the first start up after an upgrade, Firefox copies the sessionstore.js file to upgrade.js-[build id].

The restore files

As mentioned before, Firefox saves several new session restore files to the user profile directory once the new feature lands in the browser (Nightly users already have it as it lands in Firefox 33 if things go as planned).

  • sessionstore.js - The state of the browser during the last shut down.
  • sessionstore-backups/recovery.js - Contains the state of Firefox 15 seconds before shutdown or crash.
  • sessionstore-backups/recovery.bak - Contains the state of Firefox 30 seconds before shutdown or crash.
  • sessionstore-backups/previous.js - Session Restore data before the second to last shut down.
  • sessionstore-backups/upgrade.js-[build id] - Session Restore data after the latest upgrade.

The new process

Here is the order in which Firefox attempts to restore the previous session on start.

  1. If sessionstore.js is valid, it will be used.
  2. Recovery.js will be used if present and valid.
  3. Recovery.bak will be tried next.
  4. Previous.js is then used to restore the session.
  5. And finally, upgrade.js will be tried as well.

So what is different in comparison to the old session restore? First of all, you may notice that additional files are saved by the browser which increases the chance that one of the session restore files is not corrupt and working.

In addition, both the previous.js and upgrade.js files are not replaced as often as the two main session restore files. This provides another option of recovering a session if both primary session files are no longer working, or if you have started the browser several times after you noticed that the session was not restored properly.

The new system offers additional means to recover sessions manually as well. Previously you had to rely on the backup file only to restore a session if the main sessionrestore file was corrupt. Now, you can also try recovery.js or upgrade.js, both of which are usually created farther back in time making it more likely that they are not corrupt as well.

Summary
Article Name
Mozilla launches improved Session Restore in Firefox 33
Author
Description
Mozilla Firefox will launch with an improved Session Restore feature that uses additional data points and different storage locations for the most part.

Please share this article

facebooktwittergoogle_plusredditlinkedinmail

Advertisement

Responses to Mozilla launches improved Session Restore in Firefox 33

  1. Michael Fisher June 27, 2014 at 9:47 am #

    This is good news. IMO there isn't a satisfactory Fx 30 session manager at the moment. I use the session manager built into the "Tab Mix Plus" addon, but it is only a slight improvement over the standard manager. I formerly used the superb "Session Manager" addon you mention in the above article, but it is not working well for fx 30 users for various reasons & it's not being de-bugged quickly enough for my tastes. https://addons.mozilla.org/en-US/firefox/addon/session-manager/reviews/

    • silat June 27, 2014 at 10:40 am #

      Interesting about it not working for so many people. I use FF30 and Session Manager works perfectly for me.

      • Rodalpho June 27, 2014 at 6:12 pm #

        I use the "session manager" extension also. It has worked flawlessly for many years.

        The built-in firefox session saving is terrible. Would be awesome to get rid of an extension in 33.

  2. jimbo June 27, 2014 at 1:11 pm #

    You have to wonder at the complexity of what looks like a simple task. You'd think Ff would simply keep a trail of opened tabs (History?!). Instead they seem to fire a steady stream of access to places.sqlite.
    Recently i realised that the cpu was constantly working away while idle at 2-5% and traced it to a horrendous amount of disk activity. Changing the Browser.sessionstore.interval to 120000 (2min) seemed to calm things significantly. Everything has a price.

    • Ray June 27, 2014 at 5:35 pm #

      Thanks for this tip. Didn't know about this.

      The default is 15 seconds. I also just switched to 2 minutes.

  3. TheAslan June 27, 2014 at 4:22 pm #

    I don't understand all this hype about session manager, I haven't never used this feature yet. This is the first feature always which I disable when I fresh install Firefox, completely worthless feature for me at least.

    • fokka June 27, 2014 at 8:21 pm #

      i'm not actively using it either, but using firefox nightlies, it's still nice to have in case the browser crashes. doesn't happen often, but better safe than sorry, eh?

      • TheAslan June 28, 2014 at 1:09 am #

        Still I don't get it. And who cares if browser crashes. I wouldn't even restore my history if Firefox offers it, I would decline. Session restore is rather extremely annoying feature than useful.

  4. Noitidart June 28, 2014 at 9:55 am #

    The biggest problem with session restore right now is losing data from textareas. It would be nice if session restore can support the new age javascript web. Lots of dynamic content, would be awesome if it could restore that. My browser doesn't crash, its just i also use the restore session feature after close of firefox. It would be nice if everything was restored perfectly.

    • Ray June 29, 2014 at 7:37 pm #

      Just use an addon that is dedicated to caching all textareas like Textarea Cache!

  5. Jonny July 4, 2014 at 8:06 am #

    Since moving over to palemoon (FF v24) I'm noticing I'm becoming more and more frustrated with the constant and new refinements being done to the standard x86 firefox. And with palemoon its sort of frozen in time. FF does have some good new refinements that just won't make it into palemoon.

    The x64 bit and better memory management is the reason I use palemoon, nothing else. Whilst this is enough to keep me happy more or less, I am starting to miss all the new features and refinements of the standard branch. So I was wondering Martin if you have any more info regarding mozilla releasing a supported x64 bit version of FF. Is it going to happen.

    tab count today = 1650 time to cull a few hundred or so.

  6. Asok Asus July 14, 2014 at 6:55 pm #

    I want to thank all the folks who recommended Pale Moon. I’ve just been FED UP with FF because of the horrific memory leaks, sluggishness, constant pointless UI changes, arrogance of online "help", etc. I've been running v16 forever because whenever I’ve tried to upgrade to newer versions, they’d all pretty much just crash after 30 minutes of heavy use, and not a single version of FF that I’ve ever used has ever fixed the memory leak problems. Not a single one.

    I actually installed a tiny batch file on quicklaunch so I could quickly kill FF at the point it’s consumed all of my RAM so I could then start over with “Restore Session” to automatically reload all of my previous tabs. After trying every “solution” to the leak problem, that’s the only one that ever did in any good for me. Apparently the arrogant tards at mozilla would rather tweak the UI to death rather than make a browser that actually works. They’re worse than even Microsoft because Microsoft has to listen to their customers sooner or later or go broke. Nonprofits can just drift along forever.

    I’ve just been FED UP with FF because of all of the memory leaks, etc. I've been running v16 forever because whenever I’ve tried to upgrade to newer versions, they’d all pretty much just crash after 30 minutes of heavy use, and not a single version of FF that I’ve ever used has ever fixed the memory leak problems. Not a single one.

    I actually installed a tiny batch file on quicklaunch so I could quickly kill FF at the point it’s consumed all of my RAM so I could then start over with “Restore Session” to automatically reload all of my previous tabs. After trying every “solution” to the leak problem, that’s the only one that ever did me any good. Apparently the arrogant tards at mozilla would rather tweak the UI to death rather than make a browser that actually works. They’re worse than even Microsoft because Microsoft has to listen to their customers sooner or later or go broke, whereas nonprofits can just drift along forever.

    At any rate, I just finished installing PM, including importing everything from FF with their little importer program, and everything went flawlessly, including all settings and the plethora of add-ons I use. The only difficulty was getting roboform attached, which I can’t live without. I did finally dumb around and got the roboform taskbar program to attach roboform to PM, which then worked flawlessly. It is, however, necessary for the roboform taskbar program to run all the time for roboform to continue to work on PM, but this is a very small price to pay to ditch FF forever.

    I've used PM for a month now, opening/closing/keeping hundreds of tabs a day, and I’ve been stunned at how much faster PM is than FF, as well as the VERY small memory footprint occupied by PM vs FF. Even after a week's HEAVY usage, PM has not grown beyond 1 GB, and even better, when I close tabs, ALL of the RAM is given back.

    Basically, PM is what FF ought to be. Even better, the genius behind Pale Moon, Mark Straver, has committed to keeping the PM UI fundamentally unmolested. I’ll be installing PM instead of FF on all of my client’s computers in the future as well!

    (BTW, ALL of the "recommended fixes" for the firefox memory leak problems are a sick joke. Not one of them works. And plugins DO NOT cause the memory leaks! Firefox does! How do I know? Because I switched to Pale Moon, importing everything EXACTLY like it was in Firefox and guess what? No memory leaks in Pale Moon! Oh, and I use Adblock Plus, Flash, Java, DoNotTrackMe, BetterPrivacy CookieCuller, DownloadHelper, Element Hiding Helper, IE View, ViewAbout, Visited, and roboform. So NONE of those is causing the firefox memory leak problems!)

Leave a Reply