2

Is there a way to find where a client is located physically with Jquery? I have found how to get their IP address, and also how to geocode their location with geoplugin, but I am wondering if there are other ways to do this? I don't need an exact location. Just approximate enough to know what state they are in to estimate a tax rate before they enter their actual state. Is this possible?

Community
  • 1
  • 1
john
  • 3,043
  • 5
  • 27
  • 48

2 Answers2

2

Using IP address for geolocation (as per what you are already doing) is by far the most traditional way of doing it -- there are a new W3C standard -- however it will promp people for permission (see demo here), as well as it for devices without embedded GPS (e.g. iPhone/Android) will have to draw on server side services for wifi and/or ip geolocation -- the fact that it will propt users means that it is probably not suitable for what you want to do.

Bigger website will use a tracking cookie to allow the site to lookup data the user have provided at previous visits -- so if you already have the shipping address from a customer from a previous visit, you can use the zip code which he provided earlier for you sales-tax estimation.

Soren
  • 14,402
  • 4
  • 41
  • 67
0

http://www.maxmind.com/app/javascript_city

Include the JS file http://j.maxmind.com/app/geoip.js & get location based on IP.

(Its not completely free, see website.)

James
  • 3,265
  • 4
  • 22
  • 28