W3C Geolocation API

The W3C Geolocation API is an effort by the World Wide Web Consortium (W3C) to standardize an interface to retrieve the geographical location information for a client-side device.

Historically, some browsers could gain support via the Google Gears plugin, but this was discontinued in 2010 and the server-side API it depended on stopped responding in 2012.

On desktop computers, the W3C Geolocation API works in Firefox since version 3.5, Google Chrome,[6] Opera 10.6,[7] Internet Explorer 9.0,[8] and Safari 5.

These parameters are encapsulated into a JavaScript Object Notation (JSON) message and sent to the network location provider via HTTP POST.

Common uses for this location information include enforcing access controls, localizing and customizing content, analyzing traffic, contextual advertising and preventing identity theft.