From 2260456867d5398da5e51f2113cce05309e66ff3 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 11 Jun 2021 16:58:46 +1000 Subject: [PATCH 01/25] RTT Client hint header docs --- .../web/api/networkinformation/rtt/index.html | 17 +---- files/en-us/web/http/headers/index.html | 4 +- files/en-us/web/http/headers/rtt/index.html | 69 +++++++++++++++++++ 3 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 files/en-us/web/http/headers/rtt/index.html diff --git a/files/en-us/web/api/networkinformation/rtt/index.html b/files/en-us/web/api/networkinformation/rtt/index.html index 0d4232b151f03f1..08f99d36ae5df98 100644 --- a/files/en-us/web/api/networkinformation/rtt/index.html +++ b/files/en-us/web/api/networkinformation/rtt/index.html @@ -33,22 +33,7 @@

Return value

Specifications

- - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Network Information', '#dom-networkinformation-rtt', 'rtt')}}{{Spec2('Network Information')}}Initial definition
+

{{Specifications}}

Browser compatibility

diff --git a/files/en-us/web/http/headers/index.html b/files/en-us/web/http/headers/index.html index 85a31d29c0cfdf0..2a1bed4d7cf89e4 100644 --- a/files/en-us/web/http/headers/index.html +++ b/files/en-us/web/http/headers/index.html @@ -85,9 +85,11 @@

Client hints

{{HTTPHeader("Accept-CH-Lifetime")}} {{experimental_inline}} {{deprecated_inline}}
Servers can ask the client to remember the set of Client Hints that the server supports for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server’s origin ([RFC6454]).
{{HTTPHeader("Device-Memory")}} {{experimental_inline}}
-
Technically a part of Device Memory API, this header represents an approximate amount of RAM client has.
+
Approximate amount of available client RAM memory. Technically a part of Device Memory API.
{{HTTPHeader("DPR")}} {{deprecated_inline}}
Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel.
+
{{HTTPHeader("RTT")}}
+
Application layer round trip time (RTT) in miliseconds, which includes the server processing time. This is technically part of the Network Information API.
{{HTTPHeader("Save-Data")}} {{experimental_inline}}
A boolean that indicates the user agent's preference for reduced data usage.
{{HTTPHeader("Viewport-Width")}} {{experimental_inline}}
diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html new file mode 100644 index 000000000000000..d7252cc30d350ba --- /dev/null +++ b/files/en-us/web/http/headers/rtt/index.html @@ -0,0 +1,69 @@ +--- +title: RTT +slug: Web/HTTP/Headers/RTT +tags: + - RTT + - Client hints + - HTTP + - HTTP Header + - Request header + - Client hints + - Experimental +browser-compat: http.headers.rtt +--- +
{{HTTPSidebar}} {{SeeCompatTable}}
+ +

The RTT {{Glossary("Client hints","network client hint")}} request header field provides the approximate round trip time on the application layer, in milliseconds. The RTT hint, unlike transport layer RTT, includes server processing time.

+ + + + + + + + + + + + + + + + +
Header type{{Glossary("Request header")}}, {{Glossary("Client hints","Client hint")}}
{{Glossary("Forbidden header name")}}no
{{Glossary("CORS-safelisted response header")}}no
+ +

The hint allows a server to choose what information is sent based on the network responsiveness/latency. For example, it might choose not to respond to some requests.

+ +
+

Note: The RTT value is rounded to the nearest 25 milliseconds to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar round-trip information.

+
+ +

Syntax

+ +
RTT: <number>
+ +

Examples

+ +

Server first needs to opt in to receive the RTT header by sending the response headers {{HTTPHeader("Accept-CH")}} containing RTT.

+ +
Accept-CH: RTT
+ +

Then on subsequent requests the client might send RTT header back:

+ +
RTT: 125
+ +

Specifications

+ +

{{Specifications}}

+ +

Browser compatibility

+ +

{{Compat}}

+ +

See also

+ + From c89957be3ea8162e964b081ac7ab1060d23dcefa Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 15 Jun 2021 16:53:04 +1000 Subject: [PATCH 02/25] Add pages for all the network client hints --- .../web/http/headers/downlink/index.html | 76 ++++++++++++++++++ files/en-us/web/http/headers/ect/index.html | 77 +++++++++++++++++++ files/en-us/web/http/headers/rtt/index.html | 24 ++++-- .../web/http/headers/save-data/index.html | 34 ++++---- 4 files changed, 189 insertions(+), 22 deletions(-) create mode 100644 files/en-us/web/http/headers/downlink/index.html create mode 100644 files/en-us/web/http/headers/ect/index.html diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html new file mode 100644 index 000000000000000..b76707a2939fdf5 --- /dev/null +++ b/files/en-us/web/http/headers/downlink/index.html @@ -0,0 +1,76 @@ +--- +title: Downlink +slug: Web/HTTP/Headers/Downlink +tags: + - Downlink + - Client hints + - HTTP + - HTTP Header + - Request header + - Client hints + - Experimental +browser-compat: http.headers.downlink +--- +
{{HTTPSidebar}} {{SeeCompatTable}}
+ +

The Downlink {{Glossary("Client hints","network client hint")}} request header field provides the approximate bandwidth of the client's connection to the server, in Mbps.

+ + + + + + + + + + + + +
Header type{{Glossary("Request header")}}, {{Glossary("Client hints","Client hint")}}
{{Glossary("Forbidden header name")}}no
+ +

The Downlink value is rounded to the nearest 25 kilobits per second to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar information.

+ +

The hint allows a server to choose what information is sent based on the network bandwidth. For example, a server might choose to send smaller versions of images and other resources on low bandwidth networks.

+ +
+

Note: The {{HTTPHeader("Vary")}} header is used in responses to indicate that a different resource is sent for every different value of the header (see HTTP Caching > Varying responses). Even if {{HTTPHeader("Downlink")}} is used to configure what resources are sent, consider omitting it in the {{HTTPHeader("Vary")}} header — it is likely to change often, which effectively makes the resource uncachable.

+
+ +

Syntax

+ +
Downlink: <number>
+ +

Examples

+ +

Server first needs to opt in to receive the Downlink header by sending the response headers {{HTTPHeader("Accept-CH")}} containing Downlink.

+ +
Accept-CH: Downlink
+ +

Then on subsequent requests the client might send Downlink header back:

+ +
Downlink: 1.7
+ +

Specifications

+ +

{{Specifications}}

+ +

Browser compatibility

+ +

{{Compat}}

+ +

See also

+ + \ No newline at end of file diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html new file mode 100644 index 000000000000000..3c90b37c8362fc0 --- /dev/null +++ b/files/en-us/web/http/headers/ect/index.html @@ -0,0 +1,77 @@ +--- +title: ECT +slug: Web/HTTP/Headers/ECT +tags: + - ect + - Client hints + - HTTP + - HTTP Header + - Request header + - Client hints + - Experimental +browser-compat: http.headers.ect +--- +
{{HTTPSidebar}} {{SeeCompatTable}}
+ +

The ECT {{Glossary("Client hints","network client hint")}} request header field indicates the {{Glossary("effective connection type")}}: slow-2g, 2g, 3g, 4g.

+ + + + + + + + + + + + +
Header type{{Glossary("Request header")}}, {{Glossary("Client hints","Client hint")}}
{{Glossary("Forbidden header name")}}no
+ +

The value represents the "network profile" that best matches the connection's latency and bandwidth, rather than the actual mechanisms used for transferring the data. For example, 2g might be used to represent a slow wifi connection with high latency and low bandwidth, while 4g might be used to represent a fast fibre-based broadband network.

+ +

The hint allows a server to choose what information is sent based on the broad characteristics of the network. For example, a server might choose to send smaller versions of images and other resources on less capable connections. The value might also be used as a starting point for determining what information is sent, which is further refined using information in {{HTTPHeader("RTT")}} and {{HTTPHeader("Downlink")}} hints.

+ +
+

Note: A server that specifies {{HTTPHeader("ECT")}} in {{HTTPHeader("Accept-CH")}} may also specify it in {{HTTPHeader("Vary")}} to indicate that responses should be cached for different ECT values.

+
+ +

Syntax

+ +
ect: <value>
+ +

Examples

+ +

Server first needs to opt in to receive the Downlink header by sending the response headers {{HTTPHeader("Accept-CH")}} containing Downlink.

+ +
Accept-CH: ECT
+ +

Then on subsequent requests the client might send Downlink header back:

+ +
ECT: 2g
+ +

Specifications

+ +

{{Specifications}}

+ +

Browser compatibility

+ +

{{Compat}}

+ + +

See also

+ + diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html index d7252cc30d350ba..a642790be09dfda 100644 --- a/files/en-us/web/http/headers/rtt/index.html +++ b/files/en-us/web/http/headers/rtt/index.html @@ -25,17 +25,15 @@ {{Glossary("Forbidden header name")}} no - - {{Glossary("CORS-safelisted response header")}} - no - -

The hint allows a server to choose what information is sent based on the network responsiveness/latency. For example, it might choose not to respond to some requests.

+

The RTT value is rounded to the nearest 25 milliseconds to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar round-trip information.

+ +

The hint allows a server to choose what information is sent based on the network responsiveness/latency. For example, it might choose to send fewer resources.

-

Note: The RTT value is rounded to the nearest 25 milliseconds to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar round-trip information.

+

Note: The {{HTTPHeader("Vary")}} header is used in responses to indicate that a different resource is sent for every different value of the header (see HTTP Caching > Varying responses). Even if {{HTTPHeader("RTT")}} is used to configure what resources are sent consider omitting it in the {{HTTPHeader("Vary")}} header — it is likely to change often, which effectively makes the resource uncachable.

Syntax

@@ -63,7 +61,17 @@

Browser compatibility

See also

+ \ No newline at end of file diff --git a/files/en-us/web/http/headers/save-data/index.html b/files/en-us/web/http/headers/save-data/index.html index b38ac10a48cb48f..38ed3bdd78cf0a6 100644 --- a/files/en-us/web/http/headers/save-data/index.html +++ b/files/en-us/web/http/headers/save-data/index.html @@ -12,9 +12,7 @@ ---

{{HTTPSidebar}}

-

The Save-Data header field is a boolean which, in - requests, indicates the client's preference for reduced data usage. This could be for - reasons such as high transfer costs, slow connection speeds, etc.

+

The Save-Data {{Glossary("Client hints","network client hint")}} request header field is a boolean which indicates the client's preference for reduced data usage. This could be for reasons such as high transfer costs, slow connection speeds, etc.

@@ -39,10 +37,14 @@ different markup and styling, disabled polling and automatic updates, and so on.

-

Note: Disabling HTTP/2 Server Push ({{RFC("7540", "Server Push", +

Note: Disabling HTTP/2 Server Push ({{RFC("7540", "Server Push", "8.2")}}) might be desirable too for reducing data downloads.

+
+

Note: The Save-Data {{Glossary("Client hints","network client hint")}} should be used to reduce data set to the client irrespective of the values of other client client hints that indicate network capability, like {{HTTPHeader("Downlink")}} and {{HTTPHeader("RTT")}}.

+
+

Syntax

Save-Data: <sd-token>
@@ -112,14 +114,18 @@

Browser compatibility

See also

From 76cd6ef95adaceee91e563c7a86484db95f9b484 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 15 Jun 2021 16:53:39 +1000 Subject: [PATCH 03/25] Cross link the WebAPI versions to the Headers --- .../en-us/web/api/networkinformation/downlink/index.html | 8 ++++++++ .../web/api/networkinformation/effectivetype/index.html | 6 ++++-- files/en-us/web/api/networkinformation/rtt/index.html | 6 ++++++ .../en-us/web/api/networkinformation/savedata/index.html | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/networkinformation/downlink/index.html b/files/en-us/web/api/networkinformation/downlink/index.html index 64c5d109185ba08..c3ceb41e7df780c 100644 --- a/files/en-us/web/api/networkinformation/downlink/index.html +++ b/files/en-us/web/api/networkinformation/downlink/index.html @@ -55,3 +55,11 @@

Specifications

Browser compatibility

{{Compat}}

+ + +

See also

+ +
    +
  • {{HTTPHeader("Downlink")}}
  • +
+ diff --git a/files/en-us/web/api/networkinformation/effectivetype/index.html b/files/en-us/web/api/networkinformation/effectivetype/index.html index 208d4c923a2bb72..3ac626c1824dd8e 100644 --- a/files/en-us/web/api/networkinformation/effectivetype/index.html +++ b/files/en-us/web/api/networkinformation/effectivetype/index.html @@ -50,6 +50,8 @@

Browser compatibility

See also

+ + diff --git a/files/en-us/web/api/networkinformation/rtt/index.html b/files/en-us/web/api/networkinformation/rtt/index.html index 08f99d36ae5df98..e81429190043162 100644 --- a/files/en-us/web/api/networkinformation/rtt/index.html +++ b/files/en-us/web/api/networkinformation/rtt/index.html @@ -38,3 +38,9 @@

Specifications

Browser compatibility

{{Compat}}

+ +

See also

+ +
    +
  • {{HTTPHeader("RTT")}}
  • +
\ No newline at end of file diff --git a/files/en-us/web/api/networkinformation/savedata/index.html b/files/en-us/web/api/networkinformation/savedata/index.html index 70c723f76b1d558..313c748f5d8ba81 100644 --- a/files/en-us/web/api/networkinformation/savedata/index.html +++ b/files/en-us/web/api/networkinformation/savedata/index.html @@ -43,3 +43,9 @@

Specifications

Browser compatibility

{{Compat}}

+ +

See also

+ +
    +
  • {{HTTPHeader("Save-Data")}}
  • +
\ No newline at end of file From 4a50dddf3c3bd84ab35cd65da4f9a37b573c8414 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 15 Jun 2021 16:54:57 +1000 Subject: [PATCH 04/25] Restructure main headers page to make it extensible for new types --- files/en-us/web/http/headers/index.html | 84 +++++++++++++++---------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/files/en-us/web/http/headers/index.html b/files/en-us/web/http/headers/index.html index 2a1bed4d7cf89e4..c5cbe52a6b5d0da 100644 --- a/files/en-us/web/http/headers/index.html +++ b/files/en-us/web/http/headers/index.html @@ -76,44 +76,64 @@

Caching

Client hints

-

HTTP {{Glossary("Client_hints", "Client hints")}} are a set of request headers that provide useful information about the client such as device type and network conditions, and allow the server to optimize what it serves for those conditions - ([RFC8942]).

+

HTTP {{Glossary("Client_hints", "Client hints")}} are a set of request headers that provide useful information about the client such as device type and network conditions, and allow servers to optimize what is serves for those conditions.

+ +

Servers proactively requests the client hint headers they are interested in from the client using {{HTTPHeader("Accept-CH")}}. The client may then choose to include the requested headers in subsequent requests.

{{HTTPHeader("Accept-CH")}} {{experimental_inline}}
-
Servers can advertise support for Client Hints using the Accept-CH header field or an equivalent HTML <meta> element with http-equiv attribute ([HTML]).
+
Servers can advertise support for Client Hints using the Accept-CH header field or an equivalent HTML <meta> element with http-equiv attribute.
{{HTTPHeader("Accept-CH-Lifetime")}} {{experimental_inline}} {{deprecated_inline}}
-
Servers can ask the client to remember the set of Client Hints that the server supports for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server’s origin ([RFC6454]).
-
{{HTTPHeader("Device-Memory")}} {{experimental_inline}}
-
Approximate amount of available client RAM memory. Technically a part of Device Memory API.
-
{{HTTPHeader("DPR")}} {{deprecated_inline}}
-
Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel.
-
{{HTTPHeader("RTT")}}
-
Application layer round trip time (RTT) in miliseconds, which includes the server processing time. This is technically part of the Network Information API.
-
{{HTTPHeader("Save-Data")}} {{experimental_inline}}
-
A boolean that indicates the user agent's preference for reduced data usage.
-
{{HTTPHeader("Viewport-Width")}} {{experimental_inline}}
-
-
-

A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

-
- -
-

If Viewport-Width occurs in a message more than once, the last value overrides all previous occurrences.

-
-
-
{{HTTPHeader("Width")}} {{experimental_inline}}
-
-
-

The Width request header field is a number that indicates the desired resource width in physical pixels (i.e. intrinsic size of an image). The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

-
- -
-

If the desired resource width is not known at the time of the request or the resource does not have a display width, the Width header field can be omitted. If Width occurs in a message more than once, the last value overrides all previous occurrences

-
-
+
Servers can ask the client to remember the set of Client Hints that the server supports for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server’s origin.
+

The different categories of client hints are listed below.

+ +

Device client hints

+ +
+
{{HTTPHeader("Device-Memory")}} {{experimental_inline}}
+
Approximate amount of available client RAM memory. Technically a part of Device Memory API.
+
{{HTTPHeader("DPR")}} {{deprecated_inline}}
+
Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel.
+
{{HTTPHeader("Viewport-Width")}} {{experimental_inline}}
+
+
+

A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

+
+ +
+

If Viewport-Width occurs in a message more than once, the last value overrides all previous occurrences.

+
+
+
{{HTTPHeader("Width")}} {{experimental_inline}}
+
+
+

The Width request header field is a number that indicates the desired resource width in physical pixels (i.e. intrinsic size of an image). The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

+
+ +
+

If the desired resource width is not known at the time of the request or the resource does not have a display width, the Width header field can be omitted. If Width occurs in a message more than once, the last value overrides all previous occurrences

+
+
+
+ + +

Network client hints

+ +

Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency.

+ +
+
{{HTTPHeader("Downlink")}}
+
Approximate bandwidth of the client's connection to the server, in Mbps. This is part of the Network Information API.
+
{{HTTPHeader("ECT")}}
+
The {{Glossary("effective connection type")}} ("network profile") that best matches the connection's latency and bandwidth. This is part of the Network Information API.
+
{{HTTPHeader("RTT")}}
+
Application layer round trip time (RTT) in miliseconds, which includes the server processing time. This is part of the Network Information API.
+
{{HTTPHeader("Save-Data")}} {{experimental_inline}}
+
A boolean that indicates the user agent's preference for reduced data usage. This is part of the Save Data API.
+
+

Conditionals

From f122948bf31e25e6f0ac7012e51c16cb9bbdb69b Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 15 Jun 2021 16:55:47 +1000 Subject: [PATCH 05/25] Better cross linking on Accept-CH --- .../headers/accept-ch-lifetime/index.html | 28 +++++++++++-------- .../web/http/headers/accept-ch/index.html | 25 ++++++----------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/files/en-us/web/http/headers/accept-ch-lifetime/index.html b/files/en-us/web/http/headers/accept-ch-lifetime/index.html index d345079fff019cc..d9118d45bc926f9 100644 --- a/files/en-us/web/http/headers/accept-ch-lifetime/index.html +++ b/files/en-us/web/http/headers/accept-ch-lifetime/index.html @@ -13,24 +13,30 @@ browser-compat: http.headers.Accept-CH-Lifetime ---
{{HTTPSidebar}}{{securecontext_header}}{{Deprecated_header}}
+
+

Warning: The header was removed from the specification in draft 8.

+

The Accept-CH-Lifetime header is set by the server to - specify the persistence of {{HTTPHeader("Accept-CH")}} header value that specifies for - which Client Hints headers client should + specify the persistence of the client hint headers it specified using {{HTTPHeader("Accept-CH")}}, that the client should include in subsequent requests.

- - - - - - - - + + + + + + + + + + + + -
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}?
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}no
{{Glossary("CORS-safelisted response header")}}no
+

Note: Client Hints are accessible only on secure origins (via TLS). diff --git a/files/en-us/web/http/headers/accept-ch/index.html b/files/en-us/web/http/headers/accept-ch/index.html index 3c708991eef5458..c04ce652d1c225b 100644 --- a/files/en-us/web/http/headers/accept-ch/index.html +++ b/files/en-us/web/http/headers/accept-ch/index.html @@ -2,9 +2,11 @@ title: Accept-CH slug: Web/HTTP/Headers/Accept-CH tags: + - Accept-CH - Client hints - HTTP - HTTP Header + - Response header browser-compat: http.headers.Accept-CH ---

{{HTTPSidebar}}{{securecontext_header}}{{SeeCompatTable}}
@@ -23,6 +25,10 @@ {{Glossary("Forbidden header name")}} no + + {{Glossary("CORS-safelisted response header")}} + no + @@ -34,12 +40,12 @@

Syntax

-
Accept-CH: <list of client hints>
+
Accept-CH: <list of client hints>
 

Examples

-
Accept-CH: Viewport-Width, Width
+
Accept-CH: Viewport-Width, Width
 Vary: Viewport-Width, Width
 
@@ -51,20 +57,7 @@

Examples

Specifications

- - - - - - - - - - - - - -
SpecificationTitle
{{RFC("8942", "Accept-CH")}}HTTP Client Hints
+{{Specifications}}

Browser compatibility

From 20e193d46048b8d1cf43d07d3a92ab827effb084 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Tue, 15 Jun 2021 17:23:54 +1000 Subject: [PATCH 06/25] Restructure client hints glossary --- files/en-us/glossary/client_hints/index.html | 34 +++++++++++++------ .../effective_connection_type/index.html | 1 + 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/files/en-us/glossary/client_hints/index.html b/files/en-us/glossary/client_hints/index.html index 00c7a4078689242..beef4f1fca66d5b 100644 --- a/files/en-us/glossary/client_hints/index.html +++ b/files/en-us/glossary/client_hints/index.html @@ -8,17 +8,18 @@ - Reference - Web Performance --- -

Client Hints are a set of HTTP request header fields that a server can proactively - request from a client in order to get its device and agent specific preferences. The set of "hint" headers are listed here: HTTP Headers > Client hints.

+

Client Hints are a set of HTTP request header fields that a server can proactively request from a client in order to get information about the device, network, user and agent specific preferences. The server can then determine which resources to send based on the client information.

-

A server must announce that it supports client hints, using the {{HTTPHeader("Accept-CH")}} header to specify the hints that it is interested in recieving. - When a client that supports client hints receives the Accept-CH header it appends client hint headers that match the advertised field-values to subsequent requests.

+

The set of "hint" headers are listed in the topic HTTP Headers and summarised below.

+ +

Overview

-

For example, following Accept-CH in a response below, the client could append {{HTTPHeader("Width")}}, {{HTTPHeader("Viewport-Width")}}, and {{HTTPHeader("Downlink")}} headers to all subsequent requests.

+

A server must announce that it supports client hints, using the {{HTTPHeader("Accept-CH")}} header to specify the hints that it is interested in recieving. + When a client that supports client hints receives the Accept-CH header it can append client hint headers that match the advertised field-values to subsequent requests.

-
Accept-CH: Width, Viewport-Width, Downlink
+

For example, following Accept-CH in a response below, the client could append {{HTTPHeader("Width")}} and {{HTTPHeader("Downlink")}} headers to all subsequent requests.

-

The server can then determine which resources to send based on the client information.

+
Accept-CH: Width, Downlink

Note

@@ -27,14 +28,25 @@

Note

+

Caching and Client Hints

+ +

Client hints that determine which resources are sent in responses should "generally" also be included in the affected response's {{HTTPHeader("Vary")}} header. This ensures that a different resource is cached for every different value of the hint header.

+ +
Vary: Accept, Width, ECT
+ +

You may prefer to omit specifying {{HTTPHeader("Vary")}} or use sme other strategy for client hint headers where the value changes a lot, as this effectively makes the resource uncachable (a new cache entry is created for every different value). This applies in particular to network client hints like {{HTTPHeader("Downlink")}} and {{HTTPHeader("RTT")}}. For more information see HTTP Caching > Varying responses.

+ +

Hint types

+ +

Device client hints

+ +

Device client hints allow a server to choose what information is sent based on the device characteristics including available memory and screen properties. Headers include: {{HTTPHeader("Device-Memory")}}, {{HTTPHeader("DPR")}}, {{HTTPHeader("Width")}}, {{HTTPHeader("Viewport-Width")}}

-

Varying Client Hints

-

To convey to caches that different Client Hints may affect the response, the {{HTTPHeader("Vary")}} HTTP header must be used.

+

Network client hints

-

Example varying response:

+

Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency. Headers include: {{HTTPHeader("Save-Data")}}, {{HTTPHeader("Downlink")}}, {{HTTPHeader("ECT")}}, {{HTTPHeader("RTT")}}

-

Vary: Accept, Width, Viewport-Width, Downlink

See also

diff --git a/files/en-us/glossary/effective_connection_type/index.html b/files/en-us/glossary/effective_connection_type/index.html index 4fb01acfd3ca1c6..f46b0278259106d 100644 --- a/files/en-us/glossary/effective_connection_type/index.html +++ b/files/en-us/glossary/effective_connection_type/index.html @@ -65,4 +65,5 @@

See also

  • Network Information API
  • {{domxref('NetworkInformation')}}
  • {{domxref('NetworkInformation.effectiveType')}}
  • +
  • {{HTTPHeader("ECT")}}
  • From 7d9633d1a9d96634ab00a2fc90dc0cf7b1087d5b Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:13:18 +1000 Subject: [PATCH 07/25] Update files/en-us/glossary/client_hints/index.html Co-authored-by: Florian Scholz --- files/en-us/glossary/client_hints/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/glossary/client_hints/index.html b/files/en-us/glossary/client_hints/index.html index beef4f1fca66d5b..2368f391c30eefd 100644 --- a/files/en-us/glossary/client_hints/index.html +++ b/files/en-us/glossary/client_hints/index.html @@ -10,7 +10,7 @@ ---

    Client Hints are a set of HTTP request header fields that a server can proactively request from a client in order to get information about the device, network, user and agent specific preferences. The server can then determine which resources to send based on the client information.

    -

    The set of "hint" headers are listed in the topic HTTP Headers and summarised below.

    +

    The set of "hint" headers are listed in the topic HTTP Headers and summarized below.

    Overview

    From 454dd31bc7562937f150f5541ea432ba1c3152bf Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:14:13 +1000 Subject: [PATCH 08/25] fix typo glossary/client_hints Co-authored-by: Florian Scholz --- files/en-us/glossary/client_hints/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/glossary/client_hints/index.html b/files/en-us/glossary/client_hints/index.html index 2368f391c30eefd..c529f159c1efbf7 100644 --- a/files/en-us/glossary/client_hints/index.html +++ b/files/en-us/glossary/client_hints/index.html @@ -34,7 +34,7 @@

    Caching and Client Hints

    Vary: Accept, Width, ECT
    -

    You may prefer to omit specifying {{HTTPHeader("Vary")}} or use sme other strategy for client hint headers where the value changes a lot, as this effectively makes the resource uncachable (a new cache entry is created for every different value). This applies in particular to network client hints like {{HTTPHeader("Downlink")}} and {{HTTPHeader("RTT")}}. For more information see HTTP Caching > Varying responses.

    +

    You may prefer to omit specifying {{HTTPHeader("Vary")}} or use some other strategy for client hint headers where the value changes a lot, as this effectively makes the resource uncachable (a new cache entry is created for every different value). This applies in particular to network client hints like {{HTTPHeader("Downlink")}} and {{HTTPHeader("RTT")}}. For more information see HTTP Caching > Varying responses.

    Hint types

    From 69cdcc846300e2785ee37545517b2566c426fd3b Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:14:46 +1000 Subject: [PATCH 09/25] Typo: missing fullstop in glossary/client_hints Co-authored-by: Florian Scholz --- files/en-us/glossary/client_hints/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/glossary/client_hints/index.html b/files/en-us/glossary/client_hints/index.html index c529f159c1efbf7..d89686e3bc48079 100644 --- a/files/en-us/glossary/client_hints/index.html +++ b/files/en-us/glossary/client_hints/index.html @@ -40,7 +40,7 @@

    Hint types

    Device client hints

    -

    Device client hints allow a server to choose what information is sent based on the device characteristics including available memory and screen properties. Headers include: {{HTTPHeader("Device-Memory")}}, {{HTTPHeader("DPR")}}, {{HTTPHeader("Width")}}, {{HTTPHeader("Viewport-Width")}}

    +

    Device client hints allow a server to choose what information is sent based on the device characteristics including available memory and screen properties. Headers include: {{HTTPHeader("Device-Memory")}}, {{HTTPHeader("DPR")}}, {{HTTPHeader("Width")}}, {{HTTPHeader("Viewport-Width")}}.

    Network client hints

    From 220816a2567d5c122a17ea5ace9492686e687be6 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:15:41 +1000 Subject: [PATCH 10/25] Typo: missing fullstop Co-authored-by: Florian Scholz --- files/en-us/glossary/client_hints/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/glossary/client_hints/index.html b/files/en-us/glossary/client_hints/index.html index d89686e3bc48079..7ac63c7cf3c8f62 100644 --- a/files/en-us/glossary/client_hints/index.html +++ b/files/en-us/glossary/client_hints/index.html @@ -45,7 +45,7 @@

    Device client hints

    Network client hints

    -

    Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency. Headers include: {{HTTPHeader("Save-Data")}}, {{HTTPHeader("Downlink")}}, {{HTTPHeader("ECT")}}, {{HTTPHeader("RTT")}}

    +

    Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency. Headers include: {{HTTPHeader("Save-Data")}}, {{HTTPHeader("Downlink")}}, {{HTTPHeader("ECT")}}, {{HTTPHeader("RTT")}}.

    See also

    From 86ca4b88e470c0f348d39bca08b46e3cceb045a2 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:17:33 +1000 Subject: [PATCH 11/25] Revert Specifications macro in Accept-CH --- files/en-us/web/http/headers/accept-ch/index.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/accept-ch/index.html b/files/en-us/web/http/headers/accept-ch/index.html index c04ce652d1c225b..800d935aaa23a20 100644 --- a/files/en-us/web/http/headers/accept-ch/index.html +++ b/files/en-us/web/http/headers/accept-ch/index.html @@ -57,7 +57,20 @@

    Examples

    Specifications

    -{{Specifications}} + + + + + + + + + + + + + +
    SpecificationTitle
    {{RFC("8942", "Accept-CH")}}HTTP Client Hints

    Browser compatibility

    From 64605de4f2951de509df85e7aa834cc9faba1b63 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:19:25 +1000 Subject: [PATCH 12/25] Update files/en-us/web/http/headers/downlink/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/downlink/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html index b76707a2939fdf5..fb3e75f7f95e689 100644 --- a/files/en-us/web/http/headers/downlink/index.html +++ b/files/en-us/web/http/headers/downlink/index.html @@ -42,7 +42,7 @@

    Syntax

    Examples

    -

    Server first needs to opt in to receive the Downlink header by sending the response headers {{HTTPHeader("Accept-CH")}} containing Downlink.

    +

    A server first needs to opt in to receive the Downlink header by sending the {{HTTPHeader("Accept-CH")}} response header containing Downlink.

    Accept-CH: Downlink
    @@ -73,4 +73,4 @@

    See also

  • {{HTTPHeader("Accept-CH")}}
  • HTTP Caching > Varying responses and {{HTTPHeader("Vary")}}
  • {{domxref("NetworkInformation.effectiveType")}}
  • - \ No newline at end of file + From 177073d7b3bc4598b48dccbd7999ec9c143ccc6c Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:19:35 +1000 Subject: [PATCH 13/25] Update files/en-us/web/http/headers/downlink/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/downlink/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html index fb3e75f7f95e689..4fff6f5d7e6552d 100644 --- a/files/en-us/web/http/headers/downlink/index.html +++ b/files/en-us/web/http/headers/downlink/index.html @@ -46,7 +46,7 @@

    Examples

    Accept-CH: Downlink
    -

    Then on subsequent requests the client might send Downlink header back:

    +

    Then on subsequent requests the client might send a Downlink header back:

    Downlink: 1.7
    From 546671bcc0e03be64d8fd4ac685ee1760b51baf7 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:20:07 +1000 Subject: [PATCH 14/25] Update files/en-us/web/http/headers/ect/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/ect/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html index 3c90b37c8362fc0..07e778f990f3b19 100644 --- a/files/en-us/web/http/headers/ect/index.html +++ b/files/en-us/web/http/headers/ect/index.html @@ -38,7 +38,7 @@

    Syntax

    -
    ect: <value>
    +
    ECT: <value>

    Examples

    From 4acf88a2f4a27f73c223d84b082a67620adcf17a Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:20:36 +1000 Subject: [PATCH 15/25] Update files/en-us/web/http/headers/rtt/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/rtt/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html index a642790be09dfda..4e236e1c9662907 100644 --- a/files/en-us/web/http/headers/rtt/index.html +++ b/files/en-us/web/http/headers/rtt/index.html @@ -42,7 +42,7 @@

    Syntax

    Examples

    -

    Server first needs to opt in to receive the RTT header by sending the response headers {{HTTPHeader("Accept-CH")}} containing RTT.

    +

    A server first needs to opt in to receive the RTT header by sending the {{HTTPHeader("Accept-CH")}} response header containing RTT.

    Accept-CH: RTT
    @@ -74,4 +74,4 @@

    See also

  • HTTP Caching > Varying responses and {{HTTPHeader("Vary")}}
  • {{domxref("NetworkInformation.effectiveType")}}
  • - \ No newline at end of file + From 39bd742e69f47f090bb38b1cff7e7c313244c114 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:20:50 +1000 Subject: [PATCH 16/25] Update files/en-us/web/http/headers/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/index.html b/files/en-us/web/http/headers/index.html index c5cbe52a6b5d0da..1c19aa7f95a050f 100644 --- a/files/en-us/web/http/headers/index.html +++ b/files/en-us/web/http/headers/index.html @@ -76,7 +76,7 @@

    Caching

    Client hints

    -

    HTTP {{Glossary("Client_hints", "Client hints")}} are a set of request headers that provide useful information about the client such as device type and network conditions, and allow servers to optimize what is serves for those conditions.

    +

    HTTP {{Glossary("Client_hints", "Client hints")}} are a set of request headers that provide useful information about the client such as device type and network conditions, and allow servers to optimize what is served for those conditions.

    Servers proactively requests the client hint headers they are interested in from the client using {{HTTPHeader("Accept-CH")}}. The client may then choose to include the requested headers in subsequent requests.

    From 54c11e60839782c59f349767d1640be604df6321 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:21:05 +1000 Subject: [PATCH 17/25] Update files/en-us/web/http/headers/rtt/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/rtt/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html index 4e236e1c9662907..e65639cf209b21c 100644 --- a/files/en-us/web/http/headers/rtt/index.html +++ b/files/en-us/web/http/headers/rtt/index.html @@ -46,7 +46,7 @@

    Examples

    Accept-CH: RTT
    -

    Then on subsequent requests the client might send RTT header back:

    +

    Then on subsequent requests the client might send an RTT header back:

    RTT: 125
    From 86421c3083e0f46a4875ba61801ac582e2649a91 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:24:02 +1000 Subject: [PATCH 18/25] Update files/en-us/web/http/headers/rtt/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/rtt/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html index e65639cf209b21c..6ebe34c9966cfd3 100644 --- a/files/en-us/web/http/headers/rtt/index.html +++ b/files/en-us/web/http/headers/rtt/index.html @@ -65,7 +65,6 @@

    See also

  • Network client hints
    • {{HTTPHeader("Downlink")}}
    • -
    • {{HTTPHeader("RTT")}}
    • {{HTTPHeader("ECT")}}
    • {{HTTPHeader("Save-Data")}}
    From 4c2f7467a48b2e77cece4a65bf7dfc1460ac10a0 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:24:09 +1000 Subject: [PATCH 19/25] Update files/en-us/web/http/headers/ect/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/ect/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html index 07e778f990f3b19..79d59b7e13585c0 100644 --- a/files/en-us/web/http/headers/ect/index.html +++ b/files/en-us/web/http/headers/ect/index.html @@ -67,7 +67,6 @@

    See also

    • {{HTTPHeader("Downlink")}}
    • {{HTTPHeader("RTT")}}
    • -
    • {{HTTPHeader("ECT")}}
    • {{HTTPHeader("Save-Data")}}
  • From 0a96a024cbdb1cd19b9260fcd76a5ab721e18fd6 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:24:24 +1000 Subject: [PATCH 20/25] Update files/en-us/web/http/headers/save-data/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/save-data/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/web/http/headers/save-data/index.html b/files/en-us/web/http/headers/save-data/index.html index 38ed3bdd78cf0a6..851f4c89542d56b 100644 --- a/files/en-us/web/http/headers/save-data/index.html +++ b/files/en-us/web/http/headers/save-data/index.html @@ -124,7 +124,6 @@

    See also

  • {{HTTPHeader("Downlink")}}
  • {{HTTPHeader("RTT")}}
  • {{HTTPHeader("ECT")}}
  • -
  • {{HTTPHeader("Save-Data")}}
  • {{domxref("NetworkInformation.saveData")}}
  • From 3e5f22d3227b236be3b92ca1358e91bb5a964f8c Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:24:53 +1000 Subject: [PATCH 21/25] Update files/en-us/web/http/headers/ect/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/ect/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html index 79d59b7e13585c0..39ca7a7334badcd 100644 --- a/files/en-us/web/http/headers/ect/index.html +++ b/files/en-us/web/http/headers/ect/index.html @@ -42,7 +42,7 @@

    Syntax

    Examples

    -

    Server first needs to opt in to receive the Downlink header by sending the response headers {{HTTPHeader("Accept-CH")}} containing Downlink.

    +

    A server first needs to opt in to receive the ECT header by sending the {{HTTPHeader("Accept-CH")}} response header containing ECT.

    Accept-CH: ECT
    From 810f4132338494eca3f49b6317b1949893a52c2a Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:25:03 +1000 Subject: [PATCH 22/25] Update files/en-us/web/http/headers/ect/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/ect/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html index 39ca7a7334badcd..b8dbe78a44c12c7 100644 --- a/files/en-us/web/http/headers/ect/index.html +++ b/files/en-us/web/http/headers/ect/index.html @@ -46,7 +46,7 @@

    Examples

    Accept-CH: ECT
    -

    Then on subsequent requests the client might send Downlink header back:

    +

    Then on subsequent requests the client might send an ECT header back:

    ECT: 2g
    From c10fc9e8d7562bcaad67f18eb638dcff1c2883b0 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:25:41 +1000 Subject: [PATCH 23/25] Update files/en-us/web/http/headers/downlink/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/downlink/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html index 4fff6f5d7e6552d..b3cf86092b5c42f 100644 --- a/files/en-us/web/http/headers/downlink/index.html +++ b/files/en-us/web/http/headers/downlink/index.html @@ -28,7 +28,7 @@ -

    The Downlink value is rounded to the nearest 25 kilobits per second to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar information.

    +

    The Downlink value is given in Mbps and rounded to the nearest 25 kilobits per second to prevent fingerprinting; There are many other mechanisms an attacker might use to obtain similar information.

    The hint allows a server to choose what information is sent based on the network bandwidth. For example, a server might choose to send smaller versions of images and other resources on low bandwidth networks.

    From b52423753e90649c90cce240c42c36c5c9529a74 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:25:48 +1000 Subject: [PATCH 24/25] Update files/en-us/web/http/headers/downlink/index.html Co-authored-by: Florian Scholz --- files/en-us/web/http/headers/downlink/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html index b3cf86092b5c42f..34fe3b6ec26b6fc 100644 --- a/files/en-us/web/http/headers/downlink/index.html +++ b/files/en-us/web/http/headers/downlink/index.html @@ -64,7 +64,6 @@

    See also

  • Adapting to Users with Client Hints (developer.google.com)
  • Network client hints
      -
    • {{HTTPHeader("Downlink")}}
    • {{HTTPHeader("RTT")}}
    • {{HTTPHeader("ECT")}}
    • {{HTTPHeader("Save-Data")}}
    • From ff458a9305da1351ec582fdeb04946bf4668eca4 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 18 Jun 2021 11:52:57 +1000 Subject: [PATCH 25/25] Fixes following feedback from Florian (directives sections) --- .../web/http/headers/downlink/index.html | 7 +++++++ files/en-us/web/http/headers/ect/index.html | 7 +++++++ files/en-us/web/http/headers/index.html | 20 ++----------------- files/en-us/web/http/headers/rtt/index.html | 7 +++++++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/files/en-us/web/http/headers/downlink/index.html b/files/en-us/web/http/headers/downlink/index.html index 34fe3b6ec26b6fc..5dbca2af6c0f22f 100644 --- a/files/en-us/web/http/headers/downlink/index.html +++ b/files/en-us/web/http/headers/downlink/index.html @@ -40,6 +40,13 @@

      Syntax

      Downlink: <number>
      +

      Directives

      + +
      +
      <number>
      +
      The downlink rate in Mbps, rounded to the nearest 25 kilobits.
      +
      +

      Examples

      A server first needs to opt in to receive the Downlink header by sending the {{HTTPHeader("Accept-CH")}} response header containing Downlink.

      diff --git a/files/en-us/web/http/headers/ect/index.html b/files/en-us/web/http/headers/ect/index.html index b8dbe78a44c12c7..7b21d12ae126f11 100644 --- a/files/en-us/web/http/headers/ect/index.html +++ b/files/en-us/web/http/headers/ect/index.html @@ -40,6 +40,13 @@

      Syntax

      ECT: <value>
      +

      Directives

      + +
      +
      <value>
      +
      A value indicating {{Glossary("effective connection type")}}. This is one of: slow-2g, 2g, 3g, or 4g.
      +
      +

      Examples

      A server first needs to opt in to receive the ECT header by sending the {{HTTPHeader("Accept-CH")}} response header containing ECT.

      diff --git a/files/en-us/web/http/headers/index.html b/files/en-us/web/http/headers/index.html index 1c19aa7f95a050f..f4bdac696df01fa 100644 --- a/files/en-us/web/http/headers/index.html +++ b/files/en-us/web/http/headers/index.html @@ -97,25 +97,9 @@

      Device client hints

      {{HTTPHeader("DPR")}} {{deprecated_inline}}
      Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel.
      {{HTTPHeader("Viewport-Width")}} {{experimental_inline}}
      -
      -
      -

      A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

      -
      - -
      -

      If Viewport-Width occurs in a message more than once, the last value overrides all previous occurrences.

      -
      -
      +
      A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value). If Viewport-Width occurs in a message more than once, the last value overrides all previous occurrences.
      {{HTTPHeader("Width")}} {{experimental_inline}}
      -
      -
      -

      The Width request header field is a number that indicates the desired resource width in physical pixels (i.e. intrinsic size of an image). The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value).

      -
      - -
      -

      If the desired resource width is not known at the time of the request or the resource does not have a display width, the Width header field can be omitted. If Width occurs in a message more than once, the last value overrides all previous occurrences

      -
      -
      +
      The Width request header field is a number that indicates the desired resource width in physical pixels (i.e. intrinsic size of an image). The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value). The Width header field can be omitted if the desired resource width is not known at the time of the request or the resource does not have a display width. If Width occurs in a message more than once, the last value overrides all previous occurrences.
      diff --git a/files/en-us/web/http/headers/rtt/index.html b/files/en-us/web/http/headers/rtt/index.html index 6ebe34c9966cfd3..493e5aae9558418 100644 --- a/files/en-us/web/http/headers/rtt/index.html +++ b/files/en-us/web/http/headers/rtt/index.html @@ -40,6 +40,13 @@

      Syntax

      RTT: <number>
      +

      Directives

      + +
      +
      <number>
      +
      The approximate round trip time in milliseconds, rounded to the nearest 25 milliseconds.
      +
      +

      Examples

      A server first needs to opt in to receive the RTT header by sending the {{HTTPHeader("Accept-CH")}} response header containing RTT.