76 lines
4.8 KiB
Nix
76 lines
4.8 KiB
Nix
{
|
|
/*** [SECTION 2700]: PERSISTENT STORAGE
|
|
Data SET by websites including
|
|
cookies : profile\cookies.sqlite
|
|
localStorage : profile\webappsstore.sqlite
|
|
indexedDB : profile\storage\default
|
|
appCache : profile\OfflineCache
|
|
serviceWorkers :
|
|
|
|
[NOTE] indexedDB and serviceWorkers are not available in Private Browsing Mode
|
|
[NOTE] Blocking cookies also blocks websites access to: localStorage (incl. sessionStorage),
|
|
indexedDB, sharedWorker, and serviceWorker (and therefore service worker cache and notifications)
|
|
If you set a site exception for cookies (either "Allow" or "Allow for Session") then they become
|
|
accessible to websites except shared/service workers where the cookie setting *must* be "Allow"
|
|
***/
|
|
/* 2701: disable or isolate 3rd-party cookies and site-data [SETUP-WEB]
|
|
* 0 = Accept cookies and site data
|
|
* 1 = (Block) All third-party cookies
|
|
* 2 = (Block) All cookies
|
|
* 3 = (Block) Cookies from unvisited websites
|
|
* 4 = (Block) Cross-site tracking cookies (default)
|
|
* 5 = (Isolate All) Cross-site cookies (TCP: Total Cookie Protection / dFPI: dynamic FPI) [1] (FF86+)
|
|
* Option 5 with FPI enabled (4001) is ignored and not shown, and option 4 used instead
|
|
* [NOTE] You can set cookie exceptions under site permissions or use an extension
|
|
* [NOTE] Enforcing category to custom ensures ETP related prefs are always honored
|
|
* [SETTING] Privacy & Security>Enhanced Tracking Protection>Custom>Cookies
|
|
* [1] https://blog.mozilla.org/security/2021/02/23/total-cookie-protection/ ***/
|
|
"network.cookie.cookieBehavior" = 1;
|
|
"browser.contentblocking.category" = "custom";
|
|
/* 2702: set third-party cookies (if enabled, see 2701) to session-only
|
|
* [NOTE] .sessionOnly overrides .nonsecureSessionOnly except when .sessionOnly=false and
|
|
* .nonsecureSessionOnly=true. This allows you to keep HTTPS cookies, but session-only HTTP ones
|
|
* [1] https://feeding.cloud.geek.nz/posts/tweaking-cookies-for-privacy-in-firefox/ ***/
|
|
"network.cookie.thirdparty.sessionOnly" = true;
|
|
"network.cookie.thirdparty.nonsecureSessionOnly" = true; # [FF58+]
|
|
/* 2703: delete cookies and site data on close
|
|
* 0=keep until they expire (default), 2=keep until you close Firefox
|
|
* [NOTE] The setting below is disabled (but not changed) if you block all cookies (2701 = 2)
|
|
* [SETTING] Privacy & Security>Cookies and Site Data>Delete cookies and site data when Firefox is closed ***/
|
|
# // user_pref("network.cookie.lifetimePolicy", 2);
|
|
/* 2710: enable Enhanced Tracking Protection (ETP) in all windows
|
|
* [SETTING] Privacy & Security>Enhanced Tracking Protection>Custom>Tracking content
|
|
* [SETTING] to add site exceptions: Urlbar>ETP Shield
|
|
* [SETTING] to manage site exceptions: Options>Privacy & Security>Enhanced Tracking Protection>Manage Exceptions ***/
|
|
"privacy.trackingprotection.enabled" = true;
|
|
/* 2711: enable various ETP lists ***/
|
|
"privacy.trackingprotection.socialtracking.enabled" = true;
|
|
# // user_pref("privacy.trackingprotection.cryptomining.enabled", true); // [DEFAULT: true]
|
|
# // user_pref("privacy.trackingprotection.fingerprinting.enabled", true); // [DEFAULT: true]
|
|
/* 2720: disable DOM (Document Object Model) Storage
|
|
* [WARNING] This will break a LOT of sites' functionality AND extensions!
|
|
* You are better off using an extension for more granular control ***/
|
|
# // user_pref("dom.storage.enabled", false);
|
|
/* 2730: disable offline cache (appCache)
|
|
* [NOTE] In FF90+ the storage capability has been removed (1694662). For FF78-89 see the 2730 deprecated pref
|
|
* [WARNING] The API is easily fingerprinted, do not disable ***/
|
|
# // user_pref("browser.cache.offline.enable", false);
|
|
/* 2740: disable service worker cache and cache storage
|
|
* [NOTE] We clear service worker cache on exiting Firefox (see 2803)
|
|
* [1] https://w3c.github.io/ServiceWorker/#privacy ***/
|
|
# // user_pref("dom.caches.enabled", false);
|
|
/* 2750: disable Storage API [FF51+]
|
|
* The API gives sites the ability to find out how much space they can use, how much
|
|
* they are already using, and even control whether or not they need to be alerted
|
|
* before the user agent disposes of site data in order to make room for other things.
|
|
* [1] https://developer.mozilla.org/docs/Web/API/StorageManager
|
|
* [2] https://developer.mozilla.org/docs/Web/API/Storage_API
|
|
* [3] https://blog.mozilla.org/l10n/2017/03/07/firefox-l10n-report-aurora-54/ ***/
|
|
# // user_pref("dom.storageManager.enabled", false);
|
|
/* 2755: disable Storage Access API [FF65+]
|
|
* [1] https://developer.mozilla.org/docs/Web/API/Storage_Access_API ***/
|
|
# // user_pref("dom.storage_access.enabled", false);
|
|
/* 2760: enable Local Storage Next Generation (LSNG) [FF65+] ***/
|
|
"dom.storage.next_gen" = true;
|
|
}
|