Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alvinjiooo
Copy link

@alvinjiooo alvinjiooo commented Sep 5, 2025

This commit introduces the ability for users and developers to request a less precise, privacy-preserving "approximate" location.

Key changes include:

  • A new accuracyMode option in PositionOptions to request either "precise" or "approximate" location.
  • A new geolocation-approximate permission and policy, which is implicitly granted if the "geolocation" permission is given.
  • Separate internal caching for precise and approximate positions.
  • Updated "Request a position" and "Acquire a position" algorithms to handle the new accuracy levels, permission fallback, and caching logic.
  • The GeolocationPosition interface now includes an accuracyMode attribute to reflect the accuracy of the returned position.
  • Expanded the introduction with a non-normative description of what an "approximate location" is.
  • Added a normative privacy requirement for user agents to mitigate precise location reconstruction by caching approximate locations for a period of time.

Closes #182

Approximate Geolocation explainer


Preview | Diff

Alvin Ji added 3 commits September 4, 2025 18:33
This commit introduces the ability for users and developers to request a less precise, privacy-preserving "approximate" location.

Key changes include:
- A new `accuracyMode` option in `PositionOptions` to request either "precise" or "approximate" location.
- A new `geolocation-approximate` permission and policy, which is implicitly granted if the "geolocation" permission is given.
- Separate internal caching for precise and approximate positions.
- Updated "Request a position" and "Acquire a position" algorithms to handle the new accuracy levels, permission fallback, and caching logic.
- The `GeolocationPosition` interface now includes an `accuracyMode` attribute to reflect the accuracy of the returned position.
- Expanded privacy and user consent sections to discuss the benefits and user interface implications of approximate location.
@alvinjiooo alvinjiooo requested a review from nondebug September 5, 2025 18:25
index.html Outdated
</p>
<p>
To better protect user privacy, this specification also provides a way
for users to share an <em>approximate location</em> instead of a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should define all our terms here with <dfn> tags so we can refer back to them elsewhere in the spec.

I think we should define "approximate location" in a way that makes it clear it's an optional thing that some location sources support and some don't. The previous paragraph refers to "sources of location information", I think we should turn it into a proper definition and refer to it here.

Perhaps:

An <dfn>approximate location information source</dfn> is a [=location information source=] that returns positions that have been intentionally obfuscated to make it more difficult to recover the true location.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently I added precise position and approximate position and approximate location information source to the introduction chapter. PTAL

@reillyeon
Copy link
Member

For readability as you iterate on this proposal it's okay for this PR to directly change the specification text however to land this change the changes need to be enclosed in the correct candidate additions/corrections/deletions syntax.

@marcoscaceres
Copy link
Member

@reillyeon if it's ok, let's move this to CR first (i.e., let's not waste time with the ins/dels). We are close to publishing as CR again.

index.html Outdated
<aside class="example" title="Permissions Policy over HTTP">
<pre class="http">
Permissions-Policy: geolocation=()
Permissions-Policy: geolocation=(), geolocation-approximate=()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just writing

Permissions-Policy: geolocation-approximate=()

here and explaining in words that by disabling geolocation-approximate, geolocation will automatically be disabled too?

index.html Outdated
permission|checks permission=] for the level of accuracy specified by
the {{PositionOptions/accuracyMode}} option. A grant for the
"geolocation" permission implies a grant for the
"geolocation-approximate" permission.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add

"while if the "geolocation-approximate" is denied, then so is "geolocation""

"geolocation-approximate" permission.
</p>
<p>
When <dfn data-local-lt="check permission">checking permission</dfn>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to expand this and clarify that when requesting permission to use geolocation, the user will also be prompted for geolocation-approximate. This will probably require some changes to https://www.w3.org/TR/permissions/#dfn-request-permission-to-use so that that algorithm can be overridden, and we'll need to override it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we should add the case when website request position using accuracy_mode='approximate', the prompt should show approximate option and denial only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Approximate geolocation
5 participants