Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

javascript - 没有SSL证书的位置无法在Chrome中检测到(Without SSL Certificate location is not detecting in Chrome)

We did notice today an issue in automatic detection of zip code based on the user s location.

(今天,我们确实注意到了根据用户所在位置自动检测邮政编码的问题。)

I is not working in Chrome but when i open the url in Chrome it didn't work.

(我无法在Chrome浏览器中工作,但是当我在Chrome浏览器中打开网址时无法正常工作。)

We had to configure the sites to https and then it works ok.

(我们必须将站点配置为https,然后它才能正常运行。)

Example : https://where-am-i.live works well with SSL certificate but without https it is not working in Chrome.

(示例: https : //where-am-i.live使用SSL证书可以很好地工作,但是如果没有https,则不能在Chrome浏览器中工作。)

  ask by Malik Shahid translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API

(https://developer.mozilla.org/zh-CN/docs/Web/API/Geolocation_API)

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

(此功能仅在某些或所有支持的浏览器中的安全上下文(HTTPS)中可用。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...