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?
Share
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.