Example 3 - Geolocation

This page will try and detect which country you are browsing from and change the selected country in the drop down box to this country (the default selected country is Afghanistan).

The geolocation is done through javascript and a call to the Wipmania API

The API could take longer to process and the user could have already selected a country, if a user sets a different country to where they are located, their selected country will be changed without them knowing causing much confusion. This example modifies the javascript so if a country is selected before the API call is finished the selected country is not overridden.

Article

This example is from an article on Increasing conversion rates through geolocation.

Other examples