One of the cool new features in HTML5 is Geolocation or the capability to determine where someone is. It turns out most modern browsers support the Geolocation API as you can see on CanIUse.com. Unfortunately Internet Explorer 8, the most popular version of IE at this moment, is the big exception. The Geolocation API is very easy to use. The basic function to use is the getCurrentPosition() which is located on the geolocation object which in turn is located on the navigator object. It takes a callback for success that give you the location and a failure callback with a reason the location request failed.   1: $(function () { 2:if (Modernizr.geolocation) { 3: navigator.geolocation.getCurrentPosition(function (e) { 4:var coord = e.coords; 5: alert(coord); 6: }, function(e) { 7: alert(e.message); 8: }); 9: } 10:else { 11: $('<h1>').text('GeoLocation not supported').appendTo('#location'); 12: } 13: });   I am using jQuery hear to execute the code when the page is loaded. I am also using Modernizr...