W3C Geolocation API not working in Chrome W3C Geolocation API not working in Chrome google-chrome google-chrome

W3C Geolocation API not working in Chrome


Works perfectly for me - with both Chrome 11 and Firefox 4.0.1 on Win 7

  • Make sure you've not disabled location tracking in Chrome: Options > Under the Hood > Content Settings > Location
  • Because of security restrictions, resources loaded with the file:/// scheme are not allowed access to location. See HTML 5 Geo Location Prompt in Chrome.


If your domain is insecure (e.g. HTTP rather than HTTPS) then you are not allowed access to location in Chrome. This is since Chrome version 50 (12PM PST April 20 2016).

See https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only for details.


in 2017 :

Note: As of Chrome 50, the Geolocation API will only work on secure contexts such as HTTPS. If your site is hosted on an non-secure origin (such as HTTP) the requests to get the users location will no longer function.

Geolocation API Removed from Unsecured Origins in Chrome 50