Skip to content

Add Accept-CH-lifetime cache and CH header handling#729

Closed
yoavweiss wants to merge 1 commit intowhatwg:masterfrom
yoavweiss:accept_ch_lifetime
Closed

Add Accept-CH-lifetime cache and CH header handling#729
yoavweiss wants to merge 1 commit intowhatwg:masterfrom
yoavweiss:accept_ch_lifetime

Conversation

@yoavweiss
Copy link
Collaborator

@yoavweiss yoavweiss commented May 22, 2018

This PR adds the concept of an Accept-CH cache as well as some handling for the Accept-CH and Accept-CH-Lifetime headers.
Tackles some of the concepts that need defining in #726


Preview | Diff

<li><dfn id=concept-accept-ch-cache-client-hints-list for=accept-ch-cache>client-hints list</dfn>
</ul>

<p>Entries must be removed after the seconds specified in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need any extra clauses to ensure that this cache is purged when user clears site-data or similar?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably

Copy link
Collaborator Author

@yoavweiss yoavweiss May 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikewest what's the best way to hook this to clear-site-data and similar UI concepts (e.g. user cleared their cookies)? Looking at https://w3c.github.io/webappsec-clear-site-data/#clear-dom it seems to enumerate all the relevant things that need to be cleared? Should the ACHL cache do the same?


<li><p>If <var>response</var>'s
<a href=http://httpwg.org/http-extensions/client-hints.html#accept-ch>Accept-CH header</a>
is present, process the header and add its client-hints tokens to the <a>active document</a>'s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restrict to HTTPS only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah

<li><p>If <var>response</var>'s
<a href=http://httpwg.org/http-extensions/client-hints.html#accept-ch-lifetime>Accept-CH-Lifetime header</a>
is present, call
<a for=accept-ch-cache>create a new entry</a> with <var>response</var>'s <var>origin</var>, the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, https-only?

@yoavweiss
Copy link
Collaborator Author

Superseded by whatwg/html#3774

@yoavweiss yoavweiss closed this Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants