Geolocation - Implementation Report

More details about this document
Latest published version:
none
Editor:
Marcos Cáceres

Abstract

This is an implementation report for the 29 October 2025 W3C Recommendation of [Geolocation].

1. Test results

The following tests verify conformance to [Geolocation].

Note

For the latest and updated test results, visit wpt.fyi/results/geolocation.

1.1 Status legend

PASS
The test ran successfully and the implementation conforms to the specification.
FAIL
The test ran and the implementation does not conform to the specification.
MANUAL
The test could not be run via automated test infrastructure due to platform limitations (e.g., missing [webdriver-bidi] support). Conformance was verified through manual testing. This does not indicate an implementation failure. See the Candidate corrections and additions section for implementation evidence, including links to bug reports, pull requests, and browser release notes that demonstrate implementation.

1.2 WebKit testing limitations

Some tests cannot be run in WebKit's automated test infrastructure due to platform limitations. These do not indicate missing implementation support in WebKit/Safari, but rather gaps in test automation infrastructure:

WebDriver BiDi support
WebKit has not yet implemented the WebDriver BiDi support. This is required to set permissions and mock geolocation data using [webdriver-bidi] commands such as emulation.setGeolocationOverride.
Permissions-Policy HTTP header
WebKit has not yet implemented Permissions-Policy HTTP header support.
Note

Support for the Permissions-Policy HTTP header is not a conformance requirement for [Geolocation]; it simply declares geolocation as a policy-controlled feature with a default allowlist of 'self'. HTTP header support is defined by [permissions-policy]. The iframe allow attribute (e.g., <iframe allow="geolocation">) is supported and works correctly in WebKit.

1.3 Gecko testing limitations

Some tests cannot be run in Gecko's (Firefox) wptrunner infrastructure due to missing [webdriver-bidi] integration in wptrunner:

wptrunner BiDi integration

Firefox 139+ has implemented [webdriver-bidi] commands at the browser level, including emulation.setGeolocationOverride (Bug 1954992) and BrowsingContext geolocation override (Bug 1951962). However, wptrunner's Marionette executor does not yet wire up the BiDi protocol for Firefox.

Bug 1984611 tracks adding WebDriver BiDi implementation for Firefox in wptrunner. Until this is resolved, tests requiring the following testdriver.bidi actions cannot run:

  • test_driver.bidi.permissions.set_permission - required for tests that need to grant geolocation permissions programmatically.
  • test_driver.bidi.emulation.set_geolocation_override - required for tests that need to mock geolocation data.

1.4 Results table

Web Platform Tests results for Geolocation API
Test Chromium Gecko WebKit
clearWatch_TypeError.https.html PASS PASS PASS
disabled-by-permissions-policy.https.sub.html PASS FAIL MANUAL
enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html PASS MANUAL MANUAL
enabled-by-permission-policy-attribute.https.sub.html PASS PASS PASS
enabled-by-permissions-policy.https.sub.html PASS MANUAL MANUAL
enabled-on-self-origin-by-permissions-policy.https.sub.html PASS MANUAL MANUAL
getCurrentPosition_permission_deny.https.html PASS PASS PASS
getCurrentPosition_TypeError.https.html PASS PASS PASS
getCurrentPosition-error.https.html PASS MANUAL MANUAL
getCurrentPosition-success.https.html PASS MANUAL MANUAL
heading-stationary.https.html PASS MANUAL MANUAL
idlharness.https.window.html PASS PASS PASS
non-fully-active.https.html FAIL MANUAL MANUAL
non-secure-contexts.http.html PASS PASS PASS
permission.https.html PASS PASS PASS
PositionOptions.https.html PASS MANUAL PASS
tojson.https.window.html PASS MANUAL MANUAL
watchPosition_permission_deny.https.html PASS PASS PASS
watchPosition_TypeError.https.html PASS PASS PASS
watchposition-timeout.https.window.html PASS PASS PASS

2. Candidate corrections and additions

Since [Geolocation] became a W3C Recommendation on 01 September 2022, the specification received candidate corrections and additions. This section documents the substantive changes that resulted in implementation updates. Where automated tests could not be run due to test infrastructure limitations, conformance was verified manually.

Implementation status of candidate corrections and additions
Change Description Chromium Gecko WebKit Test
a1, a2 GeolocationPosition's toJSON() and GeolocationCoordinates's toJSON() methods Chrome 126+ Firefox 129+ Safari 18+ tojson.https.window.html
a4 Emulated position data for automation ([webdriver-bidi] emulation.setGeolocationOverride command) Chromium Gecko Not implemented getCurrentPosition-success.https.html
c7 Added missing step to check for non-secure contexts and return PERMISSION_DENIED Already conforming Already conforming Already conforming non-secure-contexts.http.html
c9 heading is null when stationary (previously NaN) Already conforming Already conforming Already conforming heading-stationary.https.html

3. Is each feature of the current specification implemented, and how is this demonstrated?

The current specification features are implemented across major browsers including Chrome, Firefox, and Safari. This is demonstrated through the aforementioned WPT, which verify the implementation of the specification's features, such as obtaining the location, handling permissions, and responding to errors.

4. Are there independent interoperable implementations of the current specification?

Yes, there are independent interoperable implementations in the major web browsers. Chrome, Firefox, and Safari provide their own implementations, which have been tested to ensure they conform to the [Geolocation] specification and are interoperable across different platforms and operating systems.

5. Are there implementations created by people other than the authors of the specification?

Yes, implementations of Geolocation have been created by various browser vendors who are not necessarily the authors of the specification. This includes engineers from Google, Mozilla, Microsoft, and Apple, among others, ensuring a broad base of experience and design input is reflected in the API.

6. Are implementations publicly deployed?

Yes, the implementations of Geolocation are publicly deployed and widely used in web applications. These are accessible in consumer-level browsers, allowing developers to incorporate geolocation features into their websites and applications, enhancing user experience with location-based services.

7. Is there implementation experience at all levels of the specification's ecosystem (authoring, consuming, publishing…)?

There is substantial implementation experience at all levels of the specification's ecosystem. Developers use the API to author location-based services, consumers use these features in daily web interactions, and publishers integrate these capabilities into various applications for enhanced location-dependent experiences.

8. Are there reports of difficulties or problems with implementation?

While the core functionality of Geolocation is well-supported, developers occasionally report difficulties related to privacy concerns, varying accuracy levels, and handling user permissions across different browsers and devices. These issues are typically addressed through updates to the specification (see open issues) and improvements in browser implementations.

A. References

A.1 Informative references

[Geolocation]
Geolocation. Marcos Caceres; Reilly Grant. W3C. 29 October 2025. W3C Recommendation. URL: https://www.w3.org/TR/geolocation/
[html]
HTML Standard. Anne van Kesteren; Domenic Denicola; Dominic Farolino; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL: https://html.spec.whatwg.org/multipage/
[permissions-policy]
Permissions Policy. Ian Clelland. W3C. 6 October 2025. W3C Working Draft. URL: https://www.w3.org/TR/permissions-policy-1/
[webdriver-bidi]
WebDriver BiDi. James Graham; Alex Rudenko; Maksim Sadym. W3C. 26 February 2026. W3C Working Draft. URL: https://www.w3.org/TR/webdriver-bidi/