Downlink

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Downlink Client hint request header field provides the approximate bandwidth of the client's connection to the server, in Mbps.

Header type Request header, Client hint
Forbidden header name no

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.

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

Syntax

http

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 Accept-CH response header containing Downlink.

http

Accept-CH: Downlink

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

http

Downlink: 1.7

Specifications

Specification
Network Information API
# downlink-request-header-field

Browser compatibility

BCD tables only load in the browser

See also