Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Hints: Accept-CH html meta http-equiv #189

Closed
reschke opened this issue Jun 1, 2016 · 6 comments
Closed

Client Hints: Accept-CH html meta http-equiv #189

reschke opened this issue Jun 1, 2016 · 6 comments

Comments

@reschke
Copy link
Contributor

reschke commented Jun 1, 2016

"Servers can advertise support for Client Hints using the Accept-CH header field or an equivalent HTML meta element with http-equiv attribute ([W3C.REC-html5-20141028])."

In which case it should be added to https://wiki.whatwg.org/wiki/PragmaExtensions (like it or not).

"When a client receives Accept-CH, it SHOULD append the Client Hint header fields that match the advertised field-values. For example, based on Accept-CH example above, the client would append DPR, Width, Viewport-Width, and Downlink header fields to all subsequent requests."

Q: does the SHOULD also apply to the HTML http-equiv variant?

@igrigorik
Copy link
Member

Q: does the SHOULD also apply to the HTML http-equiv variant?

Yes. Is there a common term we can use here to refer to both the header field value and attribute value?

@reschke
Copy link
Contributor Author

reschke commented Jun 2, 2016

Well, that implies that every user agent SHOULD parse HTML and process elements. Is this a realistic requirement?

@igrigorik
Copy link
Member

The term "user agent" refers to any of the various client programs that initiate a request, including (but not limited to) browsers, spiders (web-based robots), command-line tools, custom applications, and mobile apps

Perhaps not.

When a client receives Accept-CH, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it SHOULD append the Client-Hint header fields that match the advertised field-values. For example, based on Accept-CH example above, the client would append DPR, Width, Viewport-Width, and Downlink header fields to all subsequent requests.

Warmer?

@igrigorik
Copy link
Member

From: https://lists.w3.org/Archives/Public/ietf-http-wg/2016AprJun/0322.html

This "all subsequent requests" is obviously intended to be qualified
somehow. It's not "all requests to all servers ever", is it? Should it
be "all subsequent requests to the same origin"? Should it be "all
subsequent requests to this resource"?

Likewise, the "SHOULD append" phrase is unclear: append to what exactly?

How about...

When a client receives Accept-CH, or if it is capable of processing the HTML response and finds an equivalent HTML meta element, it SHOULD append the Client-Hint header fields that match the advertised field-values to the header list of all subsequent requests. For example, based on Accept-CH example above, a user agent could append DPR, Width, Viewport-Width, and Downlink header fields to all subresource requests initiated by the page constructed from the response. Alternatively, a client may remember the preference at origin level and advertise same header fields on all future requests initiated to and by the resources associated with that origin.

In other words, it's not the intent of this spec to spell out a specific behavior, we leave that to the client.

@reschke
Copy link
Contributor Author

reschke commented Jun 3, 2016

SGTM, where "may" ought to be "MAY" or "can".

igrigorik added a commit that referenced this issue Jun 3, 2016
@igrigorik
Copy link
Member

Thanks, updated in #190.

@mnot mnot added the design label Jun 7, 2016
@mnot mnot closed this as completed Jun 7, 2016
igrigorik added a commit that referenced this issue Jun 7, 2016
- drop unused ABNF rules, closes #184.
- updated Accept-CH ABNF to #field-name - #184.
- s/largest smallest/smallest/ following integer - closes #185.
- Save-Data is one or more tokens - #186.
- clarify Accept-CH behavior - closes #189.
- allow whitespace in Save-Data ABNF
- Vary should advertise hints that affect response [1]

[1] https://lists.w3.org/Archives/Public/ietf-http-wg/2016AprJun/0317.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants