geolocation.getCurrentPosition() only works with HTTPS

Just found out that more recent web browsers requires a SSL-secured (HTTPS) site to host the target script before navigator.geolocation.getCurrentPosition() will work. Otherwise, the following error will be emitted:
getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your application to a secure origin, such as HTTPS. See for more details.
This creates a problem for the original ESPCLOCK code. Since WifiManager does not support hosting a HTTPS captive portal, the logic for capturing the user's geolocation (and hence the timezone) no longer works.

Back to the drawing board...


  1. Yeah I just realized this too .. makes it hard for embedded devices now since managing SSL is not going to be easy on embedded devices :(


Post a comment

Popular posts from this blog

Adding "Stereo Mixer" to Windows 7 with Conexant sound card

Hacking a USB-C to slim tip adapter cable to charge the Thinkpad T450s

Attiny85 timer programming using Timer1