From e28359e6b39545ed4320118475ee2b34e7443993 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 21 Sep 2026 14:40:24 +0200 Subject: [PATCH 1/2] feat(docs): Add ClearOnShutdown policy --- .../reference/policies/ClearOnShutdown.mdx | 105 ++++++++++++++++++ .../reference/policies/SanitizeOnShutdown.mdx | 9 ++ src/plugins/inject-oma-uri.mjs | 1 + 3 files changed, 115 insertions(+) create mode 100644 src/content/docs/reference/policies/ClearOnShutdown.mdx diff --git a/src/content/docs/reference/policies/ClearOnShutdown.mdx b/src/content/docs/reference/policies/ClearOnShutdown.mdx new file mode 100644 index 0000000..706509b --- /dev/null +++ b/src/content/docs/reference/policies/ClearOnShutdown.mdx @@ -0,0 +1,105 @@ +--- +title: "ClearOnShutdown" +description: "Clear browsing data when the browser closes." +category: "Local data storage" +--- + +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`](/reference/policies/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. + +## Examples + + + +## Values + +`ClearOnShutdown` accepts either a boolean or an object. +When set as a boolean: + +- Set to `true` to clear every data category on shutdown. +- Set to `false` to 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 history +- `CookiesAndStorage`: Cookies, site data and active logins +- `Cache`: Temporary cached files and pages +- `FormData`: Saved form and search entries +- `SiteSettings`: Site permissions and preferences +- `Exceptions`: A list of origins (not domains) whose cookies and site data are not cleared on shutdown. You must include `http` or `https`. + +> [!NOTE] +> Every category the policy sets is locked, so there is no `Locked` option. + +## Windows (GPO) + +Clear all data: + +``` +Software\Policies\Mozilla\Firefox\ClearOnShutdown = 0x1 | 0x0 +``` + +Clear specific data types: + +``` +Software\Policies\Mozilla\Firefox\ClearOnShutdown\BrowsingHistoryAndDownloads = 0x1 | 0x0 +Software\Policies\Mozilla\Firefox\ClearOnShutdown\CookiesAndStorage = 0x1 | 0x0 +Software\Policies\Mozilla\Firefox\ClearOnShutdown\Cache = 0x1 | 0x0 +Software\Policies\Mozilla\Firefox\ClearOnShutdown\FormData = 0x1 | 0x0 +Software\Policies\Mozilla\Firefox\ClearOnShutdown\SiteSettings = 0x1 | 0x0 +Software\Policies\Mozilla\Firefox\ClearOnShutdown\Exceptions\1 = "https://example.com" +``` + +## macOS + +Clear all data: + +```xml + + ClearOnShutdown + | + +``` + +Clear specific data types: + +```xml + + ClearOnShutdown + + BrowsingHistoryAndDownloads + | + CookiesAndStorage + | + Cache + | + FormData + | + SiteSettings + | + Exceptions + + https://example.com + + + +``` + +## Compatibility + + + +**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 + +- [`SanitizeOnShutdown`](/reference/policies/sanitizeonshutdown/), superseded by `ClearOnShutdown`. +- [`Cookies`](/reference/policies/cookies/) to allow or block cookies per site. diff --git a/src/content/docs/reference/policies/SanitizeOnShutdown.mdx b/src/content/docs/reference/policies/SanitizeOnShutdown.mdx index 6c9772f..f83206b 100644 --- a/src/content/docs/reference/policies/SanitizeOnShutdown.mdx +++ b/src/content/docs/reference/policies/SanitizeOnShutdown.mdx @@ -8,6 +8,11 @@ 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. +> [!NOTE] +> Starting with Firefox 158, [`ClearOnShutdown`](/reference/policies/clearonshutdown/) supersedes this policy. +> When both are set, `SanitizeOnShutdown` is ignored entirely. +> Keep using `SanitizeOnShutdown` for Firefox ESR and for versions before 158. + > [!NOTE] Starting with Firefox 136, `FormData` and `History` are separate data types. ## Examples @@ -104,3 +109,7 @@ Object form added in Firefox 68/ESR 68, `Locked` added in 74/68.6, `History` in **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) + +## See also + +- [`ClearOnShutdown`](/reference/policies/clearonshutdown/), which supersedes this policy in Firefox 158. diff --git a/src/plugins/inject-oma-uri.mjs b/src/plugins/inject-oma-uri.mjs index 84d7ee8..e5521a2 100644 --- a/src/plugins/inject-oma-uri.mjs +++ b/src/plugins/inject-oma-uri.mjs @@ -25,6 +25,7 @@ const NO_ADMX_EQUIVALENT = new Set([ const MISSING_UPSTREAM = new Set([ "AccessConnector", "AIChatbot", + "ClearOnShutdown", "CrashReportsSubmit", "DisableAccounts", "RelaunchRequired", From f7290401563195c3f2787cf9861b86aaf8d18b67 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 21 Sep 2026 14:42:29 +0200 Subject: [PATCH 2/2] feat(docs): Add ClearOnShutdown policy --- src/content/docs/reference/policies/SanitizeOnShutdown.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/docs/reference/policies/SanitizeOnShutdown.mdx b/src/content/docs/reference/policies/SanitizeOnShutdown.mdx index f83206b..35d0ca4 100644 --- a/src/content/docs/reference/policies/SanitizeOnShutdown.mdx +++ b/src/content/docs/reference/policies/SanitizeOnShutdown.mdx @@ -11,9 +11,6 @@ Items that can be selectively deleted include browsing & download history, cooki > [!NOTE] > Starting with Firefox 158, [`ClearOnShutdown`](/reference/policies/clearonshutdown/) supersedes this policy. > When both are set, `SanitizeOnShutdown` is ignored entirely. -> Keep using `SanitizeOnShutdown` for Firefox ESR and for versions before 158. - -> [!NOTE] Starting with Firefox 136, `FormData` and `History` are separate data types. ## Examples @@ -107,6 +104,8 @@ Clear specific data types: Object form added in Firefox 68/ESR 68, `Locked` added in 74/68.6, `History` in Firefox 128, `Exceptions` in Firefox 154. +> [!NOTE] Starting with Firefox 136, `FormData` and `History` are separate data types. + **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)