Processing
 

Chrome geolocation not working on any site

07/11/2013 15:01#1

aberonni

Member

Joined at: 8 months ago

Post: 1

Thank: 0

Thanked: 0

I'm trying to build a site based on geolocation, and I'm thinking of using html5 geolocation.

I built the w3c code and it wouldn't work for me on google chrome, then I noticed that none of the online examples work for me on google chrome:

http://www.w3schools.com/html/html5_geolocation.asp

http://html5demos.com/geo

The strange thing is that I do see the prompt that asks me whether I want to grant permission to access location info, but after that it doesn't work. I checked my chrome settings and it is on "ask whether to grant permission to website".

Instead, on safari on the same machine it is working fine.

I'm on an iMac (end of 2012) with mavericks if this can help somehow.

Thanks!

EDIT:

I've already tried this solution: W3C Geolocation API not working in Chrome

23/07/2016 09:31Top#2

Joined at: 12 months ago

Post: 134

Thank: 0

Thanked: 0

Geolocation over HTTP will no longer work, since non-secure geolocation is deprecated:

We want to start applying the concepts in https://w3c.github.io/webappsec-secure-contexts/ to features that have already shipped and which do not meet the (new, not present at the time) requirements. In particular, this approximately requires that powerful features only be accessible on "secure origins" (such as HTTPS) where the full ancestor chain is also secure.

We want to start by requiring secure origins for these existing features:

Geolocation — requires secure origins as of M50 Device motion / orientation EME getUserMedia AppCache 

As with gradually marking HTTP as non-secure, we expect to gradually migrate these features to secure-only, based on thresholds of usage, starting with lowest usage and moving towards higher. We also expect to gradually indicate in the UX that the features are deprecated for non-secure origins.

The deprecation strategy for each of these features is not decided on and may very well differ from feature to feature. We don’t currently know what the thresholds will be, or how heavily used the features are on what kinds of origins. We are in the process of gathering data, and will report back when we have it. There are no firm plans at all at this time, other than eventual deprecation. We intend for this to stimulate a public discussion of the best way to approach this deprecation. So, to that point, we'd love to hear what the community thinks.

Testing a Deprecated Powerful Feature After a feature has been deprecated, if you are a developer that needs to keep testing a feature on a server that does not have a valid certificate, you have two options:

localhost is treated as a secure origin over HTTP, so if you're able to run your server from localhost, you should be able to test the feature on that server.

You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http://example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that you also need to include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.

References

Similar articles

Chrome, THREE.js: Cross-origin image load denied

5 years ago - Reply: 5 - Views: 271

Prevent Google Chrome Log XMLHttpRequest

3 years ago - Reply: 5 - Views: 277

How can I include ChromeDriver in a JAR?

3 years ago - Reply: 3 - Views: 83

Chrome geolocation not working on any site

3 years ago - Reply: 1 - Views: 49

wrong borders' width in android browser

3 years ago - Reply: 4 - Views: 207

Uncaught SyntaxError: Unexpected token < On Chrome

3 years ago - Reply: 10 - Views: 472

Flashdata not getting cleared in Codeigniter

4 years ago - Reply: 5 - Views: 58

Illegal access Javascript error in Chrome

3 years ago - Reply: 1 - Views: 53

ng-repeat not updating in Chrome

3 years ago - Reply: 1 - Views: 82

Applying border to a checkbox in Chrome

4 years ago - Reply: 2 - Views: 119

open browser plugin using access vba

3 years ago - Reply: 1 - Views: 26

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re