HTML5 Geolocation API
HTML5 geolocation API relies on several ways to make your browser location aware.
First of all it relies on web user IP address. IP address provides wealth of information about user such as country, region within country, internet service provider information and other useful information that can be used by HTML5 geolocation API to determine locale of the browser and ultimately user.
Second, HTML5 geolocation API uses Wi-Fi signals around user who access HTML5 geolocation API aware application. Wi-Fi signals usually provided by organizations and can be free as well as paid for service. These Wi-Fi signals are documented by companies and tagged with geolocations. However, Wi-Fi is spotty and does not work everywhere. Big cities like New York City or Los Angeles usually have better Wi-Fi coverage. In places where Wi-Fi is not present HTML5 geolocation API relies on user IP address.
Finally, HTML5 geolocation API provides better service if both IP and Wi-Fi methods are used.