自从我使用以下命令创建网站以来,控制台中出现错误navigator.geolocation.getCurrentPosition
(以下)。我意识到这会在未来的某个时候引起问题,而且由于我只玩网络开发,所以我并没有太担心,但它现在已经完全搞砸了我的小天气应用程序(http://conn3cted.uk.tn/weather.html http://conn3cted.uk.tn/weather.html)因为我似乎无法再在 chrome 中使用此功能(它在 firefox 中有效)。我现在另外收到的错误是Only secure origins are allowed.
我能做些什么来解决这个问题吗?我真的不想无缘无故地付费获得 HTTPS 证书。
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.
对于此类内容,仅建议使用 https。
我鼓励您将网站迁移到 HTTPS,也许使用 let's crypt(免费证书)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)