Domanda

Does every browser implement geolocation API in it's own way? Or is there some standard way all browsers do it?

And how do they do it?

When can they fail to geolocate?

È stato utile?

Soluzione

An HTML5 specification simply states what a browser needs to implement in order to label itself as HTML5 compliant browser. Geolocation is a part of that very specification.

So yes, every HTML 5 compliant browser implements it in its own way.

The geolocation api needs a provider which resolves the user's location. The Location can be determined by the combined usage of many factors.

There is more than one way to figure out where you are — your IP address, your wireless network connection, which cell tower your phone is talking to, or dedicated GPS hardware that calculates latitude and longitude from information sent by satellites in the sky. (link)

All of this factors however, could still be inefficient in many cases.

For eg: A user rejecting location information

or A regular PC limited to being resolved by the ip address alone. Since many ISP's use a dynamic ip and the ip to location table with the provider might not be updated with this change.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top