Page 1 of 1

How to tell Firefox where to keep its cache?

Posted: Sun 01 Feb 2015, 17:40
by kj4bnh
Is there a way to redirect the browsers cache away from the savefile?

Compaq Presario running Slacko 5.7 booting off of sdb1. Woud like to save the cache to sdb2.

Posted: Sun 01 Feb 2015, 18:01
by Flash
I'm not sure where Firefox keeps its cache. If it's like Chromium, the cache is in /root/.cache (note the . before cache). You might be able to make a symlink from there to where you want to put the real cache. I don't know how to do that, so you'd have to do some research about symlinks.

Posted: Sun 01 Feb 2015, 18:14
by rufwoof
Open ROX-filer (HOME), click the eye icon to show hidden files (those that have a dot prefix). Click on .cache folder

Open another ROX-filer and navigate to where you prefer the firefox cache to be kept.

Drag the first ROX windows firefox folder to the other ROX window and select the move option. Now do the reverse again, drag the folder back to the first ROX window but this time select symbolic link (either relative or absolute - doesn't really matter).

The location of the new folder will have to be mounted before starting firefox otherwise it will be a dead link i.e. sdb2 in your case.

Personally I'm on a fast internet connection so I don't bother with cache at all. EDIT, PREFERENCES, ADVANCED, check the override automatic cache management and enter 0 (zero) in the Limit Cache Field entry. Or sometimes I might set a modest 20MB limit which usually more than covers going back a few pages in Firefox.

Posted: Sun 01 Feb 2015, 18:59
by mikeb
Agreed...unless you are on dial up set cache to zero... its not Internet Explorer after all and its inherent weirdness.

mike

Posted: Sun 01 Feb 2015, 21:15
by OscarTalks
If you use a script to launch Firefox (rather than a symlink) you can specify a location for HOME which the browser will send some stuff to rather than /root and also you can just use the -profile argument to direct all the profile data to somewhere of your choice outside the save-file too. If you do this the cache seems to be stored inside the profile rather than in a .cache directory in HOME.

So for example to have everything under /mnt/home including the Firefox program directory and the HOME data and the profile data you can just create a few directories and do:-

Code: Select all

HOME=/mnt/home/firefox-portable/browserhome
/mnt/home/firefox-portable/firefox/firefox -profile /mnt/home/firefox-portable/profiles/default
When I do this the only thing that gets created under /root is an empty directory or two.

As rufwoof has said, your sdb2 would need to be mounted if you want to use it as your chosen location.

Posted: Mon 02 Feb 2015, 00:06
by kj4bnh
To all who replied: for now I have just adjusted the cache size to 25MB. I will be looking into the simlinks idea also. Thanks to all.

Posted: Mon 02 Feb 2015, 00:29
by Galbi

Posted: Mon 02 Feb 2015, 01:15
by kj4bnh
Me likes, thanks.