Cookies
Configure cookie preferences.
Compatibility: Firefox 60, Firefox ESR 60 (RejectTracker added in Firefox 63, AllowSession added in Firefox 79/78.1, Behavior added in Firefox 95/91.4, reject-tracker-and-partition-foreign renamed to partition-foreign in Firefox 153)
CCK2 Equivalent: N/A
Preferences Affected: network.cookie.cookieBehavior, network.cookie.cookieBehavior.pbmode, network.cookie.lifetimePolicy
Examples
Section titled “Examples”{ "policies": { "Cookies": { "Allow": [ "http://example.org/" ], "AllowSession": [ "http://example.edu/" ], "Block": [ "http://example.com/" ], "Locked": true, "Behavior": "accept", "BehaviorPrivateBrowsing": "accept" } }}JSON schema
{ "type": "object", "properties": { "Allow": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^([Ff][Ii][Ll][Ee]://.*|[Hh][Tt][Tt][Pp][Ss]?://[^/]+/?)$" } }, "AllowSession": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^([Ff][Ii][Ll][Ee]://.*|[Hh][Tt][Tt][Pp][Ss]?://[^/]+/?)$" } }, "Block": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^([Ff][Ii][Ll][Ee]://.*|[Hh][Tt][Tt][Pp][Ss]?://[^/]+/?)$" } }, "Default": { "type": "boolean" }, "AcceptThirdParty": { "type": "string", "enum": [ "always", "never", "from-visited" ] }, "RejectTracker": { "type": "boolean" }, "ExpireAtSessionEnd": { "type": "boolean" }, "Locked": { "type": "boolean" }, "Behavior": { "type": "string", "enum": [ "accept", "reject-foreign", "reject", "limit-foreign", "reject-tracker", "reject-tracker-and-partition-foreign", "partition-foreign" ] }, "BehaviorPrivateBrowsing": { "type": "string", "enum": [ "accept", "reject-foreign", "reject", "limit-foreign", "reject-tracker", "reject-tracker-and-partition-foreign", "partition-foreign" ] } }}Values
Section titled “Values”Allowis a list of origins (not domains) where cookies are always allowed. You must includehttporhttps. As of Firefox 154, usingAllowto exempt sites from clearing on shutdown is deprecated. Firefox migrates origins to the new mechanism, but you should useSanitizeOnShutdown'sExceptionsinstead.AllowSessionis a list of origins (not domains) where cookies are only allowed for the current session. You must includehttporhttps.Blockis a list of origins (not domains) where cookies are always blocked. You must includehttporhttps.Behaviorsets the default behavior for cookies based on the following values:accept: Accept all cookies.reject-foreign: Reject third party cookies.reject: Reject all cookies.limit-foreign: Reject third party cookies for sites you haven't visited.reject-tracker: Reject cookies for known trackers (default).partition-foreign: (Firefox 153) Reject cookies for known trackers and partition third-party cookies, also known as Total Cookie Protection (default for private browsing).reject-tracker-and-partition-foreign: (Deprecated. Renamed topartition-foreignin Firefox 153. Update existing configurations to usepartition-foreign.)
BehaviorPrivateBrowsingsets the default behavior for cookies in private browsing. Accepts the same values asBehavior.Lockedprevents the user from changing cookie preferences.Default: determines whether cookies are accepted at all. (Deprecated. UseBehaviorinstead)AcceptThirdPartydetermines how third-party cookies are handled. (Deprecated. UseBehaviorinstead)RejectTrackeronly rejects cookies for trackers. (Deprecated. UseBehaviorinstead)ExpireAtSessionEnddetermines when cookies expire. (Deprecated. UseSanitizeOnShutdowninstead)
Windows (GPO)
Section titled “Windows (GPO)”Software\Policies\Mozilla\Firefox\Cookies\Allow\1 = "https://example.com"Software\Policies\Mozilla\Firefox\Cookies\AllowSession\1 = "https://example.edu"Software\Policies\Mozilla\Firefox\Cookies\Block\1 = "https://example.org"Software\Policies\Mozilla\Firefox\Cookies\Behavior = "accept" | "reject-foreign" | "reject" | "limit-foreign" | "reject-tracker" | "partition-foreign"Software\Policies\Mozilla\Firefox\Cookies\BehaviorPrivateBrowsing = "accept" | "reject-foreign" | "reject" | "limit-foreign" | "reject-tracker" | "partition-foreign"Software\Policies\Mozilla\Firefox\Cookies\Locked = 0x1 | 0x0Windows (Intune)
Section titled “Windows (Intune)”OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_AllowValue (string):
<enabled/><data id="Permissions" value="1https://example.com"/>OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_AllowSessionValue (string):
<enabled/><data id="Permissions" value="1https://example.edu"/>OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_BlockValue (string):
<enabled/><data id="Permissions" value="1https://example.org"/>OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_LockedValue (string):
<enabled/> or <disabled/>OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_BehaviorValue (string):
<enabled/><data id="Cookies_Behavior" value="accept | reject-foreign | reject | limit-foreign | reject-tracker | partition-foreign"/>OMA-URI:
./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox~Cookies/Cookies_BehaviorPrivateBrowsingValue (string):
<enabled/><data id="Cookies_BehaviorPrivateBrowsing" value="accept | reject-foreign | reject | limit-foreign | reject-tracker | partition-foreign"/><dict> <key>Cookies</key> <dict> <key>Allow</key> <array> <string>http://example.com</string> </array> <key>AllowSession</key> <array> <string>http://example.edu</string> </array> <key>Block</key> <array> <string>http://example.org</string> </array> <key>Locked</key> <true/> | <false/> <key>Behavior</key> <string>accept | reject-foreign | reject | limit-foreign | reject-tracker | partition-foreign</string> <key>BehaviorPrivateBrowsing</key> <string>accept | reject-foreign | reject | limit-foreign | reject-tracker | partition-foreign</string> </dict></dict>