Skip to content

Commit 926979f

Browse files
Merge pull request #160 from w3c/csd-impression
Clear-Site-Data integration
2 parents f4cb580 + 77b3194 commit 926979f

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

api.bs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,49 @@ excludes expired [=impressions=] from [=attribution=]. However, the
888888
[=user agent=] should not retain expired [=impressions=] indefinitely.
889889

890890

891+
### `Clear-Site-Data` Integration ### {#impression-store-clear}
892+
893+
The [:Clear-Site-Data:] field [[CLEAR-SITE-DATA]]
894+
gives sites the ability to remove state maintained by a [=user agent=].
895+
The \``"impressions"`\` type is added to the list of recognized types,
896+
defined in [[CLEAR-SITE-DATA#header]].
897+
898+
When the [[CLEAR-SITE_DATA#abstract-opdef-clear-site-data-for-response|clear site data for response]] algorithm is invoked,
899+
if the list of types [=set/contains=] \``"impressions"`\`,
900+
the [=clear impressions for a conversion site=] is invoked,
901+
passing the |origin|.
902+
903+
To <dfn>clear impressions for a conversion site</dfn>,
904+
given an [=origin=] |origin|,
905+
run these steps:
906+
907+
1. If |origin| is not a [=tuple origin=] with a [=scheme=] of `https`,
908+
return.
909+
910+
1. Let |site| be the value returned
911+
by invoking [=registrable domain|obtain a registrable domain=],
912+
passing the [=host=] part of the [=tuple origin|origin tuple=].
913+
914+
1. [=set/iterate|For each=] [=impression=] |impression| of
915+
the [=impression store=]:
916+
917+
1. If |impression| has an [=impression/Intermediary Site=] equal to |site|,
918+
[=set/remove=] |impression| from the [=impression store=] and [=iteration/continue=].
919+
920+
1. If |impression| has a [=impression/Conversion Sites=] [=set=]
921+
that does not [=set/contain=] the value |site|, [=iteration/continue=].
922+
923+
1. If the [=set/size=] of |impression|'s [=impression/Conversion Sites=]
924+
is greater than one,
925+
[=set/remove|remove=] |site| from |impression|'s [=impression/Conversion Sites=]
926+
and [=iteration/continue=].
927+
928+
1. Otherwise, [=set/remove=] |impression| from the [=impression store=].
929+
930+
<p class=note>This process does not remove impressions
931+
that are saved with an empty [=set=] of [=impression/Conversion Sites=].
932+
933+
891934
### Site Names ### {#site-name-algorithm}
892935

893936
The [=impression store=] saves information
@@ -2309,6 +2352,8 @@ The privacy architecture is courtesy of the authors of [[PPA-DP]].
23092352

23102353

23112354
<pre class=anchors>
2355+
urlPrefix: https://fetch.spec.whatwg.org/; spec: html; type: dfn
2356+
text: request origin; url: #concept-request-origin
23122357
urlPrefix: https://html.spec.whatwg.org/; spec: html; type: dfn
23132358
text: host; url: #concept-origin-host
23142359
text: obtain a site

0 commit comments

Comments
 (0)