How HTML5 Geolocation Feature Works?(HTML5 地理位置功能如何工作?)
问题描述
浏览器如何知道我在哪里?
How can the browser tell where I am?
完全基于注册的IP地址?如果我在代理后面怎么办?
Totally based on registered IP address? What if I'm behind a proxy?
推荐答案
这取决于浏览器及其设置.它可能使用 GPS、基于 WLAN AP 的位置、IP 位置或任何其他可以想到的定位方法.
That would depend on the browser and its settings. It might use GPS, WLAN AP-based location, IP location, or any other conceivable method of locating itself.
浏览器在您的本地计算机上运行,因此即使您使用代理,它也应该能够找到您的实际 IP 地址(除非安全功能阻止将其发送到地理定位服务器以进行查找).是否有任何浏览器足够聪明,可以处理在 NAT 后面(本地机器具有私有 IP)并查找网关的 IP 地址,我不知道.
The browser runs on your local machine, so even if you're behind a proxy, it should be able to find your actual IP address (unless security features prevent it from being sent for lookup to a geolocation server). Whether any browser is smart enough to handle being behind a NAT (with the local machine having a private IP) and looking up the gateway's IP address, that I don't know.
这篇关于HTML5 地理位置功能如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:HTML5 地理位置功能如何工作?


- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 400或500级别的HTTP响应 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01