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

Firefox

4015 readers
36 users here now

A community for discussion about Mozilla Firefox.

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] tal 2 points 3 months ago* (last edited 3 months ago) (1 children)

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