Sec-CH-UA-Mobile
Request header Client Hints

Overview

Sec-CH-UA-Mobile is a low-entropy User-Agent Client Hint conveying, as a boolean, whether the client is a mobile device. The value is always sent — ?1 for true, ?0 for false — so the server can branch mobile vs desktop representations.

Details

The value is a Structured Fields boolean and can only be ?1 (mobile) or ?0 (not mobile). Unlike Sec-Fetch-User, this header is sent explicitly as ?0 even when false. Being a low-entropy hint it is attached by default without an Accept-CH opt-in, so mobile status can be judged from the very first request.

Traditionally servers detected mobile by regex-matching a 'Mobile' token in the User-Agent string, which is inaccurate and clashes with UA-freezing efforts. Sec-CH-UA-Mobile provides a single boolean the browser itself computed, which is more robust. It is useful for adaptive serving — optimizing image, layout, and resource weight for mobile.

If the response varies by this value, send Vary: Sec-CH-UA-Mobile for cache correctness. As a Sec-prefixed hint it cannot be forged by script, but it is only a hint about 'mobile form factor' and does not stand in for specifics like screen size or touch support, so design fine-grained responsiveness alongside CSS media queries.

Syntax

Sec-CH-UA-Mobile: <?0 | ?1>

e.g. Sec-CH-UA-Mobile: ?0

Directives / values

?1Structured-Fields boolean true, meaning a mobile device.
?0Structured-Fields boolean false, meaning not mobile (desktop, etc.).

Notes

Related headers

Related status codes

Specification