SanitizeOnShutdown
Clear local data on shutdown.
SanitizeOnShutdown accepts either a boolean to clear all data types or an object to choose which data types to clear.
Items that can be selectively deleted include browsing & download history, cookies, active logins, caches, form history, and site preferences.
Compatibility: Firefox 60, Firefox ESR 60. Object form added in Firefox 68/ESR 68, Locked added in 74/68.6, History in Firefox 128.
CCK2 Equivalent: N/A
Preferences Affected: privacy.sanitize.sanitizeOnShutdown, privacy.clearOnShutdown.cache, privacy.clearOnShutdown.cookies, privacy.clearOnShutdown.downloads, privacy.clearOnShutdown.formdata, privacy.clearOnShutdown.history, privacy.clearOnShutdown.sessions, privacy.clearOnShutdown.siteSettings, privacy.clearOnShutdown.offlineApps, privacy.clearOnShutdown_v2.browsingHistoryAndDownloads (Firefox 128), privacy.clearOnShutdown_v2.cookiesAndStorage (Firefox 128), privacy.clearOnShutdown_v2.cache (Firefox 128), privacy.clearOnShutdown_v2.siteSettings (Firefox 128), privacy.clearOnShutdown_v2.formdata (Firefox 128)
Examples
Section titled “Examples”{ "policies": { "SanitizeOnShutdown": true }}{ "policies": { "SanitizeOnShutdown": { "Cache": true, "Cookies": true, "FormData": true, "History": false, "Sessions": true, "SiteSettings": true, "Locked": true } }}JSON schema
{ "type": [ "boolean", "object" ], "properties": { "Cache": { "type": "boolean" }, "Cookies": { "type": "boolean" }, "Downloads": { "type": "boolean" }, "FormData": { "type": "boolean" }, "History": { "type": "boolean" }, "Sessions": { "type": "boolean" }, "SiteSettings": { "type": "boolean" }, "OfflineApps": { "type": "boolean" }, "Locked": { "type": "boolean" }, "Exceptions": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^([Ff][Ii][Ll][Ee]://.*|[Hh][Tt][Tt][Pp][Ss]?://[^/]+/?)$" } } }}Values
Section titled “Values”SanitizeOnShutdown accepts either a boolean or an object.
When set as a boolean:
- Set to
trueto clear all supported local data on shutdown. - Set to
falseto clear nothing.
When set as an object, any member omitted is treated as false, taking precedence over user settings for that data type.
Accepts one or more of the following members to clear specific data types:
CacheCookiesDownloads: Download history (Deprecated - useHistoryinstead)FormData: Form historyHistory: Browsing history, download historySessions: Active loginsSiteSettings: Site preferencesOfflineApps: Offline Website Data (Deprecated - useCookiesinstead)Locked: Prevents the user from changing these preferences.
Windows (GPO)
Section titled “Windows (GPO)”Clear all data:
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown = 0x1 | 0x0Clear specific data types:
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Cache = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Cookies = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\FormData = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\History = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Sessions = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\SiteSettings = 0x1 | 0x0Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Locked = 0x1 | 0x0Windows (Intune)
Section titled “Windows (Intune)”Clear all data, OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/C_SanitizeOnShutdownValue (string):
<enabled/> or <disabled/>Cache OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/A_SanitizeOnShutdown_CacheValue (string):
<enabled/> or <disabled/>Cookies OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/B_SanitizeOnShutdown_CookiesValue (string):
<enabled/> or <disabled/>FormData OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/E_SanitizeOnShutdown_FormDataValue (string):
<enabled/> or <disabled/>History OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/E_SanitizeOnShutdown_HistoryValue (string):
<enabled/> or <disabled/>Sessions OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/F_SanitizeOnShutdown_SessionsValue (string):
<enabled/> or <disabled/>SiteSettings OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/G_SanitizeOnShutdown_SiteSettingsValue (string):
<enabled/> or <disabled/>Locked OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/I_SanitizeOnShutdown_LockedValue (string):
<enabled/> or <disabled/>Clear all data:
<dict> <key>SanitizeOnShutdown</key> <true/> | <false/></dict>Clear specific data types:
<dict> <key>SanitizeOnShutdown</key> <dict> <key>Cache</key> <true/> | <false/> <key>Cookies</key> <true/> | <false/> <key>FormData</key> <true/> | <false/> <key>History</key> <true/> | <false/> <key>Sessions</key> <true/> | <false/> <key>SiteSettings</key> <true/> | <false/> <key>Locked</key> <true/> | <false/> </dict></dict>