How to tell Firefox where to keep its cache?

Using applications, configuring, problems
Post Reply
Message
Author
kj4bnh
Posts: 23
Joined: Thu 20 Jun 2013, 16:28

How to tell Firefox where to keep its cache?

#1 Post 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.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post 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.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#3 Post 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.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#4 Post by mikeb »

Agreed...unless you are on dial up set cache to zero... its not Internet Explorer after all and its inherent weirdness.

mike

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#5 Post 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.
Oscar in England
Image

kj4bnh
Posts: 23
Joined: Thu 20 Jun 2013, 16:28

#6 Post 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.

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

#7 Post by Galbi »

Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]

kj4bnh
Posts: 23
Joined: Thu 20 Jun 2013, 16:28

#8 Post by kj4bnh »

Me likes, thanks.

Post Reply