NavigatorUAData: mobile property
User-Agent Client Hints API
User-Agent Client Hints API
The mobile read-only property of the NavigatorUAData interface returns a value indicating whether the device is a mobile device.
Value
A Boolean, true if this is a mobile device.
Examples
The following example prints the value of mobile to the console.
console.log(navigator.userAgentData.mobile);
Specifications
Browser compatibility
See also
- The Sec-CH-UA-Mobile header (a low-entropy client hint) contains the same information.