<geolocation>Limited availability
The <geolocation> HTML element represents a button that, upon activation, prompts the user to choose whether to grant the page access to geolocation data.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–143Not supported
144+Supportedsince Jan 13, 2026
Current: 155Edge
12–143Not supported
144+Supportedsince Jan 21, 2026
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
18–143Not supported
144+Supportedsince Jan 13, 2026
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: HTMLGeolocationElement.
Feature detection
JS · check before using
if ("HTMLGeolocationElement" in globalThis) {
// HTMLGeolocationElement is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (15). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLGeolocationElement | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.autolocate | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.error | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.invalidReason | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.isValid | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.location_event | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.permissionStatus | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.position | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.promptaction_event | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.promptdismiss_event | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.validationstatuschange_event | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| HTMLGeolocationElement.watch | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| geolocation | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| geolocation.autolocate | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |
| geolocation.watch | 144 | 144 | ✕ | ✕ | 144 | ✕ | ✕ |