How to move Firefox's cache out of Puppy's savefile
-
- Posts: 156
- Joined: Fri 21 Nov 2008, 17:20
How to move Firefox's cache out of Puppy's savefile
I've been looking at the various ways to keep savefile clutter down but moving Firefox's cache seemed hard so after a bit of thought I tried the following.
Using Rox I found the current location of the cache. On my installation it's at ~/.mozilla/firefox/nunzpnku.default. Inside there there is the cache and a load of config type stuff. Note you'll need to set Rox to "show all files" so see .mozilla in the first place
So I'd know what it was I made a folder in the root of my HD called "Firefoxstuff" then moved nunpnku.default into it then dragged back to ~/.mozilla/firefox and chose "make link here".
Now the free savefile space has increased and Firefox starts up and seems to run the same as ever so it seems to have worked.
This was much quicker to do than to type or read so hope it's handy for someone.
Using Rox I found the current location of the cache. On my installation it's at ~/.mozilla/firefox/nunzpnku.default. Inside there there is the cache and a load of config type stuff. Note you'll need to set Rox to "show all files" so see .mozilla in the first place
So I'd know what it was I made a folder in the root of my HD called "Firefoxstuff" then moved nunpnku.default into it then dragged back to ~/.mozilla/firefox and chose "make link here".
Now the free savefile space has increased and Firefox starts up and seems to run the same as ever so it seems to have worked.
This was much quicker to do than to type or read so hope it's handy for someone.
Mikes way is the proper way to do it, there`s 2 cache setting as I recall.
For koulaxizis`s Firefox-23 the cache is: /root/.cache/mozilla/firefox
So to automate it, I added these lines to: /etc/rc.d/rc.local
For koulaxizis`s Firefox-23 the cache is: /root/.cache/mozilla/firefox
So to automate it, I added these lines to: /etc/rc.d/rc.local
Code: Select all
CACHE=/root/.cache/mozilla
TMP=/tmp/mozilla_cache/firefox
mkdir -p $TMP # put Firefox cache in: /tmp
if [ ! -L $CACHE ];then
rm -rf /root/.cache/mozilla
ln -s $TMP $CACHE
fi
Last edited by sunburnt on Thu 12 Dec 2013, 08:10, edited 2 times in total.
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
There would have to be some new trick... I had tried moving the file out of /root/.cache/ onto /mnt/home/ and linking it back.Flash wrote:I suppose this would also work if you moved nunpnku.default into /tmp. Since the contents of /tmp are not saved anywhere, the cache would be wiped clean upon rebooting. Or do I misunderstand how this works?
On the next reboot it "forgot" about the sym link, and proceeded to fill up /root/ again...
It would seem like your idea might fix it... I just keep emptying the cache folder at the moment...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
That's a workaround, but not an answer to the question of the thread.sunburnt wrote:Mikes way is the proper way to do
Firefox allows to set the cache location:
Go to address about:config => accept warning => right click => New => String => type browser.cache.disk.parent_directory => type new cache location, e.g. /tmp/ffcache => restart Firefox.
In Opera setting the cache location works similarly: opera:config =>Cache Directory4 => type new location.
well I would be disagreeingThat's a workaround, but not an answer to the question of the thread.
Unless you are using dial up, a cache is a bit pointless (pages are cached in ram anyway) so disabling it is configuring the system to suit the circumstances. Internet Explorers (horror) caching methods are a different matter as its shared with the operating system but even that allows setting to 1MB.
It also obiviates the need for all this messing around.
mike
MochiMoppel wrote: Firefox allows to set the cache location:
Go to address about:config => accept warning => right click => New => String => type browser.cache.disk.parent_directory => type new cache location, e.g. /tmp/ffcache => restart Firefox.
Whoa... cool! I'll have to try this one, as trying to resolve the Firefox caching>savefile issue via drag/drop/symlink back has not been sucessful, as Firefox always annoyingly re-creates the entire ~/.Mozilla paths apon the next boot. I'm indeed on dialup, so I do much prefer caching enabled!
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I was objecting to sunburnt's "proper way", not your workaround.mikeb wrote:well I would be disagreeing
I seldom use Firefox and I don't know how much cache is kept in RAM, there seems to be no setting (in Opera there is). Low bandwidth (or low RAM ) is only one reason to keep the cache. Offline browsing could be another one. And when you create a cache folder outside of Puppy - either via symlink or about:config - you have access to cached content long after you've closed Firefox and/or Puppy - without filling pupsave.
In 12 years I still don't know why offline browsing exists... but thats just me...I just save pages or bookmark.
The page cache is pretty big...its only configured in about:config and never had to touch that one but if ram was limited its definately worth a tweak. That covers browsing back and old tabs basically.
Not sure of how the cache could be used apart from through the browser.
It just reminds me of all the outside the save file linking I used to do... gets a bit messy and each system change means doing it again.
mike
The page cache is pretty big...its only configured in about:config and never had to touch that one but if ram was limited its definately worth a tweak. That covers browsing back and old tabs basically.
Not sure of how the cache could be used apart from through the browser.
It just reminds me of all the outside the save file linking I used to do... gets a bit messy and each system change means doing it again.
mike
-
- Posts: 156
- Joined: Fri 21 Nov 2008, 17:20
WOW !!! I didn't think my first attempt at a "how to" would produce this much debate
I had read something about doing it in about:config but didn't realy understand what I should do there so tried the way I described in the first post.
For me this does reduce savefile use and doesn't seem to have broken anything so I'm happy with that.
I think this thread though shows how Puppy lets you bend it how you like it -- non of these ways can be wrong if they do what the user needs so they must all be right
I'm ducking out now having exceded my expertese anyway
Will
I had read something about doing it in about:config but didn't realy understand what I should do there so tried the way I described in the first post.
For me this does reduce savefile use and doesn't seem to have broken anything so I'm happy with that.
I think this thread though shows how Puppy lets you bend it how you like it -- non of these ways can be wrong if they do what the user needs so they must all be right
I'm ducking out now having exceded my expertese anyway
Will
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Thanks! I'll be testing that out...MochiMoppel wrote:That's a workaround, but not an answer to the question of the thread.sunburnt wrote:Mikes way is the proper way to do
Firefox allows to set the cache location:
Go to address about:config => accept warning => right click => New => String => type browser.cache.disk.parent_directory => type new cache location, e.g. /tmp/ffcache => restart Firefox.
In Opera setting the cache location works similarly: opera:config =>Cache Directory4 => type new location.
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
I tried moving the cache folder out... As soon as I reboot, and load FF it creates a new one (wiping out my symbolic link)... Grrrr.....puppyluvr wrote: Hello,
I just move the whole mozilla dir to mnt home so all my puppies can share it.
This fix looks promising (and should be retained when FF upgrades itself to version 476... )
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
I just applied MochiMoppel's modification. Looks to be working...sunburnt wrote:My code puts the cache in /tmp, so it`s self-cleaning at every shutdown. No Save is used.
Setting Firefox`s configs. helps, but they still take up Save file space.!
Now I just have to do it to a few more systems...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
Yes, that`s the Firefox configs spoken of, I believe there`s 2 cache settings in it.
# Note: You will find that it still grows the cache. Just not as bad as before.
Only moving the cache to /tmp solves the problem completely.
There`s no need for it to be on a partition, it`s slower, and there`s no reason to save it.
# Note: You will find that it still grows the cache. Just not as bad as before.
Only moving the cache to /tmp solves the problem completely.
There`s no need for it to be on a partition, it`s slower, and there`s no reason to save it.