Skip to Content
Platform.Ontology

HTML <geolocation> element

A browser-drawn button that asks for location; the click itself is the request.

Asks you firstLocation and motionPositionWeb browsersWhile you use it

In one line

Can show a browser made button that asks for your location when you tap it

A browser-drawn button that asks for location; the click itself is the request.

Same data as Geolocation, but the request starts from a trusted button the site cannot disguise, so prompts only appear when the person asked. Chrome can also re-ask after a block.

What it can and can't do

What the user does: You tap the Use my location button drawn by the browser

It can

  • Ask for your location when you tap the button
  • Share your position again quietly if you already allowed it
  • Offer a way to turn location back on if you blocked it

It cannot

  • Ask in the background or without your tap
  • Change the button's text or icon to trick you
  • Work in Firefox or Safari

How it differs between platforms: Only Chrome and Edge have it so far. Firefox and Safari use the normal location prompt.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported1442026-01-13Developer blog 2026-01-13, generic <permission> element was an origin trial in Chrome 126 to 143
EdgeSupported1442026-01-21None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported1442026-01-13None
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

API<geolocation autolocate accuracymode="precise|approximate" watch onlocation=...>; element.position, element.error
Permission namegeolocation
Permissions policygeolocation
Browser compat keysapi.HTMLGeolocationElement
How access is grantedprompt
What the user seesBrowser-drawn button with fixed text and icon; a click opens the normal location prompt, re-reads silently if already granted, and offers a recovery path if blocked.
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsSame stored geolocation permission as the script API
How to take it backSame as Geolocation; element matches :granted
Inside an iframeNeeds allow="geolocation" in cross-origin iframes

Typical flow

  1. Add <geolocation> to the page
  2. Person clicks the browser-drawn button
  3. Browser runs the permission flow
  4. location event fires; read element.position or element.error

Data you get

What comes back: GeolocationPosition delivered through an element
Shape: object
How often: one-shot, or continuous with the watch attribute

FieldTypeUnitRangePrecision
autolocateboolean attributenonepresent or absentonly reuses an existing grant, never prompts on load
accuracymodeenum attributenoneprecise or approximatemaps to enableHighAccuracy
positionobjectGeolocationPositionsame as navigator.geolocationsame
style contrastruleratioabout 3:1 minimumbrowser refuses low-contrast or disguised styling

Technical limits

  • Cannot be restyled to hide or disguise it (contrast, opacity, size, transform checks)
  • autolocate cannot trigger a prompt
  • Not in Firefox or Safari: feature detect with 'HTMLGeolocationElement' in window

The story

What it is

A button the browser draws that asks for location, so your click is the request.

For you

You see a button such as 'Use my location' that looks like part of your browser. You press it and the browser asks once. Because you clicked it yourself, there is less chance of a pop up scam.

For makers

Makers get more yes answers because people trust a clear browser button. It avoids ugly pop ups that people block by reflex, which helps maps, delivery and booking funnels.

Where you see it

TypeExampleApps
mapsA store locator shows a 'Use my location' button that finds the nearest shop.Starbucks, Walmart
deliveryA food order page uses the button so an address is filled in with one click.DoorDash, Domino's
travelA hotel search page uses it to show stays nearby.Booking.com
gamesA location based web game shows a 'Start playing here' button that unlocks nearby quests.None named
rideshareA ride web page sets pickup using the button.Uber
securityThe trusted button makes it harder for a fake page to trick people into a hidden location request.None named

Risks

  • Still shares real location
  • New feature, not everywhere

What the platform says

Good uses and abuse

Legitimate uses

  • Higher grant rates from clear intent (Immobiliare.it reported +20% successful flows)
  • Recovery after a block (ZapImoveis reported 54.4%)

Known abuse

  • Pushing the element everywhere to harvest location

Scores

ScoreValueMeaning
Sensitivity5 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2024-06, Chrome 126: Generic <permission> element origin trial begins
  • 2026-01, Chrome 144: <geolocation> available
  • 2026-06, Chrome 151: Sister element <usermedia> for camera and microphone announced as available

Sources

How well checked: Checked against real behavior.

On this page