Disclosed is a software method for determining a devices location based on the devices W3C Geolocation and the device's IP geolocation. W3C Geolocation is as defined at
http://dev.w3.org/geo/api/spec-source.html. IP geolocation is a pre-existing database that provides an estimated location based on a device's IP address.
The disclosed method uses JavaScript to obtain the latitude, longitude, and estimated accuracy of those coordinates from a web browser visiting a website using a service built with this method. The JavaScript then posts this information back to a host running a computer program providing the said service. This program takes the provided W3C Geolocation coordinates and compares the their accuracy to the accuracy of coordinates provided by the IP geolocation database. If the estimated accuracy of the W3C Geolocation coordinates is greater than the accuracy of the IP geolocation coordinates, then the program sends the W3C Geolocation coordinates, along with other related data such as city name, state, country, and postal code, back to the website and/or the web browser for further processing. If the IP geolocation database is determined to be more accurate, the same information is provided back using the coordinates provided by the IP geolocation database.
In both cases, the W3C Geolocation coordinates and accuracy are recorded by the computer program for further processing by either the same computer program or a separate computer program. This processing may include, but is not limited to, using the W3C Geolocation coordinates to improve the accuracy of the coordinates in an IP geolocation database.