Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Which about:config setting control Delete cookies and site data when Firefox is closed?

  • 5 svar
  • 1 har dette problemet
  • 13 views
  • Siste svar av cor-el

more options

We have Firefox deployed to hundreds of workstations in a domain environment. We would like to control local site data storage, such as setting the amount of local site data storage can be used, which sites can store local data, or just have Firefox delete site data when closed.

We use Firefox .cfg file to set different options, such as this: // Set cache size limit clearPref("browser.cache.disk.capacity") lockPref("browser.cache.disk.capacity", 10240);

But we cannot find an option to control site data. Is there any configuration for controlling local site data that we can deploy to all users/installations?

Thanks!

-Mike

We have Firefox deployed to hundreds of workstations in a domain environment. We would like to control local site data storage, such as setting the amount of local site data storage can be used, which sites can store local data, or just have Firefox delete site data when closed. We use Firefox .cfg file to set different options, such as this: // Set cache size limit clearPref("browser.cache.disk.capacity") lockPref("browser.cache.disk.capacity", 10240); But we cannot find an option to control site data. Is there any configuration for controlling local site data that we can deploy to all users/installations? Thanks! -Mike

All Replies (5)

more options

For "Delete cookies and site data when Firefox is closed" it is this preference:

network.cookie.lifetimePolicy

Possible values are:

  • 0 => use expiration date set by the site
  • 2 => set expiration to session only

For local DOM storage, there are some storage quota preferences, but I couldn't tell you which ones would be most useful. For example, you could search for more info on these:

  • dom.storage.default_quota
  • dom.storage.default_site_quota

As for which sites can set storage, I think cookie permissions/exceptions also control that, but you can test.

more options

Hi @jscher2000

Thanks for the reply. Unfortunately, the dom.storage doesn't seem to be associated with the offline site data. We had set those to the defaults of 5MB and 25MB, but some sites are storing more than 1GB.

For cookies, we actually want to keep cookies. We just want to cut down on the local site data storage, since we use roaming profiles, and Firefox is storing several GBs for many users for SharePoint, OWA, Slack, Teams, etc. We were going to just delete the files in the "storage" subfolder upon logoff, but I would prefer a native solution if one exists.

more options

What do you think about using Sanitize at Shutdown (Clear history when Firefox closes) with just offline data storage?

It's slightly dangerous to enable without turning off the other categories. Please test carefully:

Categories:

  • privacy.clearOnShutdown.cache => defaults to true, keep on true?
  • privacy.clearOnShutdown.cookies => defaults to true, set to false
  • privacy.clearOnShutdown.downloads => defaults to true, set to false
  • privacy.clearOnShutdown.formdata ("Form & Search History") => defaults to true, set to false
  • privacy.clearOnShutdown.history => defaults to true, set to false
  • privacy.clearOnShutdown.offlineApps ("Offline Website Data") => defaults to false, set to true
  • privacy.clearOnShutdown.openWindows => defaults to false, keep on false
  • privacy.clearOnShutdown.sessions ("Active Logins") => defaults to true, set to false
  • privacy.clearOnShutdown.siteSettings ("Site Preferences") => defaults to false, keep on false

Master switch:

  • privacy.sanitize.sanitizeOnShutdown => defaults to false, only set to true if safe
more options

Yeah, I actually tried that through a policies.json file located in the "%PROGRAMFILES%\Mozilla Firefox\distribution" folder, but it didn't seem to have any impact on our test systems (closing/reopening several times, but all offline storage files remained):

{

 "policies": {
   "SanitizeOnShutdown": {
     "Cache": true
     "OfflineApps": true
   }
 }

}

more options

See also:

  • Bug 1681493 - [meta] Deprecate and remove network.cookie.lifetimePolicy

Note that you posted invalid JSON (missing comma on Cache line). You can check the about:policies page to see whether policies are active and if errors are reported.


{
 "policies": {
   "SanitizeOnShutdown": {
     "Cache": true,
     "OfflineApps": true
   }
 }
}