Skip to content

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)

policies.json
{
"policies": {
"SanitizeOnShutdown": true
}
}
policies.json
{
"policies": {
"SanitizeOnShutdown": {
"Cache": true,
"Cookies": true,
"FormData": true,
"History": false,
"Sessions": true,
"SiteSettings": true,
"Locked": true
}
}
}
JSON schema
SanitizeOnShutdown 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]?://[^/]+/?)$"
}
}
}
}

SanitizeOnShutdown accepts either a boolean or an object. When set as a boolean:

  • Set to true to clear all supported local data on shutdown.
  • Set to false to 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:

  • Cache
  • Cookies
  • Downloads: Download history (Deprecated - use History instead)
  • FormData: Form history
  • History: Browsing history, download history
  • Sessions: Active logins
  • SiteSettings: Site preferences
  • OfflineApps: Offline Website Data (Deprecated - use Cookies instead)
  • Locked: Prevents the user from changing these preferences.

Clear all data:

Software\Policies\Mozilla\Firefox\SanitizeOnShutdown = 0x1 | 0x0

Clear specific data types:

Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Cache = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Cookies = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\FormData = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\History = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Sessions = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\SiteSettings = 0x1 | 0x0
Software\Policies\Mozilla\Firefox\SanitizeOnShutdown\Locked = 0x1 | 0x0

Clear all data, OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/C_SanitizeOnShutdown

Value (string):

<enabled/> or <disabled/>

Cache OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/A_SanitizeOnShutdown_Cache

Value (string):

<enabled/> or <disabled/>

Cookies OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/B_SanitizeOnShutdown_Cookies

Value (string):

<enabled/> or <disabled/>

FormData OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/E_SanitizeOnShutdown_FormData

Value (string):

<enabled/> or <disabled/>

History OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/E_SanitizeOnShutdown_History

Value (string):

<enabled/> or <disabled/>

Sessions OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/F_SanitizeOnShutdown_Sessions

Value (string):

<enabled/> or <disabled/>

SiteSettings OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/G_SanitizeOnShutdown_SiteSettings

Value (string):

<enabled/> or <disabled/>

Locked OMA-URI:

./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~SanitizeOnShutdown/I_SanitizeOnShutdown_Locked

Value (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>