top | item 40534936

(no title)

wesamco | 1 year ago

How the heck did it automatically pan the map to my current location, my small town, in an Incognito window, on page load?

Is IP geolocation this accurate and accessible to every website nowadays?

If this website can do this I assume every website I visit can do it too?

discuss

order

LeifCarrotson|1 year ago

Geo-IP through Cloudflare:

    <script id="cflocation"> 
        window.CFLocation = {"lat":####,"lng":####};window.CFDsm=null;
    </script>
See https://developers.cloudflare.com/network/ip-geolocation/.

Mine's off by more than 100 miles (Comcast Business fiber), it's not magic.

tills13|1 year ago

It's probably either just the lat long of the PoP or some magic based connection latency?

aeyes|1 year ago

Cloudflare only gives you the country

ale42|1 year ago

You should probably try what one of the few online demos of IP geolocation tell about your IP... (just to cite one among many, quality varies a lot across services and geographic zones: https://www.maxmind.com/en/locate-my-ip-address)

nozzlegear|1 year ago

This makes me glad I have iCloud Private Relay turned on for all of my devices and my wife’s devices. Clicking on this link showed my location as Birmingham, Alabama, more than 1000 miles away from my actual location in northern Iowa. Several of the other IP geolocation sites others have linked in this thread showed places like Chicago (closer), and Dallas (much further).

Retric|1 year ago

That’s narrowing things down to a 200km radius for me and while I am within that circle it’s center is over 100km from me.

pavon|1 year ago

Interesting. I have a static IP, and have kept that same IP through multiple moves around the state, but it knows my current zip code. I wonder if that is because my ISP shares the zip code, or through association with data collected from other sites.

And yet every site that uses IP geolocation for useful purposes thinks I'm in a completely different state that bounces around every few months, if I don't let the browser share my location.

davidmurdoch|1 year ago

I thought the same. It's the first time I've ever seen IP geolocation get my home IP address correct. It usually thinks I'm in North Carolina (I'm in Florida).

hoosieree|1 year ago

Same here. But knowing my ISP, it'll change throughout the day, sometimes by quite a lot.

xp84|1 year ago

It is very cheap and easy. Even the free versions of the database available from maxmind are plenty accurate for town level.

At my last job, I built a little docker image that used the free maxmind DB and kept it up to date, and ran a node server which returned some JSON telling estimated lat/long, city name, country, etc.

regularfry|1 year ago

Cheap, easy, and wrong. It puts me a clear 800km away from where I'm actually sitting, and I'm sitting in a major UK city.

It's put me on the wrong continent before now. That was fun.

antod|1 year ago

Mine started in a different city about 520km away. And I wasn't incognito. Probably a lot more to do with your country, your ISP or coincidence than anything else.

mcslambley|1 year ago

I can't speak for this website specifically but Cloudflare makes it pretty easy to geolocate users based on request headers.

moogleii|1 year ago

A VPN should help with that. E.g. for the Mac folks, Private Relay on vs off was a delta of about 100 city blocks for me.

BurningFrog|1 year ago

FWIW it placed me 10 miles away.

Right city, completely wrong part. Maybe that's where my ISP has their connection?

shepherdjerred|1 year ago

That is crazy. Even Google Maps isn't this accurate for me with location turned off.