MDN self-hosted library · e01.org

NavigatorUAData: mobile property

User-Agent Client Hints API

Open notebook · 1 cells web-api-instance-property upstream source

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