Hacker News new | ask | show | jobs
by phoenix69 4180 days ago
http://www.w3schools.com/html/html5_geolocation.asp
1 comments

That works great until the user pushes "No, I don't want you go geolocate me".
If the user doesn't want to be geolocated, why are you going to geolocate them?
Basic web stats reports. Checking that you're getting the geotargeting you paid for when you advertise. Preventing credit card fraud (billing address in one country, user located in another, detecting open proxies, etc). Lots of reasons geolocation has been used since long before browsers had a mobile-style API for it on the client side.
And if the user withdraws their consent (clicking "No", DNT headers, etc.) that should be the end of it. Don't locate, don't track, don't subvert user's consent.

Just flag it as "no location information available" if you need to use it for an access control/fraud prevention mechanism and be aware that determined bad guys can spoof almost every signal you receive from them.