8

I read the descriptions for the Dcentraleyes and LocalCDN addons which cache popular JS frameworks and page assets to enhance privacy and speed up pages that use them (since the assets were downloaded beforehand). Does Firefox have any built-in functionality to cache frequently used assets, or are there any addons that do so?

For instance, If I access Reddit.com a lot, I would want all the resources that all those Reddit pages have in common to be cached automatically to make loading pages from the domain faster.

top 6 comments
sorted by: hot top controversial new old
[-] rimu@piefed.social 4 points 4 months ago* (last edited 4 months ago)

I made an extension called "Cache Longer" which forces static assets to be cached for 6 months, regardless of what the website wants. If any website starts looking janky or stops working, just do a hard refresh (very rarely needed).

https://addons.mozilla.org/en-US/firefox/addon/cache-longer/

[-] TheTwelveYearOld@lemmy.world 0 points 4 months ago

This was last updated 3 years ago, does it still work fine? Maybe add a note saying that it works as of 2024? I also see an issue opened a year ago that's unanswered.

[-] rimu@piefed.social 1 points 4 months ago

Yes, I've been using it continuously since then.

[-] tal@lemmy.today 2 points 4 months ago* (last edited 4 months ago)

Are you talking about browser cache? Sure.

Hit about:cache in your URL bar and you can see what it's caching.

Firefox has a memory cache, that lasts for the life of the browser session, and a disk cache that persists from session to session.

Note that by default, if you have Firefox set to delete data in your browser on exit (which is a sensible thing to do from a privacy standpoint), it'll also wipe the browser cache (which is sensible behavior, since you can be identified by what your browser has cached in the past, same way cookies work). So if you have that privacy setting on, you may have no persistent cache.

The browser disk cache size used to be exposed in the GUI preferences. At some point, IIRC, they switched to a "smart cache size" based on available disk space which is IMHO excessively conservative. You can bump it up in about:config today with the browser.cache.disk.capacity setting today, and probably have to flip off browser.cache.disk.smart_size_enabled.

[-] MrOtherGuy@lemmy.world 1 points 4 months ago

Yeah, regular http cache is indeed a thing. However it's more complicated because the web server can tell the browser how the returned content should be cached - if at all. So if, say, reddit servers ask the browser to not cache particular resource (for whatever reason) then it won't be cached. I mean, the browser is free to do as it pleases, but I think in general browsers would do as the server asked and indeed not cache it.

[-] slazer2au@lemmy.world 2 points 4 months ago

Firefox already does this. But as pages like Reddit are very dynamic, caching doesn't provide much benefit beyond the page style.

this post was submitted on 27 Jun 2024
8 points (78.6% liked)

Firefox

4015 readers
29 users here now

A community for discussion about Mozilla Firefox.

founded 1 year ago
MODERATORS