Tip 33Finding Yourself: Geolocation

Geolocation is a technique for discovering where people are, based on their computers’ location. Of course, “computer” really can mean smartphone, tablet, or other portable device as well as a desktop or laptop computer. Geolocation determines a person’s whereabouts by looking at her computer’s IP address, MAC address, Wi-Fi hotspot location, or even GPS coordinates if available. Although it’s not strictly part of the HTML5 specification (and never was), Geolocation is often associated with HTML5 because it came on the scene at the same time. Like Web Storage, it’s a very useful technology that is already implemented in Firefox, Safari, and Chrome. Let’s see how we can use it.

Locating Awesomeness

We’ve been ...

Get HTML5 and CSS3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.