Locate the User's Position

The HTML Geolocation API is used to get the geographical position of a user.

Since this can compromise privacy, the position is not available unless the user approves it.


Support for the Geolocation API is really good. This is true for desktop and mobile browsers. Take a look at this summary to get an idea of which desktop browsers support the Geolocation API:

  • Firefox 3.5+
  • Chrome 5.0+
  • Safari 5.0+
  • Opera 10.60+
  • Internet Explorer 9.0+

Support in mobile browsers is even better as you can see in this summary:

  • Android 2.0+
  • iPhone 3.0+
  • Opera Mobile 10.1+
  • Symbian (S60 third and fifth generation)
  • Blackberry OS 6


When web page requests user's current position using HTML5 Geolocation API, the user is warned with a message similar as shown (this message is from Chrome web browser)






When the user select Deny/Block on the location request, the following alert will show






To re-enable the GeoLocation request on major browser on mobile device:


1) Click on the "View Site Information"



2) Choose on "Site Settings".



3) Select "Location access".



4) Choose "Allow".





To re-enable the GeoLocation request on major browser on desktop device:

1) Click on the "View Site Information"



2) Under Location, choose the option for "Allow/Block".



3) Select "Allow" to enable the browser GeoLocation request.




IOS / Safari

1) Nagivate to "Setting".


2) Select "Privacy".



3) Select on "Safari Websites".



4) Choose "While Using the App".