Mozilla Firefox in a RAM Partition
For Windows 2000 & XP

Get FirefoxThis tutorial will show you how to get Mozilla Firefox installed and running in your RAM rather than from your hard drive. It is based on a tip from Texturizer.net and Portable Mozilla, and uses either AR RAM Disk or RAMDisk.

Update: (7/23/04) This guide was posted in the Mozillazine.org forums when I first wrote it. Since then, John Haller started the Portable Mozilla project which not only makes this tutorial more simple, but it's a better solution for those wanting to run Firefox from a USB drive. The old tutorial can be found here.




First you will need to download the latest version of Portable Firefox. This will look and act just like a normal install of Firefox, except that it has been optimized for space, it only uses one folder, and it doesnt keep a cache or history.

For this guide we'll use C:\firefox\ as the place to store the unzipped folder on the hard drive. A firefox.bat file is included in that folder, which is what you'll use to launch Firefox.




Download and install AR RAM Disk or RAMDisk. These programs create small (32MB-64MB) partitions that by default show up as B:\ in Explorer (you can change these settings in the Control Panel). That memory is taken from your RAM, so anything on this partition will reside in your system memory, not on your hard drive.

The partition will empty its contents each time you boot your computer, so Firefox will need to be copied to the RAM partition upon startup and, if you want, saved to the hard drive before shutdown. First we'll get Firefox to copy to the disk upon start up. It's best to automate this process with a .bat (batch) file that will run automatically.

Open up Notepad and create a new text file called load_firefox.bat (no txt extension) and enter the following code:

XCOPY C:\firefox\*.* B:\firefox\ /E /Y /C

This file will copy your firefox contents to drive B:, the default drive letter of the RAM partition. If your firefox is not in your C:\ directory, or your RAM Disk is not at B:you will need to change that. It is recommended that you put this file in your Start Menu's Startup folder so that these operations are performed automatically and Firefox is ready to go as soon as you start Windows.

Now you will need a way to copy your Firefox settings back to your hard drive before you shut down your PC so that you can save your settings, bookmarks, extensions, etc. Create a new text file called save_firefox.bat and copy the following code:

XCOPY B:\firefox\*.* C:\firefox\ /E /Y

This will copy the entire program files and profile back to your hard drive and replace the existing copy (the one that was copied to the RAM partition upon system boot). You can put this file wherever it is convenient, such as the Desktop. You can run it any time you want to save your settings, but it is recommended you close Firefox first.

So now the following is set up:

  • Upon booting Windows, a partition will be created in your RAM and Firefox will be copied there along with your profile.
  • Use Firefox by double-clicking on the shortcut.
  • Before you shut down your PC, run save_firefox.bat to save your profile.

Be sure to update your shortcuts, including on your desktop, QuickLaunch bar, and in your Start Menu.

Enjoy the performance boost!

Return to Guides