Skip to content

Commit

Permalink
Fix Empty Header Handling (#148)
Browse files Browse the repository at this point in the history
SHA: a163e1d
Reason: push, by arichiv

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
arichiv and github-actions[bot] committed Mar 9, 2023
1 parent 9c08261 commit 2629162
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/cg-draft" rel="stylesheet">
<meta content="Bikeshed version 077497365, updated Thu Mar 2 15:15:29 2023 -0800" name="generator">
<link href="https://wicg.github.io/client-hints-infrastructure" rel="canonical">
<meta content="a18ab02696e1a76baa960cf4a7853b95450e0a9a" name="document-revision">
<meta content="a163e1d3ece339432e75a9aeea514aa865f25bb2" name="document-revision">
<style>
table, th, td { border: 1px black solid; }
thead {background-color: yellow; }
Expand Down Expand Up @@ -465,7 +465,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Client Hints Infrastructure</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#CG-DRAFT">Draft Community Group Report</a>, <time class="dt-updated" datetime="2023-03-08">8 March 2023</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#CG-DRAFT">Draft Community Group Report</a>, <time class="dt-updated" datetime="2023-03-09">9 March 2023</time></p>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
Expand Down Expand Up @@ -654,8 +654,8 @@ <h3 class="heading settled" data-level="3.2" id="accept-ch-cache-definition"><sp
since sites can use each of the hints as a bit set on the client, and that information will be
communicated to them on every request. As such, a user agent MUST evict that
cache whenever the user clears their cookies or when session cookies expire.</p>
<p>A site can clear the browser’s <code>Accept-CH</code> cache for its origin by sending an empty <code>Accept-CH</code> header in a response with no other <code>Accept-CH</code> headers. This sets the origin’s <a data-link-type="dfn" href="#client-hints-set" id="ref-for-client-hints-set①">client hints set</a> to an empty set.</p>
<p>There MAY be multiple <code>Accept-CH</code> headers per-response and this algorithm is run once for each in the order of the appearance of the header.</p>
<p>A site can clear the browser’s <code>Accept-CH</code> cache for its origin by sending an empty <code>Accept-CH</code> header in a response. This sets the origin’s <a data-link-type="dfn" href="#client-hints-set" id="ref-for-client-hints-set①">client hints set</a> to an empty set.</p>
<p>There MAY be multiple <code>Accept-CH</code> headers per-response and <a data-link-type="dfn" href="https://www.rfc-editor.org/rfc/rfc8941.html#name-lists" id="ref-for-name-lists">sf-lists</a> can be split across lines as long as each line contains at least one token.</p>
<p class="note" role="note"><span class="marker">Note:</span> As the cache can only be modified by the top-level frame, it is considered to be partitioned.</p>
<p>When asked to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="update-the-client-hints-set-from-cache">update the client hints set from cache</dfn> given a <var>settingsObject</var>:</p>
<ol>
Expand Down Expand Up @@ -692,7 +692,7 @@ <h3 class="heading settled" data-level="3.3" id="critical-ch-algo"><span class="
needed as they were sent. If hints listed in the <code>Critical-CH</code> header are not
in the <code>Accept-CH</code> header a reload would not result in the hints being included
anyway.</p>
<p>There MAY be multiple <code>Critical-CH</code> headers per-response and this algorithm is run once for each in the order of the appearance of the header.</p>
<p>There MAY be multiple <code>Critical-CH</code> headers per-response and <a data-link-type="dfn" href="https://www.rfc-editor.org/rfc/rfc8941.html#name-lists" id="ref-for-name-lists①">sf-lists</a> can be split across lines as long as each line contains at least one token.</p>
<p>When asked if the user agent <dfn class="dfn-paneled" data-dfn-type="abstract-op" data-export id="abstract-opdef-should-reload-page-for-critical-client-hints">should reload page for critical client hints</dfn> given a <var>settingsObject</var> and <var>response</var>:</p>
<ol>
<li>If <var>settingsObject</var> is a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#non-secure-context" id="ref-for-non-secure-context①">non-secure context</a>, abort these steps.
Expand Down Expand Up @@ -1354,6 +1354,13 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<li><a href="#ref-for-serviceworkerglobalscope">4.3. Service Worker initialization</a>
</ul>
</aside>
<aside aria-labelledby="infopaneltitle-for-c5d53c47f4b9ab918d7fab93e2e21fe0" class="dfn-panel" data-for="c5d53c47f4b9ab918d7fab93e2e21fe0" id="infopanel-for-c5d53c47f4b9ab918d7fab93e2e21fe0">
<span id="infopaneltitle-for-c5d53c47f4b9ab918d7fab93e2e21fe0" style="display:none">Info about the 'sf-lists' external reference.</span><a href="https://www.rfc-editor.org/rfc/rfc8941.html#name-lists">https://www.rfc-editor.org/rfc/rfc8941.html#name-lists</a><b>Referenced in:</b>
<ul>
<li><a href="#ref-for-name-lists">3.2. Accept-CH cache</a>
<li><a href="#ref-for-name-lists①">3.3. Critical-CH</a>
</ul>
</aside>
<aside aria-labelledby="infopaneltitle-for-eb0e1698348a5ae30cd3aa882b6dff01" class="dfn-panel" data-for="eb0e1698348a5ae30cd3aa882b6dff01" id="infopanel-for-eb0e1698348a5ae30cd3aa882b6dff01">
<span id="infopaneltitle-for-eb0e1698348a5ae30cd3aa882b6dff01" style="display:none">Info about the 'origin' external reference.</span><a href="https://url.spec.whatwg.org/#concept-url-origin">https://url.spec.whatwg.org/#concept-url-origin</a><b>Referenced in:</b>
<ul>
Expand Down Expand Up @@ -1432,6 +1439,11 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<ul>
<li><span class="dfn-paneled" id="5ff45f8d2f143fcd4995056a19575007">ServiceWorkerGlobalScope</span>
</ul>
<li>
<a data-link-type="biblio">[STRUCTURED-FIELDS]</a> defines the following terms:
<ul>
<li><span class="dfn-paneled" id="c5d53c47f4b9ab918d7fab93e2e21fe0">sf-lists</span>
</ul>
<li>
<a data-link-type="biblio">[URL]</a> defines the following terms:
<ul>
Expand Down

0 comments on commit 2629162

Please sign in to comment.