You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce CookieListItem to only expose name and value
We never had agreement to expose more than information than document.cookie, so make the standard reflect that.
Tests: web-platform-tests/wpt#54129.
Fixes#238 and closes#241.
Copy file name to clipboardExpand all lines: index.bs
+6-48Lines changed: 6 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -398,20 +398,13 @@ A <dfn>cookie</dfn> is normatively defined for user agents by [[RFC6265BIS-14#na
398
398
Per [[RFC6265BIS-14#name-storage-model|Cookies § Storage Model]], a [=cookie=] has the following fields:
399
399
<dfn>name</dfn>,
400
400
<dfn>value</dfn>,
401
-
<dfn>expiry-time</dfn>,
402
401
<dfn>domain</dfn>,
403
402
<dfn>path</dfn>,
404
-
<dfn>creation-time</dfn>,
405
-
<dfn>last-access-time</dfn>,
406
-
<dfn>persistent-flag</dfn>,
407
-
<dfn>host-only-flag</dfn>,
408
-
<dfn>secure-only-flag</dfn>,
409
-
<dfn>http-only-flag</dfn>,
410
-
<dfn>same-site-flag</dfn>.
403
+
<dfn>http-only-flag</dfn>.
411
404
412
405
</div>
413
406
414
-
A cookie is <dfn>script-visible</dfn> when it is in-scope and does not have the `HttpOnly` cookieflag. This is more formally enforced in the processing model, which consults [[RFC6265BIS-14#name-retrieval-model|Cookies § Retrieval Model]] at appropriate points.
407
+
A cookie is <dfn>script-visible</dfn> when it is in-scope and its [=cookie/http-only-flag=] is unset. This is more formally enforced in the processing model, which consults [[RFC6265BIS-14#name-retrieval-model|Cookies § Retrieval Model]] at appropriate points.
415
408
416
409
A cookie is also subject to certain size limits. Per [[RFC6265BIS-14#name-storage-model|Cookies § Storage Model]]:
417
410
* The combined lengths of the name and value fields must not be greater than 4096 [=bytes=] (the <dfn for=cookie>maximum name/value pair size</dfn>).
To <dfn>create a {{CookieListItem}}</dfn> from |cookie|, run the following steps.
1036
+
To <dfn>create a {{CookieListItem}}</dfn> from a [=/cookie=]|cookie|:
1050
1037
1051
1038
1. Let |name| be the result of running [=UTF-8 decode without BOM=] on |cookie|'s [=cookie/name=].
1052
1039
1. Let |value| be the result of running [=UTF-8 decode without BOM=] on |cookie|'s [=cookie/value=].
1053
-
1. Let |domain| be the result of running [=UTF-8 decode without BOM=] on |cookie|'s [=cookie/domain=].
1054
-
1. Let |path| be the result of running [=UTF-8 decode without BOM=] on |cookie|'s [=cookie/path=].
1055
-
1. Let |expires| be |cookie|'s [=cookie/expiry-time=] ([=as a timestamp=]).
1056
-
1. Let |secure| be |cookie|'s [=cookie/secure-only-flag=].
1057
-
1. Switch on |cookie|'s [=cookie/same-site-flag=]:
1058
-
<dl class=switch>
1059
-
: \``None`\`
1060
-
:: Let |sameSite| be "{{CookieSameSite/none}}".
1061
-
: \``Strict`\`
1062
-
:: Let |sameSite| be "{{CookieSameSite/strict}}".
1063
-
: \``Lax`\`
1064
-
:: Let |sameSite| be "{{CookieSameSite/lax}}".
1065
-
</dl>
1066
-
1. Let |partitioned| be a boolean indicating that the user agent supports [cookie partitioning](https://github.com/privacycg/CHIPS) and that that |cookie| has a partition key.
0 commit comments