2

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.

3
  • Youv'e probably disabled the "Get physical location" (or something like that) setting in your browser. Usually, you should get a prompt which requests permission to get this geo data. Commented Oct 28, 2012 at 14:36
  • @RobW when it asks for permission,I always grant it Commented Oct 28, 2012 at 14:37
  • @RobW I grant the permission when it asks but still , is there any troubleshooting mechanism that I can follow to detect the actual problem ? Commented Oct 28, 2012 at 14:41

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

"not guaranteed to work". Heard this for the first time ! I am using firefox 15 on linux (fedora). If there is a feature introduced geolocation in html5 it should work with this combination
If the computer cannot geolocate itself, it simply does not work. It will give you the best value it can, but there's no guarantee it can give you anything useful. The HTML5 geolocation API is just a standardized API, it does not make the location process work automagically under all circumstances.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.