How HTML5 Geolocation Feature Works?
Asked Answered
L

4

20

How can the browser tell where I am?

Totally based on registered IP address? What if I'm behind a proxy?

Largely answered 15/4, 2010 at 0:24 Comment(2)
possible duplicate of https://mcmap.net/q/260616/-about-geolocation-in-html-5Cissiee
FWIW, the W3C Geolocation API isn't technically part of HTML5.Bibelot
S
15

That would depend on the browser and its settings. It might use GPS, WLAN AP-based location, IP location, or any other conceivable method of locating itself.

The browser runs on your local machine, so even if you're behind a proxy, it should be able to find your actual IP address (unless security features prevent it from being sent for lookup to a geolocation server). Whether any browser is smart enough to handle being behind a NAT (with the local machine having a private IP) and looking up the gateway's IP address, that I don't know.

Seto answered 15/4, 2010 at 0:29 Comment(0)
V
12

As Matti said, it is browser-specific. Here's information on how Firefox does it: http://www.mozilla.com/en-US/firefox/geolocation/

Virginia answered 15/4, 2010 at 0:34 Comment(0)
D
2

Firefox and Fennec for instance use the Google Location Service, which is also used by Google Gears.

Deluna answered 15/4, 2010 at 0:32 Comment(0)
D
0

If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider, Google Location Services, to get an estimate of your location. That location estimate is then shared with the requesting website.

mozilla

Discrimination answered 5/7, 2015 at 9:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.