ClearOnShutdown
Clear browsing data when the browser closes.
This policy reflects the categories that users see in Firefox Settings: browsing & download history, cookies and site data, temporary cached files and pages, saved form info, and site settings.
This policy supersedes SanitizeOnShutdown and when both are set, SanitizeOnShutdown is ignored and Firefox logs an error.
Unlike SanitizeOnShutdown, only the categories an admin defines through policy are enforced.
Omitted categories are under the user's control rather than being disabled.
Values
Section titled “Values”ClearOnShutdown accepts either a boolean or an object.
When set as a boolean:
- Set to
trueto clear every data category on shutdown. - Set to
falseto enforce that nothing is cleared on shutdown. Users cannot turn data clearing back on.
When set as an object, clearing on shutdown is turned on and each named member is locked to the value in the policy. Accepts one or more of the following members:
BrowsingHistoryAndDownloads: Browsing and download historyCookiesAndStorage: Cookies, site data and active loginsCache: Temporary cached files and pagesFormData: Saved form and search entriesSiteSettings: Site permissions and preferencesExceptions: A list of origins (not domains) whose cookies and site data are not cleared on shutdown. You must includehttporhttps.
Examples
Section titled “Examples”{ "policies": { "ClearOnShutdown": false }}{ "policies": { "ClearOnShutdown": { "BrowsingHistoryAndDownloads": true, "CookiesAndStorage": true, "Cache": true, "Exceptions": [ "https://example.com" ] } }}JSON schema
{ "type": [ "boolean", "object" ], "properties": { "BrowsingHistoryAndDownloads": { "type": "boolean" }, "CookiesAndStorage": { "type": "boolean" }, "Cache": { "type": "boolean" }, "FormData": { "type": "boolean" }, "SiteSettings": { "type": "boolean" }, "Exceptions": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^([Ff][Ii][Ll][Ee]://.*|[Hh][Tt][Tt][Pp][Ss]?://[^/]+/?)$" } } }}Windows (GPO)
Section titled “Windows (GPO)”Clear all data:
Software\Policies\Mozilla\Firefox\ClearOnShutdown = 0x1 | 0x0Clear specific data types:
Software\Policies\Mozilla\Firefox\ClearOnShutdown\BrowsingHistoryAndDownloads = 0x1 | 0x0Software\Policies\Mozilla\Firefox\ClearOnShutdown\CookiesAndStorage = 0x1 | 0x0Software\Policies\Mozilla\Firefox\ClearOnShutdown\Cache = 0x1 | 0x0Software\Policies\Mozilla\Firefox\ClearOnShutdown\FormData = 0x1 | 0x0Software\Policies\Mozilla\Firefox\ClearOnShutdown\SiteSettings = 0x1 | 0x0Software\Policies\Mozilla\Firefox\ClearOnShutdown\Exceptions\1 = "https://example.com"Clear all data:
<dict> <key>ClearOnShutdown</key> <true/> | <false/></dict>Clear specific data types:
<dict> <key>ClearOnShutdown</key> <dict> <key>BrowsingHistoryAndDownloads</key> <true/> | <false/> <key>CookiesAndStorage</key> <true/> | <false/> <key>Cache</key> <true/> | <false/> <key>FormData</key> <true/> | <false/> <key>SiteSettings</key> <true/> | <false/> <key>Exceptions</key> <array> <string>https://example.com</string> </array> </dict></dict>Compatibility
Section titled “Compatibility”| Firefox | Firefox ESR | Firefox Enterprise |
|---|---|---|
| Available since 158 | Not supported | Available since 158 |
CCK2 Equivalent: N/A
Preferences Affected: privacy.sanitize.sanitizeOnShutdown, privacy.clearOnShutdown_v2.browsingHistoryAndDownloads, privacy.clearOnShutdown_v2.cookiesAndStorage, privacy.clearOnShutdown_v2.cache, privacy.clearOnShutdown_v2.formdata, privacy.clearOnShutdown_v2.siteSettings
See also
Section titled “See also”SanitizeOnShutdown, superseded byClearOnShutdown.Cookiesto allow or block cookies per site.