Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. Headers
  5. Sec-CH-UA-Mobile

Sec-CH-UA-Mobile header

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

The HTTPSec-CH-UA-Mobilerequest header is auser agent client hint which indicates whether the browser is on a mobile device.It can also be used by a desktop browser to indicate a preference for a "mobile" user experience.

Sec-CH-UA-Mobile is alow entropy hint.Unless blocked by a user agent permission policy, it is sent by default, without the server opting in by sendingAccept-CH.

Header typeRequest header,Client hint
Forbidden request headerYes (Sec- prefix)

Syntax

http
Sec-CH-UA-Mobile: <boolean>

Directives

<boolean>

?1 indicates that the user-agent prefers a mobile experience (true).?0 indicates that user-agent does not prefer a mobile experience (false).

Examples

Using Sec-CH-UA-Mobile

AsSec-CH-UA-Mobile is alow entropy hint it is typically sent in all requests.A desktop browser would usually send requests with the following header:

http
Sec-CH-UA-Mobile: ?0

A browser on a mobile device would usually send requests with the following header:

http
Sec-CH-UA-Mobile: ?1

Specifications

Specification
User-Agent Client Hints
# sec-ch-ua-mobile

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp