draft-ietf-httpbis-client-hints-05.txt   draft-ietf-httpbis-client-hints-latest.txt 
HTTP Working Group I. Grigorik HTTP Working Group I. Grigorik
Internet-Draft Google Internet-Draft Google
Intended status: Experimental January 26, 2018 Intended status: Experimental June 13, 2018
Expires: July 30, 2018 Expires: December 15, 2018
HTTP Client Hints HTTP Client Hints
draft-ietf-httpbis-client-hints-05 draft-ietf-httpbis-client-hints-latest
Abstract Abstract
An increasing diversity of Web-connected devices and software An increasing diversity of Web-connected devices and software
capabilities has created a need to deliver optimized content for each capabilities has created a need to deliver optimized content for each
device. device.
This specification defines an extensible and configurable set of HTTP This specification defines an extensible and configurable set of HTTP
request header fields, colloquially known as Client Hints, to address request header fields, colloquially known as Client Hints, to address
this. They are intended to be used as input to proactive content this. They are intended to be used as input to proactive content
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 30, 2018. This Internet-Draft will expire on December 15, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 35 skipping to change at page 2, line 35
2.1. Sending Client Hints . . . . . . . . . . . . . . . . . . 4 2.1. Sending Client Hints . . . . . . . . . . . . . . . . . . 4
2.2. Server Processing of Client Hints . . . . . . . . . . . . 4 2.2. Server Processing of Client Hints . . . . . . . . . . . . 4
2.2.1. Advertising Support via Accept-CH Header Field . . . 5 2.2.1. Advertising Support via Accept-CH Header Field . . . 5
2.2.2. The Accept-CH-Lifetime Header Field . . . . . . . . . 5 2.2.2. The Accept-CH-Lifetime Header Field . . . . . . . . . 5
2.2.3. Interaction with Caches . . . . . . . . . . . . . . . 6 2.2.3. Interaction with Caches . . . . . . . . . . . . . . . 6
3. Client Hints . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Client Hints . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. The DPR Header Field . . . . . . . . . . . . . . . . . . 6 3.1. The DPR Header Field . . . . . . . . . . . . . . . . . . 6
3.1.1. Confirming Selected DPR . . . . . . . . . . . . . . . 7 3.1.1. Confirming Selected DPR . . . . . . . . . . . . . . . 7
3.2. The Width Header Field . . . . . . . . . . . . . . . . . 7 3.2. The Width Header Field . . . . . . . . . . . . . . . . . 7
3.3. The Viewport-Width Header Field . . . . . . . . . . . . . 7 3.3. The Viewport-Width Header Field . . . . . . . . . . . . . 7
3.4. The Save-Data Header Field . . . . . . . . . . . . . . . 8
4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
6.1. Accept-CH . . . . . . . . . . . . . . . . . . . . . . . . 10 6.1. Accept-CH . . . . . . . . . . . . . . . . . . . . . . . . 9
6.2. Accept-CH-Lifetime . . . . . . . . . . . . . . . . . . . 10 6.2. Accept-CH-Lifetime . . . . . . . . . . . . . . . . . . . 9
6.3. Content-DPR . . . . . . . . . . . . . . . . . . . . . . . 10 6.3. Content-DPR . . . . . . . . . . . . . . . . . . . . . . . 10
6.4. DPR . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6.4. DPR . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.5. Save-Data . . . . . . . . . . . . . . . . . . . . . . . . 10 6.5. Viewport-Width . . . . . . . . . . . . . . . . . . . . . 10
6.6. Viewport-Width . . . . . . . . . . . . . . . . . . . . . 11 6.6. Width . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.7. Width . . . . . . . . . . . . . . . . . . . . . . . . . . 11 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 10
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 7.1. Normative References . . . . . . . . . . . . . . . . . . 10
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.2. Informative References . . . . . . . . . . . . . . . . . 12
8.1. Normative References . . . . . . . . . . . . . . . . . . 11 7.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.2. Informative References . . . . . . . . . . . . . . . . . 12 Appendix A. Interaction with Key Response Header Field . . . . . 12
8.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Appendix B. Changes . . . . . . . . . . . . . . . . . . . . . . 12
Appendix A. Interaction with Key Response Header Field . . . . . 13 B.1. Since -00 . . . . . . . . . . . . . . . . . . . . . . . . 12
Appendix B. Changes . . . . . . . . . . . . . . . . . . . . . . 13
B.1. Since -00 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.2. Since -01 . . . . . . . . . . . . . . . . . . . . . . . . 13 B.2. Since -01 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.3. Since -02 . . . . . . . . . . . . . . . . . . . . . . . . 13 B.3. Since -02 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.4. Since -03 . . . . . . . . . . . . . . . . . . . . . . . . 14 B.4. Since -03 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.5. Since -04 . . . . . . . . . . . . . . . . . . . . . . . . 14 B.5. Since -04 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.6. Since -05 . . . . . . . . . . . . . . . . . . . . . . . . 14 B.6. Since -05 . . . . . . . . . . . . . . . . . . . . . . . . 13
B.7. Since -06 . . . . . . . . . . . . . . . . . . . . . . . . 14 B.7. Since -06 . . . . . . . . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 14 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
There are thousands of different devices accessing the web, each with There are thousands of different devices accessing the web, each with
different device capabilities and preference information. These different device capabilities and preference information. These
device capabilities include hardware and software characteristics, as device capabilities include hardware and software characteristics, as
well as dynamic user and client preferences. well as dynamic user and client preferences.
One way to infer some of these capabilities is through User-Agent One way to infer some of these capabilities is through User-Agent
(Section 5.5.3 of [RFC7231]) header field detection against an (Section 5.5.3 of [RFC7231]) header field detection against an
skipping to change at page 4, line 36 skipping to change at page 4, line 36
2.1. Sending Client Hints 2.1. Sending Client Hints
Clients control which Client Hints are sent in requests, based on Clients control which Client Hints are sent in requests, based on
their default settings, user configuration, and server preferences. their default settings, user configuration, and server preferences.
The client and server can use an opt-in mechanism outlined below to The client and server can use an opt-in mechanism outlined below to
negotiate which fields should be sent to allow for efficient content negotiate which fields should be sent to allow for efficient content
adaption, and optinally use additional mechanisms to negotiate adaption, and optinally use additional mechanisms to negotiate
delegation policies that control access of third parties to same delegation policies that control access of third parties to same
fields. fields.
Implementers should be aware of the passive fingerprinting and Implementers should be aware of the passive fingerprinting
network information disclosure implications when implementing support implications when implementing support for Client Hints, and follow
for Client Hints, and follow the considerations outlined in "Security the considerations outlined in "Security Considerations" section of
Considerations" section of this document. this document.
2.2. Server Processing of Client Hints 2.2. Server Processing of Client Hints
When presented with a request that contains one or more client hint When presented with a request that contains one or more client hint
header fields, servers can optimize the response based upon the header fields, servers can optimize the response based upon the
information in them. When doing so, and if the resource is information in them. When doing so, and if the resource is
cacheable, the server MUST also generate a Vary response header field cacheable, the server MUST also generate a Vary response header field
(Section 7.1.4 of [RFC7231]) to indicate which hints can affect the (Section 7.1.4 of [RFC7231]) to indicate which hints can affect the
selected response and whether the selected response is appropriate selected response and whether the selected response is appropriate
for a later request. for a later request.
skipping to change at page 8, line 8 skipping to change at page 8, line 8
The "Viewport-Width" request header field is a number that indicates The "Viewport-Width" request header field is a number that indicates
the layout viewport width in CSS px. The provided CSS px value is a the layout viewport width in CSS px. The provided CSS px value is a
number rounded to the smallest following integer (i.e. ceiling number rounded to the smallest following integer (i.e. ceiling
value). value).
Viewport-Width = 1*DIGIT Viewport-Width = 1*DIGIT
If Viewport-Width occurs in a message more than once, the last value If Viewport-Width occurs in a message more than once, the last value
overrides all previous occurrences. overrides all previous occurrences.
3.4. The Save-Data Header Field
The "Save-Data" request header field consists of one or more tokens
that indicate client's preference for reduced data usage, due to high
transfer costs, slow connection speeds, or other reasons.
Save-Data = sd-token *( OWS ";" OWS [sd-token] )
sd-token = token
This document defines the "on" sd-token value, which is used as a
signal indicating explicit user opt-in into a reduced data usage mode
on the client, and when communicated to origins allows them to
deliver alternate content honoring such preference - e.g. smaller
image and video resources, alternate markup, and so on. New token
and extension token values can be defined by updates to this
specification.
If Save-Data occurs in a message more than once, the last value
overrides all previous occurrences.
4. Examples 4. Examples
For example, given the following request header fields: For example, given the following request header fields:
DPR: 2.0 DPR: 2.0
Width: 320 Width: 320
Viewport-Width: 320 Viewport-Width: 320
The server knows that the device pixel ratio is 2.0, that the The server knows that the device pixel ratio is 2.0, that the
intended display width of the requested resource is 160 CSS px (320 intended display width of the requested resource is 160 CSS px (320
skipping to change at page 9, line 39 skipping to change at page 9, line 19
mechanisms and policies to control which Client Hints header fields mechanisms and policies to control which Client Hints header fields
are advertised: are advertised:
o Implementers SHOULD restrict delivery of some or all Client Hints o Implementers SHOULD restrict delivery of some or all Client Hints
header fields to the opt-in origin only, unless the opt-in origin header fields to the opt-in origin only, unless the opt-in origin
has explicitly delegated permission to another origin to request has explicitly delegated permission to another origin to request
Client Hints header fields. Client Hints header fields.
o Implementers MAY provide user choice mechanisms so that users may o Implementers MAY provide user choice mechanisms so that users may
balance privacy concerns with bandwidth limitations. However, balance privacy concerns with bandwidth limitations. However,
implementers should also be aware that explaining the privacy implementers should also be aware that explaining the privacy
implications of passive fingerprinting or network information implications of passive fingerprinting to users may be
disclosure to users may be challenging. challenging.
o Implementations specific to certain use cases or threat models MAY o Implementations specific to certain use cases or threat models MAY
avoid transmitting some or all of Client Hints header fields. For avoid transmitting some or all of Client Hints header fields. For
example, avoid transmission of header fields that can carry higher example, avoid transmission of header fields that can carry higher
risks of linkability. risks of linkability.
Implementers SHOULD support Client Hints opt-in mechanisms and MUST Implementers SHOULD support Client Hints opt-in mechanisms and MUST
clear persisted opt-in preferences when site data, browsing history, clear persisted opt-in preferences when site data, browsing history,
browsing cache, or similar, are cleared. browsing cache, or similar, are cleared.
6. IANA Considerations 6. IANA Considerations
This document defines the "Accept-CH", "DPR", "Save-Data", "Viewport- This document defines the "Accept-CH", "DPR", "Viewport-Width", and
Width", and "Width" HTTP request fields, "Accept-CH", "Accept-CH- "Width" HTTP request fields, "Accept-CH", "Accept-CH-Lifetime", and
Lifetime", and "Content-DPR" HTTP response field, and registers them "Content-DPR" HTTP response field, and registers them in the
in the Permanent Message Header Fields registry. Permanent Message Header Fields registry.
6.1. Accept-CH 6.1. Accept-CH
o Header field name: Accept-CH o Header field name: Accept-CH
o Applicable protocol: HTTP o Applicable protocol: HTTP
o Status: standard o Status: standard
o Author/Change controller: IETF o Author/Change controller: IETF
o Specification document(s): Section 2.2.1 of this document o Specification document(s): Section 2.2.1 of this document
o Related information: for Client Hints o Related information: for Client Hints
skipping to change at page 10, line 48 skipping to change at page 10, line 25
6.4. DPR 6.4. DPR
o Header field name: DPR o Header field name: DPR
o Applicable protocol: HTTP o Applicable protocol: HTTP
o Status: standard o Status: standard
o Author/Change controller: IETF o Author/Change controller: IETF
o Specification document(s): Section 3.1 of this document o Specification document(s): Section 3.1 of this document
o Related information: for Client Hints o Related information: for Client Hints
6.5. Save-Data 6.5. Viewport-Width
o Header field name: Save-Data
o Applicable protocol: HTTP
o Status: standard
o Author/Change controller: IETF
o Specification document(s): Section 3.4 of this document
o Related information: for Client Hints
6.6. Viewport-Width
o Header field name: Viewport-Width o Header field name: Viewport-Width
o Applicable protocol: HTTP o Applicable protocol: HTTP
o Status: standard o Status: standard
o Author/Change controller: IETF o Author/Change controller: IETF
o Specification document(s): Section 3.3 of this document o Specification document(s): Section 3.3 of this document
o Related information: for Client Hints o Related information: for Client Hints
6.7. Width 6.6. Width
o Header field name: Width o Header field name: Width
o Applicable protocol: HTTP o Applicable protocol: HTTP
o Status: standard o Status: standard
o Author/Change controller: IETF o Author/Change controller: IETF
o Specification document(s): Section 3.2 of this document o Specification document(s): Section 3.2 of this document
o Related information: for Client Hints o Related information: for Client Hints
7. Acknowledgements 7. References
Thanks to Mark Nottingham, Julian Reschke, Chris Bentzel, Yoav Weiss,
Ben Greenstein, Tarun Bansal, Roy Fielding, Vasiliy Faronov, Ted
Hardie, Jonas Sicking, and numerous other members of the IETF HTTP
Working Group for invaluable help and feedback.
8. References
8.1. Normative References 7.1. Normative References
[CSS2] Bos, B., Celic, T., Hickson, I., and H. Lie, "Cascading [CSS2] Bos, B., Celic, T., Hickson, I., and H. Lie, "Cascading
Style Sheets Level 2 Revision 1 (CSS 2.1) Specification", Style Sheets Level 2 Revision 1 (CSS 2.1) Specification",
W3C Recommendation REC-CSS2-20110607, June 2011, W3C Recommendation REC-CSS2-20110607, June 2011,
<http://www.w3.org/TR/2011/REC-CSS2-20110607>. <http://www.w3.org/TR/2011/REC-CSS2-20110607>.
[CSSVAL] Atkins, T. and E. Etemad, "CSS Values and Units Module [CSSVAL] Atkins, T. and E. Etemad, "CSS Values and Units Module
Level 3", World Wide Web Consortium CR CR-css-values- Level 3", World Wide Web Consortium CR CR-css-values-
3-20160929, September 2016, 3-20160929, September 2016,
<https://www.w3.org/TR/2016/CR-css-values-3-20160929>. <https://www.w3.org/TR/2016/CR-css-values-3-20160929>.
skipping to change at page 12, line 38 skipping to change at page 12, line 5
[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching",
RFC 7234, DOI 10.17487/RFC7234, June 2014, RFC 7234, DOI 10.17487/RFC7234, June 2014,
<https://www.rfc-editor.org/info/rfc7234>. <https://www.rfc-editor.org/info/rfc7234>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
8.2. Informative References 7.2. Informative References
[KEY] Fielding, R. and M. Nottingham, "The Key HTTP Response [KEY] Fielding, R. and M. Nottingham, "The Key HTTP Response
Header Field", draft-ietf-httpbis-key-01 (work in Header Field", draft-ietf-httpbis-key-01 (work in
progress), March 2016. progress), March 2016.
[RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265,
DOI 10.17487/RFC6265, April 2011, DOI 10.17487/RFC6265, April 2011,
<https://www.rfc-editor.org/info/rfc6265>. <https://www.rfc-editor.org/info/rfc6265>.
8.3. URIs 7.3. URIs
[1] https://lists.w3.org/Archives/Public/ietf-http-wg/ [1] https://lists.w3.org/Archives/Public/ietf-http-wg/
[2] http://httpwg.github.io/ [2] http://httpwg.github.io/
[3] https://github.com/httpwg/http-extensions/labels/client-hints [3] https://github.com/httpwg/http-extensions/labels/client-hints
Appendix A. Interaction with Key Response Header Field Appendix A. Interaction with Key Response Header Field
Client Hints may be combined with Key response header field ([KEY]) Client Hints may be combined with Key response header field ([KEY])
skipping to change at page 14, line 23 skipping to change at page 13, line 37
o Issue 361: Removed Downlink o Issue 361: Removed Downlink
o Issue 361: Moved Key to appendix, plus other editorial feedback o Issue 361: Moved Key to appendix, plus other editorial feedback
B.6. Since -05 B.6. Since -05
o Issue 372: Scoped CH opt-in and delivery to secure transports o Issue 372: Scoped CH opt-in and delivery to secure transports
o Issue 373: Bind CH opt-in to origin o Issue 373: Bind CH opt-in to origin
B.7. Since -06 B.7. Since -06
o None o Issue 524: Save-Data is now defined by NetInfo spec, dropping
Acknowledgements
Thanks to Mark Nottingham, Julian Reschke, Chris Bentzel, Yoav Weiss,
Ben Greenstein, Tarun Bansal, Roy Fielding, Vasiliy Faronov, Ted
Hardie, Jonas Sicking, and numerous other members of the IETF HTTP
Working Group for invaluable help and feedback.
Author's Address Author's Address
Ilya Grigorik Ilya Grigorik
Google Google
Email: ilya@igvita.com Email: ilya@igvita.com
URI: https://www.igvita.com/ URI: https://www.igvita.com/
 End of changes. 18 change blocks. 
78 lines changed or deleted 47 lines changed or added

This html diff was produced by rfcdiff 1.44jr. The latest version is available from http://tools.ietf.org/tools/rfcdiff/