Blog

Which sensors can a web page access?

Learn which device sensors a browser can expose, why access varies by device and browser, and how to check motion, compass, location, light, and vibration.

Daniel HayesHardware tests 5 min read

You may see a browser ask for your location, or a page may react when you tilt your phone. That does not mean websites can freely inspect every sensor in your device. The browser only exposes certain readings, and the available features depend on the device, browser, settings, and your permission.

Use the Sensors Test to check motion, gyroscope, compass, light, location, and vibration on the device you are using. The results show what this browser can access now, not a complete inventory of every sensor inside the device.

Check which sensors your browser exposes

  1. Open the Sensors Test on the device you want to check. Sensor access depends on the device, so testing on a laptop does not tell you what a phone can expose.
  2. Try the available sensor checks one at a time. If the browser asks for permission, read the prompt and allow access only if you want that feature to work.
  3. For motion and gyroscope readings, slowly tilt or rotate the device. For the compass, turn the device and see whether its direction changes. Keep it away from magnets and other strong sources of interference.
  4. For location, allow the browser prompt if you are comfortable sharing your location for the test. For light, compare readings in a dim and a brighter place. Vibration can only be checked on a device and browser that support it.
  5. If a check is missing or reports no data, try the same page in another current browser on the same device. A missing option can mean the device or browser does not expose that feature.

Use a secure webpage connection for sensor checks. Browsers restrict many device features on ordinary, unencrypted pages. The exact behavior also differs between browsers and operating systems. For more about phone limitations, see why a mobile browser cannot access every sensor.

What the result means

Motion or gyroscope readings change when you move the device

The browser can receive movement data from the device. Motion readings describe changes in movement or orientation, while a gyroscope measures rotation. A page usually receives browser-provided values, not unrestricted access to the physical sensor or its raw internal data.

The compass changes direction, or the reading is unavailable

A changing direction suggests the browser can expose orientation information, but compass support varies widely. Some devices do not have a compass sensor, and some browsers do not provide a usable heading. Nearby metal or magnets can also make a reading inaccurate.

Location works after you allow it

The page can request your position through the browser's location feature. The result is an estimated location, which may use GPS, nearby Wi-Fi networks, cell data, or a combination. It does not give the page access to raw GPS signals or a list of nearby networks.

Light readings appear, or the light check is absent

A reading means this device and browser expose an ambient light value. Many devices or browsers do not offer that feature to web pages, even if the hardware has a light sensor used for automatic screen brightness.

Vibration works, but there is no sensor reading

Vibration is different from the other checks. A website may be able to ask a supported device to vibrate, but the browser does not provide a reading from a vibration sensor. Support and restrictions vary, especially on phones.

A page cannot check a sensor you do not see here

Web pages generally cannot request a universal list of every sensor in a device. They also cannot normally read fingerprint or face-recognition data, a camera's private depth sensor, or internal sensor diagnostics through a standard web page. Camera and microphone access are separate browser permissions, and do not mean a page can inspect other sensors.

How to fix an unavailable sensor check

  1. Check for a browser permission prompt. If you dismissed or blocked a prompt, use the site controls beside the address bar to review permissions and reload the page. Location is commonly controlled this way. Motion and orientation prompts vary by browser and may require you to start the check after tapping the page.
  2. Allow location at the device level. On Windows 11, open Settings › Privacy & security › Location and allow location access. On macOS, open System Settings › Privacy & Security › Location Services and allow the browser. On iPhone, check Settings › Privacy & Security › Location Services, then review the browser's access. Android menu names vary, but check Settings › Location and the browser's app permissions.
  3. Try a supported, up-to-date browser. Some sensor interfaces are missing or limited in particular browsers. Update the browser, then test again. The guide to missing browser security features explains another reason a feature may not appear.
  4. Start the test after a tap. Some mobile browsers only allow motion or orientation access after a direct user action, such as tapping a button or starting a check. Reload the page and begin the test yourself rather than leaving it open in the background.
  5. Check the device and its position. A desktop computer may not have motion or compass sensors. A phone case, magnetic mount, or nearby metal can affect compass readings. Move the device away from those objects and repeat the check.
  6. Restart the browser and device. Close other pages or apps that may be using device features, restart the browser, and test again. If the sensor remains unavailable in several browsers, check the device maker's documentation or support options.

Why a web page cannot see every sensor

The browser acts as a gatekeeper between a website and your device. It exposes a limited set of features through web APIs, which are standardized ways for pages to ask the browser to do something. The browser can require permission, restrict access to secure pages, or leave a feature unsupported altogether.

Also, an operating system may use a sensor without making it available to websites. For example, automatic screen brightness can work even when a web page cannot read ambient light. A sensor test can tell you whether a particular browser feature works, but it cannot diagnose every hardware fault or prove that a device contains no sensor.

The Sensors Test runs in your browser, and location access is only requested when needed for that check.