diff --git a/Optional-Hardening.md b/Optional-Hardening.md index c03091b..d7df1af 100644 --- a/Optional-Hardening.md +++ b/Optional-Hardening.md @@ -82,21 +82,32 @@ user_pref("network.dns.skipTRR-when-parental-control-enabled", false); *** ### Sanitize on close -Clear browsing data on shutdown: -* Go to `☰` *→ Settings → Privacy & Security → Cookies and Site Data → Delete cookies and site data when Firefox is closed* - +#### Option 1: Clear all browsing data on shutdown except, except browser history +* `☰` *→ Settings → Privacy & Security → Cookies and Site Data → Delete cookies and site data when Firefox is closed* ``` -// PREF: clear browsing data on shutdown, while respecting site exceptions +// PREF: clear all browsing data on shutdown (except browser history) +user_pref("privacy.sanitize.sanitizeOnShutdown", true); +user_pref("privacy.clearOnShutdown.cache", true); +user_pref("privacy.clearOnShutdown.cookies", true); +user_pref("privacy.clearOnShutdown.offlineApps", true); +user_pref("browser.sessionstore.privacy_level", 2); +``` + +#### Option 2: Clear all browsing data on shutdown +``` +// PREF: clear browsing data on shutdown user_pref("privacy.sanitize.sanitizeOnShutdown", true); user_pref("privacy.clearOnShutdown.history", true); user_pref("privacy.clearOnShutdown.formdata", true); user_pref("privacy.clearOnShutdown.sessions", true); +user_pref("privacy.clearOnShutdown.cache", true); +user_pref("privacy.clearOnShutdown.cookies", true); user_pref("privacy.clearOnShutdown.offlineApps", true); user_pref("privacy.clearOnShutdown.siteSettings", false); user_pref("browser.sessionstore.privacy_level", 2); ``` -If you have session restore enable (_Settings → General → Startup → Open previous windows and tabs_), then you will need to omit `privacy.clearOnShutdown.history` for session restore to work. +:warning: If you have session restore enable (_Settings → General → Startup → Open previous windows and tabs_), then you will need to use **Option 1** for session restore to work. You can allow exceptions if you want to stay logged in to some sites: * Go to `☰` *→ Settings → Privacy & Security → Cookies and Site Data → Manage Exceptions*