An analysis of local caches that Firefox uses - gHacks Tech News

An analysis of local caches that Firefox uses

Back in the early days of the Internet, there was just a single cache for HTML files and static elements such as images but with the rise of HTML5 and modern web applications came new cache formats that modern web browsers use.

While it may make sense to use different locations for the cache from a developer point of view, it makes things difficult for privacy-conscious and technology-interested users who want to keep an eye on cache content and size.

Please check out our guide on clearing the main browser cache as it lists the main Firefox cache directory on the local system among other things.

This guide looks at new cache locations exclusively.

Firefox Cache Information

firefox cache

The Offline cache

Introduced in 2007, it has been designed to store elements tagged with rel="offline-resource" in the offline cache.

The main idea is to provide offline browsing capabilities to devices, to improve the performance of important resources, and to reduce server load. The offline cache can be used by HTML5 applications

Developers can use the Application Cache (AppCache) interface to specify resources that the browser should cache and make available to offline users. Applications that are cached load and work correctly even if users click the refresh button when they are offline.

IndexedDB

  • Windows Vista and newer: C:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<salt>.<profile name>\indexedDB
  • Mac/Linux: /Users/<username>/Library/Caches/Firefox/Profiles/<salt>.<profile name>/indexedDB
  • Preference: dom.indexedDB.enabled
  • Values: True (enabled) or False (disabled)
  • Additional information: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API

IndexedDB is a browser technology that can hold large amounts of structured data and supports high-performance searches using indexes. It is available offline, online and from within HTML5 Web Workers.

IndexedDB is a transactional database system, like a SQL-based RDBMS; however whereas the latter uses tables with fixed columns, IndexedDB is a JavaScript-based object-oriented database. IndexedDB lets you store and retrieve objects that are indexed with a key; any objects supported by the structured clone algorithm can be stored

To view IndexedDB content, use an add-on like SQLite Manager for Firefox.

Dom Storage

  • Windows Vista and newer: C:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\<salt>.<profile name>\webappsstore.sqlite
  • Mac/Linux: /Users/<username>/Library/Caches/Firefox/Profiles/<salt>.<profile name>/webappsstore.sqlite
  • Preference: dom.storage.enabled
  • Values: True (enabled) or False (disabled)
  • Additional information: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

This enables client-side session and persistent storage in Firefox. It is used to store (more) data on the local system compared to cookies. Dom Storage is used by supercookies but also by sites who need to save data on the local system.

Firefox users may use the FireStorage extension for the web browser to display the content of HTML5 Local Storage for the active site in the browser.

While it is possible to disable one, some or all of the listed caches, you may run into issues when using web applications that utilize the features.

Now You: Got anything to add or comment on? Let us know below in the comment section.

Summary
An analysis of local caches that Firefox uses
Article Name
An analysis of local caches that Firefox uses
Description
A detailed look at local caches that the Firefox web browser uses. The guide includes cache locations, descriptions and preferences to turn the feature off.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Tom Hawack said on December 11, 2015 at 4:09 pm
    Reply

    Here with Firefox I’ve never encountered any issue by setting browser.cache.offline.enable to false

    Concerning dom.indexedDB.enabled, set to true here, I understand it applies to websites, add-ons and session data and is maintained in user’s profile ‘storage’ folder, but I have no indexedDB folder nor file. “If set as false (disabled), this WILL break some [old] add-ons and DOES break some sites’ functionality” (Source and thanks to Pants).

    dom.storage.enabled is required on some sites (even when they set no data!). A great add-on for dealing with Firefox’s Dom Storage (all in the webappsstore.sqlite file) is called ‘Self-Destructing Cookies’ since it handles Firefox’s Dom Storage as well as cookies (not to mention disk&ram cache as an option), emptying the storage and erasing cookies for sites not labelled as an exception by the user. The ultimate tool IMO for managing cookies as well as the Dom Storage on Firefox.

    Thanks Martin, this article clarifies the caches used by Firefox. I’d focus on Dom Storage as a major privacy concern. If you set it to disabled you may encounter issues on some sites, otherwise, and without the add-on I mention, at least delete the webappsstore.sqlite file once in a while, on every Firefox exit is better. The file is automatically rebuilt.

  2. ¬¬ said on December 11, 2015 at 5:05 pm
    Reply

    Thank you Martin very useful!

  3. point said on December 11, 2015 at 6:08 pm
    Reply

    Also check
    c:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\.\storage\temporary
    in which for example facebook’s messages part stores what seems to be some asmjs byte-code thing, that not even restart (with enabled clear all at exit settings) purges (though can be deleted manually).

    1. point said on December 11, 2015 at 6:12 pm
      Reply

      Edit time passed… the path correctly:
      c:\Users\(username)\AppData\Roaming\Mozilla\Firefox\Profiles\(salt).(profile name)\storage\temporary

      1. Tom Hawack said on December 11, 2015 at 6:40 pm
        Reply

        The user’s profile storage folder’s content depends of dom.indexedDB.enabled, true or false
        “If set as false (disabled), this WILL break some [old] add-ons and DOES break some sites’ functionality” (Source and thanks to Pants).

        Can be automatically wiped at Firefox exit by setting privacy.clearOnShutdown.offlineApps to true in about:config

  4. Anonymous said on December 11, 2015 at 6:20 pm
    Reply

    Is there some way to say “load cached version of page in offline mode”? Maybe an add-on?

  5. jern said on December 12, 2015 at 12:32 am
    Reply

    I’m running Firefox 42.0 on a Macbook and I see three files in the DOM cache while FF is running.
    webappsstore.sqlite
    webappsstore.sqlite-shm
    webappsstore.sqlite-wal

    The last two files are deleted automatically when FF closes. Webappsstore.sqlite is persistent. If you have a app like Find Any File that can find hidden files on a Mac, webappsstore.sqlite can be trashed normally after FF is closed.

    FF is acting strangely. If I’m offline when I start FF and I “quit,” FF just hangs. I either have to force it to quit or, if it is left to itself, it crashes and I get a lovely message from the Mozilla Crash Reporter. (I’ve submitted a report)

  6. Dougle said on December 12, 2015 at 2:22 am
    Reply

    It’s possible to view and manipulate the contents of local storage via the developer tools. In web console type localStorage;

    Better, add the storage option via the developer tools settings. This provides access to dom, indexed db, session, cookies etc.

  7. Belga said on December 12, 2015 at 6:41 pm
    Reply

    Are all the infos contained in these caches not removed by CCleaner “improved by CCEnhancer” (at least mostly)?
    I see the options “Firefox HTML storage” and “webappsstore.sqlite” and with a right click, you can analyze these caches and clean them.

  8. Drugoy said on December 14, 2015 at 7:43 pm
    Reply

    You omitted plugins’ cache files & folders.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.