How Does Device Location Work?
Devices determine location using multiple methods: GPS (Global Positioning System) uses signals from 24+ satellites to calculate position with 3-5 meter accuracy. Wi-Fi positioning compares nearby access points against a database — accuracy of 15-40 meters. Cell tower triangulation uses mobile network signals — accuracy of 100-300 meters. Devices typically combine all available methods for the best result.
Accuracy & Altitude
Location accuracy varies significantly. Outdoors with clear sky provides the best GPS accuracy (3-5m). Urban areas may experience multipath errors from signal reflections off buildings. Indoors, GPS may be unavailable, falling back to Wi-Fi positioning (15-40m). Altitude readings from GPS are typically less accurate than horizontal position — expect ±10-30 meters.
Privacy & Geolocation API
The Geolocation API always requires explicit user permission — browsers show a prominent permission dialog. Location data is never automatically shared. The API supports two modes: getCurrentPosition for one-time readings and watchPosition for continuous tracking. The enableHighAccuracy option requests GPS when available (uses more battery) vs. Wi-Fi/cell positioning.