13 ms·
Your best bet is html5 geolocation + modernizr.js + a shim. Browsers that support html5 geolocation will return highly accurate results while those that don't s
by ryanmahoski 15y ago
Your best bet is html5 geolocation + modernizr.js + a shim. Browsers that support html5 geolocation will return highly accurate results while those that don't support it will fall back to calling the google maps api (ip to geo).
https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Brow...
- nl 15y agoHTML5 Geolocation requires people to opt-in, which is pretty messy. Better off getting the free version of the MaxMind city database[1] and running it on a server somewhere. [1] http://www.maxmind.com/app/geolitecity http://www.maxmind.com/app/geolitecity
- deleted 15y ago[deleted]
- ryanmahoski 15y agoThe opt-in button is messy but results are very precise and reliable. Some use cases warrant it, some do not. Maxmind claims 79% accuracy on a city level: is the google api worse? All other things being equal I would be inclined to pick the one that didn't require me to frequently install binary patches or update a database.
- ryanmahoski 15y agoBut I agree with you, it's a ux dealbreaker for most situations. Solution: control the hardware. :)