7.4.1 API to Request a Site-specific Exception

void storeSiteSpecificTrackingException ( StoreSiteSpecificExceptionPropertyBag properties)
Called by a page to store a site-specific tracking exception.
DOMString? domain
Cookie-like domain string to which the exception applies.
DOMString? siteName
A user-readable string for the name of the top-level origin.
DOMString? explanationString
A short explanation of the request.
DOMString? detailURI
A location at which further information about this request can be found.
DOMString? expires
A date and time, encoded as described for the cookie Expires attribute described in [[RFC6265]], indicating the maximum lifetime of the remembered grant.
long? maxAge
A positive number of seconds indicating the maximum lifetime of the remembered grant.
sequence<DOMString> arrayOfDomainStrings
A JavaScript array of strings.

The storeSiteSpecificTrackingException method takes a dictionary argument of type StoreSiteSpecificExceptionPropertyBag that allows optional information to be provided.

If the request does not include the arrayOfDomainStrings, then this request is for a site-wide exception. Otherwise each string in arrayOfDomainStrings specifies a target. When called, storeSiteSpecificTrackingException MUST return immediately.

If the list arrayOfDomainStrings is supplied, the user agent MAY choose to store a site-wide exception. If it does so it MUST indicate this in the return value.

If domain is not specified or is null or empty then the execution of this API and the use of the resulting permission (if granted) use the 'implicit' parameter, when the API is called, the document origin. This forms the first part of the duplet in the logical model, and hence in operation will be compared with the top-level origin.

If permission is stored for an explicit list, then the set of duplets (one per target):

[document-origin, target]

is added to the database of remembered grants.

If permission is stored for a site-wide exception, then the duplet:

[document-origin, * ]

is added to the database of remembered grants.

If domain is supplied and not empty then it is treated in the same way as the domain parameter to cookies and allows setting for subdomains. The domain argument can be set to fully-qualified right-hand segment of the document host name, up to one level below TLD.

For example, www.foo.bar.example.com may set the domain parameter as as "bar.example.com" or "example.com", but not to "something.else.example.com" or "com".

If the document-origin would not be able to set a cookie on the domain following the cookie domain rules [[!RFC6265]] (e.g. domain is not a right-hand match or is a TLD) then the duplet MUST NOT be entered into the database and a SYNTAX_ERR exception SHOULD be thrown.

If permission is stored for an explicit list, then the set of duplets (one per target):

[*.domain, target]

is added to the database of remembered grants.

If permission is stored for a site-wide exception, then the duplet:

[*.domain, * ]

is added to the database of remembered grants.

A particular response to the API — like a DNT response header — is only valid immediately, and users may choose to edit the list of stored exceptions and revoke some or all of them.

If expires is supplied and not null or empty the remembered grant will be cancelled (i.e. processed as if the relevant Cancel API had been called) no later than the specified date and time. After this the database of remembered grants will no longer contains any duplets for which the first part is the current document origin; i.e., no duplets [document-origin, target] for any target.

If maxAge is supplied and not null, empty or negative the remembered grant will be cancelled (i.e. processed as if the relevant Cancel API had been called) no later than the specified number of seconds following the grant.

If both maxAge and expires are supplied, maxAge has precedence. If neither maxAge or expires are supplied, the user agent MAY retain the remembered grant until it is cancelled.