Share via


if element

Important  This feature has been removed from Windows 10 and only minimally supported on previous versions of Windows. See "P3P is no longer supported" for more info.

 

Obsolete. Specifies a cookie action based on a cookie's compact privacy policy.

Usage

<if
  expr = "expr"
  action = "action"/>

Attributes

Attribute Type Required Description

action

action

Yes

Describes the cookie action taken if the expression evaluates to true.

(accept)

Accept cookie.

(prompt)

Prompt user to accept or deny cookie.

(forceFirstParty)

Leash cookies so they are only sent in first-party context.

(forceSession)

Convert a persistent cookie to a session cookie.

(reject)

Reject cookie.

expr

expr

Yes

Expression specifying various combinations of compact privacy policy tokens. The comma(,) denotes the AND operation and the (!) denotes the NOT operation. For example, "PHY, !TEL", describes a cookie in which the compact policy includes the token "PHY" but not the token "TEL". For a better understanding of compact policies and a complete list of compact tokens, see the W3C: Platform for Privacy Preferences (P3P) Project specification.

Child elements

There are no child elements.

Parent elements

Element

firstParty

thirdParty

Remarks

When specifying a list of these rules, the first rule to evaluate to true decides the action. The remaining rules are ignored.

Examples

The following example shows the syntax for this element.

<firstparty noPolicyDefault="reject" noRuleDefault="accept" alwaysAllowSession="yes">
      <if expr="TEL" action="reject"/>
      <if expr="FIN,CON" action="forceSession"/>
      <if expr="GOV,PUB" action="forceSession"/>
</firstparty>

Element information

Minimum supported system

Windows XP
Can be empty Yes