Skip to content

Generic Sensor API browser support

Published

The Generic Sensor API provides interfaces with a shared design for reading device sensors from web pages. Use concrete subclasses such as Accelerometer, Gyroscope, Magnetometer, and AmbientLightSensor; the base Sensor interface is not used directly. Each sensor needs a Permissions API grant under its own permission name (for example accelerometer) and is available only in secure contexts.

The support rows use Accelerometer (api.Accelerometer in MDN browser-compat-data) as the representative interface. Gyroscope matches Accelerometer in that data, while Magnetometer and AmbientLightSensor ship in Chromium only behind the #enable-experimental-web-platform-features flag and are not covered by the rows.

  • Legend
  • Yes
  • Partial
  • Flag
  • No
  • Unknown
Browser / PlatformSupportVersionsConfidenceSourceNotes
Chrome (Desktop)#Yes67highsource—
Chrome (Android)#Yes67highsource1
Edge (Desktop)#Yes79highsource2
Firefox (Desktop)#No—highsource3
Firefox (Android)#No—highsource45
Safari (macOS)#No—highsource6
Safari (iOS)#No—highsource78
Samsung Internet#Yes9.0highsource9
WebView (Android)#Yes67highsource10
  1. Derived by browser-compat-data mirroring from Chrome.
  2. Derived by browser-compat-data mirroring from Chrome.
  3. No Firefox support is recorded in browser-compat-data.
  4. No Firefox for Android support is recorded in browser-compat-data.
  5. Derived by browser-compat-data mirroring from Firefox.
  6. No Safari support is recorded in browser-compat-data.
  7. No Safari on iOS support is recorded in browser-compat-data.
  8. Derived by browser-compat-data mirroring from Safari.
  9. Derived by browser-compat-data mirroring from Chrome Android.
  10. Derived by browser-compat-data mirroring from Chrome Android.

Source data: /compatibility/sensors.json · Global usage: 75 % (StatCounter 2026-09, CC BY-SA 4.0)

Source: spec · MDN · Last verified 2026-10-03 · Confidence: high (computed from sources)

Cite this table

Generic Sensor API compatibility data — OpenPWA · Verified 2026-10-03 · CC BY 4.0 · JSON

When reusing compatibility data, keep the attribution, identify your changes and check each row’s original source. This citation excludes market-share and reach figures, which use CC BY-SA 4.0.

The Accelerometer() constructor throws a SecurityError when a Permissions Policy blocks the feature. Once a sensor fires its error event it becomes idle and stops reading values until it is started again (MDN).