Moving Firefox Cache Folder - Quick Questions

User Help for Mozilla Firefox
Post Reply
risk_reversal
Posts: 56
Joined: February 7th, 2005, 8:21 am

Moving Firefox Cache Folder - Quick Questions

Post by risk_reversal »

Hi Guys

I wanted to move my cache folder to a Ramdisk drive and just wanted to make sure that I have the process
clear in my mind before I start but I do have 2 questions

This is what I am going to do:

1. Clear the cache
2. Create a cache folder in my Ramdisk drive
3. Go to about:config and seach for browser.cache.disk.parent_directory
4. If that entry does not exist create a String value for it
5. For the string value enter the new location for the cache folder

In the first instance is that all correct?

So for my 2 questions:

(i) as regards point 5 above namely the new location of the cache folder what format must I use ie one back slash or two

Below will be the actual new location of my FF cache folder

so a) X:\TEMP\Firefox Portable 51.0.1 Cache
or b) X:\\TEMP\\Firefox Portable 51.0.1 Cache

I take it that spaces in directory names are allowed?

(ii) I also use SeaMonkey and have already moved the cache folder to a similar location which was easier

Since it is a Ramdisk drive the SeaMonkey cache folder is deleted at reboot but SM recreates it when used.
Will Firefox also do this just like SM?

Many thanks for any info provided
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Moving Firefox Cache Folder - Quick Questions

Post by dfoulkes »

Not really sure about doing all that as I just use the normal areas... but since you would clear cache anyway and then make those changes to prefs why don't you just try it to see what you get... if it doesn't work just reverse your stuff and wait for others to comment....no harm will come of it.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
kerft
Posts: 585
Joined: January 30th, 2019, 9:38 am

Re: Moving Firefox Cache Folder - Quick Questions

Post by kerft »

(i) In about:config setting the browser.cache.disk.parent_directory with a single backslash works. I think using two slashes might have been for another operating system, or maybe if you put the setting in prefs.js or user.js directly.
(ii) Firefox will create the cache folder itself if it is not there.

Other thoughts - some ramdisk software can save the ramdisk to disk when you shutdown and reload when you start. You may or may not want that feature, it could increase speed but would reduce privacy. Also, your folder name "Firefox Portable 51.0.1 Cache" worries me just a bit. If you are using Firefox Portable, I don't know if its cache works the same way or if it uses cache at all. By setting a custom profile location, you can make Firefox work very similarly to Firefox portable, without the launcher file.

Last thought - even with cache in ram, Firefox writes lots to the profile directory. Sessionstore, places.sqlite, cookies, favicons as well as mountains of dom storage and serviceworkers. If you want to eliminate noise from disk writes and privacy risks of having data stored on disk, you might want to run your whole Firefox profile, not just the cache, from ram. To do that, you would have a pretty clean profile on disk. Either on boot or before you run Firefox, copy it to ramdisk, and use a Firefox shortcut with -p to run off the ramdisk.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: Moving Firefox Cache Folder - Quick Questions

Post by Brummelchen »

Firefox/64.0
current is firefox 65.0.2 and since tomorrow 66.0, please update!
risk_reversal
Posts: 56
Joined: February 7th, 2005, 8:21 am

Re: Moving Firefox Cache Folder - Quick Questions

Post by risk_reversal »

kerft wrote:(i) In about:config setting the browser.cache.disk.parent_directory with a single backslash works. I think using two slashes might have been for another operating system, or maybe if you put the setting in prefs.js or user.js directly.
Thanks. It was just that these threads (and others) made me ask, although some are old.

http://forums.mozillazine.org/viewtopic ... #p11868905

https://ccm.net/faq/40745-firefox-how-t ... les-folder

kerft wrote:(ii) Firefox will create the cache folder itself if it is not there.
Understood
kerft wrote:Other thoughts - some ramdisk software can save the ramdisk to disk when you shutdown and reload when you start. You may or may not want that feature, it could increase speed but would reduce privacy.

I am aware that that can be done but I prefer to have it set up that way for now at least.
kerft wrote:Also, your folder name "Firefox Portable 51.0.1 Cache" worries me just a bit. If you are using Firefox Portable, I don't know if its cache works the same way or if it uses cache at all. By setting a custom profile location, you can make Firefox work very similarly to Firefox portable, without the launcher file.
With SeaMonkey Portable, I have the cache folder set to that location, X:\ (though in a different folder) and having researched this topic prior to posting, it appears that FF would / should behave in the same way.
kerft wrote:By setting a custom profile location, you can make Firefox work very similarly to Firefox portable, without the launcher file.
Nowadays I prefer to just use Portable versions of this program (and many others) much easier and much more versatile.
kerft wrote:Last thought - even with cache in ram, Firefox writes lots to the profile directory. Sessionstore, places.sqlite, cookies, favicons as well as mountains of dom storage and serviceworkers. If you want to eliminate noise from disk writes and privacy risks of having data stored on disk, you might want to run your whole Firefox profile, not just the cache, from ram. To do that, you would have a pretty clean profile on disk. Either on boot or before you run Firefox, copy it to ramdisk, and use a Firefox shortcut with -p to run off the ramdisk.
Disk noise is not an issue since I am using a Samsung 850 Pro 1TB SSD as my boot drive

Thanks for the tip tho'. I shall start with just moving the cache for now. Obviously, running FF from a Ramdisk would be more secure as you say since it would be a 'clean profile' but there are certain aspects that I want to keep ie History and Bookmarks.
Brummelchen wrote:current is firefox 65.0.2 and since tomorrow 66.0, please update!
There are particular reasons for me using my current version of Firefox and following your advice would not be suitable to my set up but your comment is duly noted.


Cheers
Post Reply