Skip to content

Commit 69e858f

Browse files
authored
Suggest using the Cookie Store API instead of document.cookie
Fixes #11658.
1 parent 72671aa commit 69e858f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11156,6 +11156,12 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
1115611156
attribute represents the cookies of the resource identified by the document's <span
1115711157
data-x="concept-document-url">URL</span>.</p>
1115811158

11159+
<p class="note">Using the synchronous <code data-x="dom-document-cookie">document.cookie</code>
11160+
API can be a source of performance issues. The <cite>Cookie Store API</cite> can be used instead,
11161+
as it provides an asynchronous way to handle cookies to avoid performance issues. See the <a
11162+
href="https://cookiestore.spec.whatwg.org/#intro">Cookie Store API introduction</a> for more
11163+
information. <ref>COOKIESTORE</ref></p>
11164+
1115911165
<p>A <code>Document</code> object that falls into one of the following conditions is a
1116011166
<dfn>cookie-averse <code>Document</code> object</dfn>:</p>
1116111167

@@ -149937,6 +149943,9 @@ INSERT INTERFACES HERE
149937149943
<dt id="refsCOOKIES">[COOKIES]</dt>
149938149944
<dd><cite><a href="https://httpwg.org/specs/rfc6265.html">HTTP State Management Mechanism</a></cite>, A. Barth. IETF.</dd>
149939149945

149946+
<dt id="refsCOOKIESTORE">[COOKIESTORE]</dt>
149947+
<dd>(Non-normative) <cite><a href="https://cookiestore.spec.whatwg.org/">Cookie Store API</a></cite>, J. Wilcock, M. Nottingham. WHATWG.</dd>
149948+
149940149949
<dt id="refsCREDMAN">[CREDMAN]</dt>
149941149950
<dd><cite><a href="https://w3c.github.io/webappsec-credential-management/">Credential Management</a></cite>, N. Satragno, J. Hodges, M. West. W3C.</dd>
149942149951

0 commit comments

Comments
 (0)