why the html5 geolocation fails to get results?

久未见 提交于 2019-12-24 05:26:08

问题


On what basis does HTML 5 geolocation work ? Does it guess the location on the basis of IP address ? I guess it doesn't need a GPS enabled device ? I do not have GPS on my laptop.

I have been trying to test my location using HTML5 geolocation on w3schools geolocation tester/demo and html5demos but I either get location information unavailable or failed. What could be the reason for this ?

Note : I am connected to internet via USB Tethering.


回答1:


How exactly the browser does geolocation is up to it. If it has access to a GPS device, it may use that. Otherwise it may do GSM triangulation, reverse IP geolocation, WiFi network database lookups or anything else it can or can't do.

It depends on your browser/OS and is not guaranteed to work.




回答2:


It will works in most circumstances on a direct connection. However, if it connected via Proxy/VPN, sometimes it will fail to geolocate the position. Just some sharing of my last encounters found.



来源:https://stackoverflow.com/questions/13109696/why-the-html5-geolocation-fails-to-get-results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!