Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the most accurate way to determine user geolocation in the browser?

I found a few examples suggesting Google AJAX APIs.

This link typifies the advice I have found so far: http://briancray.com/2009/05/29/find-web-visitors-location-javascript-google-api/

However, the location is often wrong with the Google APIs.

Other sites seem to know exactly which city I'm in, though, without me entering any information.

Suggestions? Is there something cross-browser (ignoring IE6) and reliable?

like image 847
Crashalot Avatar asked Mar 12 '10 23:03

Crashalot


People also ask

How do browsers determine location?

Your browser uses different types and sources of information to identify your location. These include your IP address, geolocation via HTML5 in your browser, and your PC's language and time settings.

How accurate is location from browser?

Accuracy varies but is typically within 5-15 metres. Vendors such as Combain (https://combain.com/about/about-positioning/wi-fi-positioning/) are also proposing making floor level WiFi positioning accuracy within a building, something that GPS cannot deliver.

What is geolocation accuracy?

IP-based geolocation services provide 55 percent to 80 percent accuracy for a user's region or state. And they provide 50 percent to 75 percent accuracy for a user's city. In practice, the actual accuracy may vary from provider to provider and depending on the location of the device.

How is geolocation calculated?

The GPS receiver in your mobile device compares the time signals it receives from the satellites with its internal clock. Knowing the speed of light and when the signals were sent and received, your device can calculate your distance from each satellite, and thereby home in on your longitude, latitude and altitude.


1 Answers

I was going to answer with a few points but sometimes referencing a decent article is the way to go. I recently came across this Smashing Magazine article by Christian Heilmann which explains the issues, solutions and further info on all things GeoLocational.

Entering the wonderful world of Geolocation

like image 192
Brian Scott Avatar answered Sep 26 '22 16:09

Brian Scott