Details on how the feature works and is implemented in the upcoming version

Jun 10, 2009 08:40 GMT  ·  By

Geolocation is a much touted feature of the upcoming Firefox 3.5. But it isn't talked about for no reason, since geolocation is becoming more and more important today as mobile Internet connections are getting faster and there are a multitude of devices to take advantage of those speeds. As part of the ‘Firefox 3.5 in 35 days’ feature, Mozilla engineers have explained the importance of Geolocation and how they implemented it in Firefox 3.5.

“If I type google into the url bar, it takes me to www.google.ca, the Canadian version of Google, based on my IP address. And when I want to find the closest movie theater to where I am located, I typically just type in my postal code,” wrote Doug Turner, one of the engineers working on the Geolocation support in Firefox 3.5. “In these two situations, having the web application automatically figure out where I am is much more convenient. In fact, I have no idea what the postal code is for Toronto. I know how to find it, but that is a lot of work to simply tell a web application where I am.”

Geolocation is implemented in Firefox 3.5 using a simple JavaScript API. The functionality allows users to easily share their location with a site that requires it. Websites using this feature make a simple JavaScript call to getCurrentPosition, which gets the user’s current location and then notifies him with an alert dialog as the process isn't automated for obvious privacy issues. Further technical details can be found on the hacks.mozilla.org blog.

Firefox uses a number of ways of getting your location depending on the situation. The best option would be through an attached GPS device that would give accurate coordinates. But that may not always be possible so Firefox can also use local WiFi networks or, in the worst case, the IP address information. Getting the location from WiFi networks works because many are mapped and their location is stored in online databases. One main concern with Geolocation is privacy and Firefox has taken steps to make sure that location information is shared only after the approval of the user and also has options to easily “forget” the sites that the user has shared his location with.