🎉 Requestly joins BrowserStack to build the future of application testing. Read more

HTTP Headers

Downlink

HTTP Header

The HTTP Downlink request header is used within Client Hints to communicate an estimated bandwidth of the client’s connection to the server, measured in Mbps.

This hint enables servers to tailor the content they send based on the network bandwidth. For instance, on low-bandwidth networks, servers might opt to deliver smaller versions of images and other resources to improve loading times and reduce data usage.

Syntax

Downlink: <number>

Directives

The downlink rate in Mbps, rounded to the nearest 25 kilobits.
The downlink rate may be used as a fingerprinting variable, so values for the header are intentionally coarse to reduce the potential for its misuse.

Example

A server must first opt in to receive the Downlink header by sending the Accept-CH response header containing Downlink.

Once the server has opted in, on subsequent requests, the client can send a Downlink header back, specifying its preference:

http
Accept-CH: Downlink

And in subsequent requests:

http
Downlink: 1.7

How to Modify Header using Requestly

Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Downlink header. This is especially useful for testing how your application behaves under different network conditions during development or debugging. Steps to Modify the Downlink Header:

  1. Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
  2. Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
  3. Add a new header modification:
    • Under “Action”, select “Add” or “Override”.
    • In the “Header Name” field, enter Downlink.
    • In the “Header Value” field, enter the desired downlink speed value (e.g., 10Mbps).
  4. Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
  5. Save the rule.

By modifying the Downlink header, you can simulate different network speed scenarios to see how your application performs, helping you optimize user experience under varying internet conditions.