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.

    • TheTwelveYearOld@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      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.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    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.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    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
      link
      fedilink
      arrow-up
      1
      ·
      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.