問題描述
瀏覽器如何知道我在哪里?
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模板網!