Viewport-WidthViewport-Width is a Client Hint request header that reports the client's layout viewport width to the server as an integer in CSS pixels. It lets the server pick images and layouts suited to the screen width.
The value is the viewport width (e.g. `Viewport-Width: 1280`), and the browser sends it only when the server has explicitly requested it.
The core premise of Client Hints is opt-in. The browser doesn't send this header automatically; the server must first advertise `Accept-CH: Viewport-Width` (via header or meta tag) to say 'I want this hint,' after which the browser includes the value on subsequent requests. This design reduces the fingerprinting surface for privacy.
Its use is server-side negotiation of responsive images. Knowing the viewport width lets the server choose an appropriately sized image and save bandwidth — moving `srcset`/`sizes`-based client selection to the server side. When the response varies by this hint, use `Vary: Viewport-Width` to keep caches correct.
During standardization this family of hints was redefined under a `Sec-CH-` prefix (e.g. `Sec-CH-Viewport-Width`). The unprefixed legacy `Viewport-Width`, `Width`, and `DPR` are on a deprecation path with limited support in some browsers, so new implementations should prefer the `Sec-CH-*` names and modern responsive-image techniques.
Viewport-Width: <integer>e.g. Viewport-Width: 1280