HTML and CSS Reference
In-Depth Information
Summary
If there's any aspect of geolocation in your application, then
you'd be a fool not to include this amazingly simple API. The
work is virtually zero to implement. Really the work would be in
creating the user interface. What's particularly important to me
as a developer is that regardless as to how the browser is deter-
mining my user's location, it will work the same—whether they're
using a desktop machine, laptop, or mobile phone—the code
remains exactly the same, and easy.
Since IE9 and all other browsers come with geolocation, sup-
port is in a good state. What's more is that we can use polyfill
techniques to fall back on to JavaScript-based geolocation using
traditional IP lookup services (which you'll see in the polyfill
chapter towards the end of this topic).
Just remember that geolocation should be used to progressively
enhance the page, rather than forcing your user to rely on the
data that comes back from the geo-lookup—as it may not be
accurate enough for your application.
 
Search WWH ::




Custom Search