Skip to content

Commit 2d2f5af

Browse files
committed
CLEAR: Be explicit about whose data is being removed.
1 parent 0a30219 commit 2d2f5af

File tree

2 files changed

+39
-51
lines changed

2 files changed

+39
-51
lines changed

specs/clear-site-data/index.html

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<h1 class="p-name no-ref" id="title">Clear Site Data</h1>
7272

7373
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
74-
<time class="dt-updated" datetime="2015-07-17">17 July 2015</time></span></h2>
74+
<time class="dt-updated" datetime="2015-07-20">20 July 2015</time></span></h2>
7575

7676
<div data-fill-with="spec-metadata">
7777
<dl>
@@ -105,7 +105,7 @@ <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="cont
105105
<div class="p-summary" data-fill-with="abstract">
106106
<p>This document defines an imperative mechanism which allows web developers to
107107

108-
instruct a user agent to clear a user’s locally stored data related to a
108+
instruct a user agent to clear a site’s locally stored data related to a
109109
host and its subdomains.</p>
110110

111111
</div>
@@ -489,8 +489,7 @@ <h3 class="heading settled" data-level="2.1" id="header"><span class="secno">2.1
489489
<p>Parsing details can be found in <a href="#parsing">§3.1 Parsing</a>.</p>
490490

491491

492-
<p>User agent conformance details are detailed in <a href="#clear-response">§3.2
493-
Clear data for response</a>. Those
492+
<p>User agent conformance details are detailed in <a href="#clear-response">§3.2 Clear data for response</a>. Those
494493
steps represent the following requirements when the header is present in a
495494
<a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response">response</a> (<var>response</var>):</p>
496495

@@ -630,11 +629,6 @@ <h3 class="heading settled" data-level="2.2" id="dom-api"><span class="secno">2.
630629
cleared.
631630

632631

633-
<p class="issue" id="issue-398e4047"><a class="self-link" href="#issue-398e4047"></a> Does this make any sense, given that we’ll be sandboxing and
634-
reloading this execution context?</p>
635-
636-
637-
638632

639633
<table class="argumentdef data definition-table">
640634

@@ -692,8 +686,7 @@ <h3 class="heading settled" data-level="2.3" id="fetch-integration"><span class=
692686
<ol>
693687
<li data-md="">
694688
<p>If <var>response</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-list">header list</a> contains a header named
695-
<a data-link-type="dfn" href="#clear_site_data"><code>Clear-Site-Data</code></a>, then execute <a href="#clear-response">§3.2
696-
Clear data for response</a> on
689+
<a data-link-type="dfn" href="#clear_site_data"><code>Clear-Site-Data</code></a>, then execute <a href="#clear-response">§3.2 Clear data for response</a> on
697690
<var>response</var>.</p>
698691

699692
</ol>
@@ -897,22 +890,19 @@ <h3 class="heading settled" data-level="3.2" id="clear-response"><span class="se
897890

898891

899892
<li data-md="">
900-
<p>Let <var>types</var> be the result of <a href="#get-types">§3.1.1
901-
Which data types ought to be removed for response?</a> executed on
893+
<p>Let <var>types</var> be the result of <a href="#get-types">§3.1.1 Which data types ought to be removed for response?</a> executed on
902894
<var>response</var>.</p>
903895

904896

905897

906898
<li data-md="">
907899
<p>Let <var>subdomain state</var> be the result of
908-
<a href="#should-include-subdomains">§3.1.2
909-
Should subdomains' data be cleared for response</a> executed on <var>response</var>.</p>
900+
<a href="#should-include-subdomains">§3.1.2 Should subdomains' data be cleared for response</a> executed on <var>response</var>.</p>
910901

911902

912903

913904
<li data-md="">
914-
<p>Execute <a href="#clear-internal">§3.4
915-
Clear types for origin with subdomain
905+
<p>Execute <a href="#clear-internal">§3.4 Clear types for origin with subdomain
916906
state</a> on <var>types</var>, <var>response</var>’s
917907
<code class="idl"><a data-link-type="idl" href="https://fetch.spec.whatwg.org/#concept-response-url">url</a></code>'s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, and <var>subdomain state</var>.</p>
918908

@@ -942,6 +932,16 @@ <h3 class="heading settled" data-level="3.3" id="clear-api"><span class="secno">
942932

943933

944934

935+
<li data-md="">
936+
<p>Let <var>promise</var> be a newly created <code>Promise</code> object.</p>
937+
938+
939+
940+
<li data-md="">
941+
<p>Return <var>promise</var>, and execute the remaining steps asynchronously.</p>
942+
943+
944+
945945
<li data-md="">
946946
<p>Let <var>subdomain state</var> be <a data-link-type="dfn" href="#include-subdomains"><code>Include Subdomains</code></a>
947947
if <var>options</var>' <code class="idl"><a data-link-type="idl" href="#dom-storageclearoptions-includesubdomains">includeSubdomains</a></code> property
@@ -983,11 +983,15 @@ <h3 class="heading settled" data-level="3.3" id="clear-api"><span class="secno">
983983

984984

985985
<li data-md="">
986-
<p>Execute <a href="#clear-internal">§3.4
987-
Clear types for origin with subdomain
986+
<p>Execute <a href="#clear-internal">§3.4 Clear types for origin with subdomain
988987
state</a> on <var>types</var>, the <a data-link-type="dfn" href="http://www.w3.org/TR/html5/webappapis.html#incumbent-settings-object">incumbent
989988
settings object</a>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, and <var>subdomain state</var>.</p>
990989

990+
991+
992+
<li data-md="">
993+
<p>Resolve <var>promise</var> with <code>undefined</code>.</p>
994+
991995
</ol>
992996

993997
<h3 class="heading settled" data-level="3.4" id="clear-internal"><span class="secno">3.4. </span><span class="content">
@@ -999,39 +1003,34 @@ <h3 class="heading settled" data-level="3.4" id="clear-internal"><span class="se
9991003
<ol>
10001004
<li data-md="">
10011005
<p>If <var>types</var> contains "<code>executionContexts</code>", execute
1002-
<a href="#neuter-contexts">§3.4.1
1003-
Neuter browsing contexts matching origin with
1006+
<a href="#neuter-contexts">§3.4.1 Neuter browsing contexts matching origin with
10041007
subdomain state</a> on <var>origin</var>, with <var>subdomain
10051008
state</var>.</p>
10061009

10071010

10081011

10091012
<li data-md="">
10101013
<p>If <var>types</var> contains "<code>cookies</code>", execute
1011-
<a href="#clear-cookies">§3.4.4
1012-
Clear cookies for origin with subdomain state</a> on <var>origin</var>, with <var>subdomain state</var>.</p>
1014+
<a href="#clear-cookies">§3.4.4 Clear cookies for origin with subdomain state</a> on <var>origin</var>, with <var>subdomain state</var>.</p>
10131015

10141016

10151017

10161018
<li data-md="">
10171019
<p>If <var>types</var> contains "<code>domStorage</code>", execute
1018-
<a href="#clear-dom">§3.4.5
1019-
Clear DOM-accessible storage for origin with
1020+
<a href="#clear-dom">§3.4.5 Clear DOM-accessible storage for origin with
10201021
subdomain state</a> on <var>origin</var>, with <var>subdomain state</var>.</p>
10211022

10221023

10231024

10241025
<li data-md="">
10251026
<p>If <var>types</var> contains "<code>cache</code>", execute
1026-
<a href="#clear-cache">§3.4.3
1027-
Clear cache for origin with subdomain state</a> on <var>origin</var>, with <var>subdomain state</var>.</p>
1027+
<a href="#clear-cache">§3.4.3 Clear cache for origin with subdomain state</a> on <var>origin</var>, with <var>subdomain state</var>.</p>
10281028

10291029

10301030

10311031
<li data-md="">
10321032
<p>If <var>types</var> contains "<code>executionContexts</code>", execute
1033-
<a href="#reload-contexts">§3.4.2
1034-
Reload browsing contexts matching origin with
1033+
<a href="#reload-contexts">§3.4.2 Reload browsing contexts matching origin with
10351034
subdomain state</a> on <var>origin</var>, with <var>subdomain
10361035
state</var>.</p>
10371036

@@ -1049,8 +1048,7 @@ <h4 class="heading settled" data-level="3.4.1" id="neuter-contexts"><span class=
10491048
contexts</a> which the user agent knows about, and sandboxes each in order
10501049
to prevent them from recreating cleared data (from in-memory JavaScript
10511050
variables, for instance). Once data is cleared, the affected browsing
1052-
contexts will be hard-reloaded, as defined in <a href="#reload-contexts">§3.4.2
1053-
Reload browsing contexts matching origin with
1051+
contexts will be hard-reloaded, as defined in <a href="#reload-contexts">§3.4.2 Reload browsing contexts matching origin with
10541052
subdomain state</a>:</p>
10551053

10561054

@@ -1076,8 +1074,7 @@ <h4 class="heading settled" data-level="3.4.1" id="neuter-contexts"><span class=
10761074

10771075

10781076
<li data-md="">
1079-
<p>If <a href="#matches-origin">§3.1.3
1080-
Does origin match origin to clear and
1077+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
10811078
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
10821079
executed on <var>context</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>, and
10831080
<code>subdomain state</code>:</p>
@@ -1126,8 +1123,7 @@ <h4 class="heading settled" data-level="3.4.2" id="reload-contexts"><span class=
11261123

11271124

11281125
<li data-md="">
1129-
<p>If <a href="#matches-origin">§3.1.3
1130-
Does origin match origin to clear and
1126+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
11311127
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
11321128
executed on <var>context</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>, and
11331129
<code>subdomain state</code>:</p>
@@ -1272,8 +1268,7 @@ <h4 class="heading settled" data-level="3.4.5" id="clear-dom"><span class="secno
12721268

12731269
<ol>
12741270
<li data-md="">
1275-
<p>If <a href="#matches-origin">§3.1.3
1276-
Does origin match origin to clear and
1271+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
12771272
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
12781273
executed on <var>area</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>, and
12791274
<code>subdomain state</code>:</p>
@@ -1296,8 +1291,7 @@ <h4 class="heading settled" data-level="3.4.5" id="clear-dom"><span class="secno
12961291

12971292
<ol>
12981293
<li data-md="">
1299-
<p>If <a href="#matches-origin">§3.1.3
1300-
Does origin match origin to clear and
1294+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
13011295
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
13021296
executed on <var>area</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>, and
13031297
<code>subdomain state</code>:</p>
@@ -1320,8 +1314,7 @@ <h4 class="heading settled" data-level="3.4.5" id="clear-dom"><span class="secno
13201314

13211315
<ol>
13221316
<li data-md="">
1323-
<p>If <a href="#matches-origin">§3.1.3
1324-
Does origin match origin to clear and
1317+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
13251318
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
13261319
executed on <var>database</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>,
13271320
and <code>subdomain state</code>:</p>
@@ -1365,8 +1358,7 @@ <h4 class="heading settled" data-level="3.4.5" id="clear-dom"><span class="secno
13651358

13661359
<ol>
13671360
<li data-md="">
1368-
<p>If <a href="#matches-origin">§3.1.3
1369-
Does origin match origin to clear and
1361+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
13701362
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
13711363
executed on <var>database</var>’s <a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>,
13721364
and <code>subdomain state</code>:</p>
@@ -1393,8 +1385,7 @@ <h4 class="heading settled" data-level="3.4.5" id="clear-dom"><span class="secno
13931385

13941386
<ol>
13951387
<li data-md="">
1396-
<p>If <a href="#matches-origin">§3.1.3
1397-
Does origin match origin to clear and
1388+
<p>If <a href="#matches-origin">§3.1.3 Does origin match origin to clear and
13981389
subdomain state</a> returns <a data-link-type="dfn" href="#matches"><code>Matches</code></a> when
13991390
executed on <var>registration</var>’s <a data-link-type="dfn" href="http://www.w3.org/TR/service-workers/#dfn-scope-url">scope URL</a>’s
14001391
<a data-link-type="dfn" href="https://tools.ietf.org/html/rfc6454#section-3.2">origin</a>, <var>origin</var>, and <code>subdomain state</code>:</p>
@@ -1514,8 +1505,7 @@ <h3 class="heading settled" data-level="5.1" id="iana-clear-site-data"><span cla
15141505
<dt>Specification document
15151506

15161507

1517-
<dd>This specification (See <a href="#header">§2.1
1518-
The Clear-Site-Data HTTP Response Header Field</a>)
1508+
<dd>This specification (See <a href="#header">§2.1 The Clear-Site-Data HTTP Response Header Field</a>)
15191509

15201510

15211511
</dl>
@@ -1785,8 +1775,6 @@ <h2 class="no-num heading settled" id="idl-index"><span class="content">IDL Inde
17851775
<h2 class="no-num heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
17861776
<div style="counter-reset:issue">
17871777
<div class="issue"> This might live more cleanly in <a data-link-type="biblio" href="#biblio-storage">[STORAGE]</a>.<a href="#issue-3153cbda"></a></div>
1788-
<div class="issue"> Does this make any sense, given that we’ll be sandboxing and
1789-
reloading this execution context?<a href="#issue-398e4047"></a></div>
17901778
<div class="issue"> Monkey patching! Talk with Anne.<a href="#issue-3ded38d3"></a></div>
17911779
<div class="issue"> Some have suggested that this might not be a restriction we want
17921780
(see
@@ -1805,4 +1793,4 @@ <h2 class="no-num heading settled" id="issues-index"><span class="content">Issue
18051793
Workers, etc. (This isn’t an exhaustive list. We should fix that too.)<a href="#issue-364d6bdf"></a></div>
18061794
<div class="issue"> How do we say something about plugins here? Point out to
18071795
<a href="https://wiki.mozilla.org/NPAPI:ClearSiteData">NPP_ClearSiteData</a>?<a href="#issue-a42aab60"></a></div></div></body>
1808-
</html>
1796+
</html>

specs/clear-site-data/index.src.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1>Clear Site Data</h1>
88
Group: webappsec
99
Abstract:
1010
This document defines an imperative mechanism which allows web developers to
11-
instruct a user agent to clear a user's locally stored data related to a
11+
instruct a user agent to clear a site's locally stored data related to a
1212
host and its subdomains.
1313
Indent: 2
1414
Level: 1

0 commit comments

Comments
 (0)