6

There has been an error, in the console, since I made my website using navigator.geolocation.getCurrentPosition (below). I realised this was going to cause a problem at some point in the future, and as I'm only playing with web development it didn't concern me that much, but it has now completely screwed up my little weather app (http://conn3cted.uk.tn/weather.html) as it seems that I can't use this function in chrome (it works in firefox) anymore. The error I'm getting additionally now is Only secure origins are allowed. Is there anything I can do to get around this? I don't really want to pay to get a HTTPS certificate for no reason.

getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS.

grpcMe
  • 1,367
  • 5
  • 15
  • 28
  • I think this is a duplicate of http://stackoverflow.com/questions/32106849/getcurrentposition-and-watchposition-are-deprecated-on-insecure-origins – rick Apr 26 '16 at 08:00
  • chrome recently made the change, firefox is probably going to do the same soon. – dandavis Apr 26 '16 at 08:11
  • I don't think it's a duplicate - it's related, but now they have actually stopped this working for HTTP completely so my website has stopped working. I'm just looking for alternatives so I can keep my HTTP site up and working. – grpcMe Apr 26 '16 at 09:07
  • 1
    For more information about this, see https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only – Raul Pinto May 10 '16 at 08:24

1 Answers1

-3

Only https is recommanded for this kind of stuff. I encourage you to to migrate your website to HTTPS, maybe using let's encrypt (free certificate)

alexnode
  • 91
  • 9