How to move the Firefox or Chrome cache to a RAM disk and speed up surfing by 20% or more
If you're old enough, you probably remember what a RAM disk is. Back in the olden days, to squeeze every last bit of juice out of your computer (usually for the purpose of playing Doom), you could load a program into a RAM disk -- a virtual drive made out of spare RAM. As I'm sure you know, RAM is a lot faster than your hard driveFast forward to today, and most computers have a lot of spare RAM. Unless you're editing large multimedia files, you're probably using only a fraction of your RAM. Why don't we use a little bit of it to speed up our surfing of the Web?
Browsers save a lot of data to the hard drive. Every image, so that you don't have to download it every time you visit a page, is saved to the hard drive. That's when you experience the 'grind' of loading (or reloading) a tab that you haven't looked at recently -- the browser is loading data from the hard drive.
With a RAM disk, you can make the browser always load from memory. This speeds up the entire browsing experience by a significant margin. The browser starts in a flash, switching between tabs feels faster, and page load times can be reduced by 20% or more!
To get started, you need Dataram's excellent RAMDisk software. It's free, unless you want to create RAM disks over 4GB in size (which you really don't need to do).

Once that's installed, you need to configure your RAM disk. Size-wise, 500MB should be fine -- and make it a FAT32 partition. Click 'Start RAMDisk' at the bottom.

Click through to the Load and Save tab and enable Load Disk Image at Startup and Save Disk Image on Shutdown; the default filenames are fine. You don't need to enable Autosave. If any warnings are generated, don't worry about it -- just click OK.

Now, head over to My Computer (Start > Computer) and note the drive letter of the new RAM disk. Double click it and create a new folder called BrowserCache -- in other words, you are creating E:\BrowserCache (where 'E' might be another letter).
Finally, it's time to move your Firefox or Chrome cache onto the new RAM drive.
Google Chrome
- Close all open Chrome tabs and windows
- Right click your Chrome shortcut (the one you use to open the browser), select Properties
- In the Target window, move your cursor to the end of the path, after chrome.exe
- Type --disk-cache-dir="E:\BrowserCache" (it might be D: or F: or...) Make sure there is no trailing slash
- Click OK
- Click the shortcut to launch Chrome
Mozilla Firefox
- Type about:config into the address bar, accept the warning ("I'll be careful, I promise!")
- Right click > New > String
- Type browser.cache.disk.parent_directory into the box and press OK
- Type the path of your BrowserCache directory -- E:\BrowserCache (where 'E' might be another letter); press OK
- Close all open Firefox tabs and windows
- Open the browser again
Benchmarks & conclusions
Measuring the real-world improvement of a RAM disk is tricky. Using the Chromium Benchmarking tool, I found that page load times were reduced by around 20%. Shutting down and restarting the browser is also a lot quicker.
I found it hard to measure the performance improvement of tab switching. I think tab content is still loaded from the operating system swap/page file, which is still stuck on the hard drive.
If you have any other tips for speeding up the browser cache, leave a comment!















Comments
64
Subscribe to commentschris122380Nov 10th 2010 12:07PM
Is there a way to do this in Ubuntu Linux?
Sgt ZeppelinNov 10th 2010 12:25PM
http://ubuntuforums.org/showthread.php?t=182764
That's what I got from a quick google. I don't know how you would change make Chrome use the disk, but it should be the same steps for Firefox.
Sebastian AnthonyNov 10th 2010 4:45PM
It was actually a guide on an Ubuntu site that gave me the idea to create this guide :)
http://www.omgubuntu.co.uk/2010/11/move-google-chrome-cache-to-ramdisk/
kojo87Nov 10th 2010 12:34PM
while Chrome load practically instantly for me, Firefox takes a bit. any way to decrease load times is much appreciated. oh how i would love to have huge dedicated RAMdisk to install games to. i did it once with Counter Strike. the load times were insanely fast. why didn't RAMdisk ever really take off?
Sebastian AnthonyNov 10th 2010 4:46PM
I'm not sure... probably because you have to re-load it every time you boot up.
Not like it takes very long to copy a few gigs into RAM, though.
I know some people play WoW from a RAM disk... so I'm sure there are people that do it with other games too! Enthusiasts... :)
DreNov 10th 2010 12:56PM
I have Win7 64-bit and once I get to the second part of the menu and click the boxes it automatically changes the format to "unformatted". What's up with that?
Any tips?
Sebastian AnthonyNov 10th 2010 4:46PM
Start the RAM disk before you move onto the 'load and save' options.
HenryNov 12th 2010 4:03AM
I had the same problem; Start the ramdisk first (with the save/load options unchecked), and then after you see the new drive pop up, check the options again and file -> save settings.
mmxz3roNov 14th 2010 2:50AM
Thank you!
danielkzaNov 10th 2010 12:59PM
There's no need for the extra software in Firefox. Everything is there in about.config.
1) Set 'browser.cache.disk.enable' to false
2) Set 'browser.cache.memory.enable' to true.
3) Create 'browser.cache.memory.capacity' if it doesn't exist.
4) Set 'browser.cache.memory.capacity' to the desired size of the RAM cache in kilobytes.
mmxz3roNov 10th 2010 1:10PM
Hey,
thanks for the tip. I guess this willl do until I get my question answered for Chrome.
AndrewNov 10th 2010 1:35PM
Awesome tip. Thanks!
Jason ShelbrockNov 10th 2010 2:08PM
I am trying this as soon as I get home. thanks!
AndrewNov 10th 2010 2:45PM
It's worth noting that browser.cache.memory.capacity needs to be an integer setting.
LeonNov 10th 2010 3:09PM
Wow - I just tried this and Firefox is WAY faster. It'd been taking up to 5 seconds just to open the app, and then it would be sluggish. I switched to Chrome as a result - and the faster rendering - but really miss the apps; they're not as advanced in Chrome.
I really might switch back now - going to experiment some more.
Is there a non-software way to do this in Chrome? Our company IT policies prevent this sort of thing (running 3rd party software).
Great tip danielkza - +1
Sebastian AnthonyNov 10th 2010 4:47PM
Wow, that's cool, if it works in the same way!
I'll have to give it a go.
thielNov 10th 2010 7:04PM
Thanks for the great tip! This has cured my FF 3.6* scrolling lag bug which many people have. It wasn't as bad with a clean install of FF, but with my regular highly extension version, sites like Engadget were becoming a pain, so much so that I was switching over to Chrome or IE9b to read it. Now it's all fast and smooth like with FF4.
brieNov 11th 2010 6:44AM
Thank you for this :)
cozappzNov 17th 2010 4:15AM
Right.
The article is in the same range of stupidity like the one suggesting putting Windows swap file on a ramdrive.
Sebastian AnthonyNov 11th 2010 7:40AM
Only it's not, because I didn't suggest putting the Windows swap file into RAM.
Try it out, man -- it actually works.