All specs
W3C GeolocationW3CMust KnowProduct

Geolocation API

Device Access & Sensors·World Wide Web Consortium
WHY YOU NEED THIS

Required for maps, location-based search, delivery tracking, geofencing, and any feature that needs the user's physical location. Understanding accuracy levels (GPS vs Wi-Fi vs IP) and the permission flow is essential.

What It Defines

Defines navigator.geolocation for obtaining device position: getCurrentPosition() and watchPosition() return GeolocationPosition with coords (latitude, longitude, altitude, accuracy, speed, heading) and timestamp. Requires secure context (HTTPS) and user permission.

Canonical (Normative)

Convenient (Practical)

geolocationgpslocationmapsdevice-accessbrowser
Standards Body
World Wide Web Consortium

Publishes web platform specs including CSS, accessibility, security policies, Service Workers, Web App Manifest, and many browser APIs. Also maintains some versioned HTML/DOM specs.

Visit

Related Specs

W3C PermissionsW3CMust Know

Permissions

The gating mechanism for every sensitive browser API. Check permission state before requesting access to avoid unexpected prompt dialogs. The change event lets you react when users revoke permissions in browser settings.

ProductDevice Access & Sensors
Details