DPR
Request header Client Hints

Overview

DPR (Device Pixel Ratio) is a Client Hint request header that reports the ratio of physical pixels to CSS pixels on the client's screen, letting the server know whether it's a high-density (Retina) display.

The value is a decimal ratio (e.g. `DPR: 1.0` for standard, `DPR: 2.0` for Retina, `DPR: 3.0` on some high-density devices).

Details

A DPR of 2.0 means one CSS pixel is drawn with 2x2 physical pixels. For the same layout width (CSS pixels), a higher DPR needs an image with more physical pixels to look crisp. The server combines DPR and Width to select the exact resolution, sending smaller images to low-density screens to save bandwidth.

Like other Client Hints it is opt-in: the browser sends the value only after the server requests `Accept-CH: DPR`. When the server sends an image downscaled to reflect DPR, it used to report the ratio actually applied via a `Content-DPR` response header so the client could lay out the image at the correct size (preventing layout breakage).

During standardization DPR was redefined as `Sec-CH-DPR`, the unprefixed `DPR` is on a deprecation path, and `Content-DPR` disappeared with it. Today responsive images are widely solved client-side with HTML `srcset` `x` descriptors (e.g. `image@2x.png 2x`) and `sizes`, so consider the modern `Sec-CH-*` hints only when server negotiation is genuinely required.

Syntax

DPR: <number>

e.g. DPR: 2.0

Notes

Related headers

Specification