HTTP Headers
Content-DPR header
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
The HTTP Content-DPR response header is used to confirm the image device to pixel ratio (DPR) in requests where the screen DPR client hint was used to select an image resource.
Note: The Content-DPR header was removed from the client hints specification in draft-ietf-httpbis-client-hints-07. The Responsive Image Client Hints specification proposes to replace this header by specifying intrinsic resolution/dimensions in EXIF metadata.
If the DPR client hint is used to select an image, the server must specify Content-DPR in the response. If the value in Content-DPR is different from the DPR value in the request (i.e., image DPR is not the same as screen DPR), the client must use the Content-DPR for determining intrinsic image size and scaling the image.
If the Content-DPR header appears more than once in a message, the last occurrence is used.
| Header type | Response header, Client hint |
|---|---|
| Forbidden request header | No |
| CORS-safelisted response header | No |
Syntax
Content-DPR: <number>Directives
<number>- This numerical value represents the image device pixel ratio. It is calculated using the following formula: Content-DPR = Selected image resource size / (Width / DPR).
Example
Examples
A server must first agree to receive the DPR header by sending the response header Accept-CH containing the directive DPR.
Accept-CH: DPR
Then, on subsequent requests, the client might send the DPR header to the server:
DPR: 2.0
If a request with the DPR header (as shown above) is for an image resource, then the server’s response must include the Content-DPR header:
Content-DPR: 2.0
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Content-DPR header. This is useful when testing responsive image delivery and verifying how your server adapts images based on device pixel ratio (DPR) during development or debugging. Steps to Modify the Content-DPR Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Content-DPR.
- In the “Header Value” field, enter the DPR value you want to simulate (for example, 2.0).
- Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-cdn.com/*).
- Save the rule.
Once configured, Requestly will inject the Content-DPR header into all matching responses. This allows you to simulate how browsers adjust image rendering based on device pixel ratio.
You might need to modify the Content-DPR header to test image scaling behavior, validate responsive image setups, or debug high-resolution display issues without changing your production server configuration. This helps ensure images are delivered and displayed correctly across different devices.
Table of Contents
- No headings found.





