Skip to main content
Ben Nadel at CF Summit West 2024 (Las Vegas) with: Sam Effa
Ben Nadel at CF Summit West 2024 (Las Vegas) with: Sam Effa

Leveraging FireFox's Restore Session Feature To Control RAM Usage

By
Published in Comments (14)

I am running FireFox 2.0.0.1 and it rocks, but the RAM usage of it tends to climb really high during the day. Not too long ago, I found out by accident that if your FireFox crashes and then you start it up again it will ask you if you would like to restore the previous session. How bad-ass is that? I know, I know. But what's really cool that just occurred to me is that you can use this feature to control the RAM that FireFox uses.

My FireFox process was just hovering at about 250 MEGs of RAM usage. That's a ton or RAM (I don't have a crazy amount on this computer). I also have a good number of windows and tabs open as well for development, email, ColdFusion news feeds, etc. Well, now instead of closing them all down, then re-opening them manually, I just go in, Kill the FireFox process (which kills all the windows at once) and then restart FireFox which will in-turn, restore the session that was just running.

Doing this, the FireFox RAM usage went from about 250 MEGs down to about 95 MEGs and I hardly had to push a few buttons. Now, granted, this is a total misuse of the feature and probably of Window's task manager, but when my machine starts to drag, it just has to be done.

Reader Comments

6 Comments

You can accomplish the same thing without killing the process.

Under options, main, there is a "startup" dropdown, with an option to "open tabs and windows from last time".

15,902 Comments

Doug,

Good option to know about (I was unaware that it could do that). However, I am not always looking to start up with previous tabs. I only want to do this when I cycle the ram. Or, does it prompt you for this on start-up?

95 Comments

Ben, interesting workaround :-)

However, here is a better solution:

1. Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
2. Right Click in the page and select New -> Boolean.
3. In the box that pops up enter config.trim_on_minimize. Press Enter.
4. Now select True and then press Enter.
5. Restart Firefox

I got this from here:
http://tech.cybernetnews.com/2006/03/26/this-may-help-your-firefox-memory-leak/

15,902 Comments

DUUUUUUDE! I just minimized my FireFox and the RAM dropped to 24 Megs :) that is a HUGE drop.

Rock on with your bad self!

15,902 Comments

Hey, one caveat I just discovered for the minimize-RAM-flush thing above; it only seems to work if you manually minimize the windows. If I do a START+D (windows key and D key to show desktop) it doesn't seem to register this as a minimizing of the windows.

15,902 Comments

Oooooh. I didn't realize that FILE > EXIT would close all the windows. Sweet-ass. That is much better. I can't believe I didn't know that.

Goes to show you how rarely I close my FireFox :)

122 Comments

Well, I have to admit that I normally never close Firefox and only usually rely on the restore sessions feature after a system crash... :)

1 Comments

Clever idea. For unrelated reasons I'd like to be able to save my session and quit (rather than automatically restart) Firefox.

Something like that would be useful when you have several websites open in two or more tabs (and/or separate windows) and would like to open them all back up at a later time.

Using your 'kill process' technique should allow me to do this, but it would be nicer if there was something equivalent to it that could be attached to a button or menu item inside of Firefox because it would require fewer steps.

2 Comments

Be aware that you need to have "Warn me when closing multiple tabs" unchecked or it won't save the session when quitting FF.
If you want to use the above option, you must terminate the process.

1 Comments

Doing the close trick works really well. Personally I use it for reading fanfictions because I like to open ~ 10 stories at a time and don't normally get around to reading them all at one time.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel