web api instance property
NavigatorUAData: mobile property
Limited availabilityAvailable in workers
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
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- The
Sec-CH-UA-Mobileheader (a low-entropy client hint) contains the same information.