Technical Guide 5 min read

How Browser Geolocation Really Works: GPS, Wi-Fi, Cell Towers & IP

Discover how web browsers query your device's GNSS satellite chips, Wi-Fi router BSSIDs, cell tower signals, and IP routing tables to determine latitude and longitude.

By the My Location Lab Engineering Team • Updated: 2026

Executive Summary

Web browsers use the W3C Geolocation API, which connects to your operating system's hybrid location provider. On mobile devices with GPS, it queries GNSS satellite constellations (accurate to 3-5m). Indoors or on PCs without GPS, it queries nearby Wi-Fi network BSSIDs and cell towers against location databases (accurate to 10-30m) verified by our GPS Accuracy Checker, falling back to IP routing if hardware signals are disabled.

The Four Layers of Browser Geolocation

When you click "Get My Location" on My Location Lab, your browser does not guess your location through magic. Instead, it activates the W3C Geolocation API (navigator.geolocation.getCurrentPosition), which delegates positioning to your device operating system (Windows Location Service, Apple CoreLocation, Android Fused Location Provider, or Linux GeoClue).

The operating system synthesizes positioning data from four distinct hardware and network sources, prioritizing whichever offers the highest confidence:

1. GNSS Satellites

GPS, GLONASS, Galileo, BeiDou chips reporting exact latitude and longitude coordinates.

2. Wi-Fi BSSID Triangulation

Scans nearby router MAC addresses matched against cloud signal databases.

3. Cellular Cell ID
200 – 1,000 meters

Multi-tower signal strength & timing advance triangulation from mobile masts.

4. IP Geolocation

Fallback ISP database lookup: reveals city or regional data center only via IP lookup.

Deep-Dive: How Wi-Fi BSSID Geolocation Functions Indoors

Many desktop and laptop users wonder: "How does my laptop know I'm sitting in my living room when it doesn't have a GPS chip?"

The answer is Wi-Fi BSSID Positioning. Your computer's Wi-Fi adapter passively listens to radio beacons broadcast by surrounding routers. Each beacon carries a BSSID (the router's unique hardware MAC address) along with received signal strength (RSSI).

The operating system hashes this list of nearby routers and transmits it over TLS to a location positioning service (such as Google Location Services or Apple MLS). Because smartphones with GPS continuously map the geographic locations of Wi-Fi routers as people walk past them on the street, the central server can triangulate your laptop's location to within 15 meters simply by analyzing which routers are in range. You can test your live confidence radius with our GPS Accuracy Checker.

High Accuracy vs Low Power Mode

The W3C Geolocation specification provides an optional configuration parameter named enableHighAccuracy:

navigator.geolocation.getCurrentPosition(
  successCallback,
  errorCallback,
  {
    enableHighAccuracy: true,  // Forces GNSS satellite activation
    timeout: 10000,           // Maximum wait time (10 seconds)
    maximumAge: 0             // Do not use cached positions
  }
);

When enableHighAccuracy: true is requested, the operating system warms up its internal satellite receiver, resulting in an accurate coordinate readout down to 6 decimal places. If this step fails with a prompt rejection, see our step-by-step guide on fixing location permission denied. To convert the reported coordinates into a street address, learn how reverse geocoding converts GPS to street addresses.

Frequently Asked Questions

Does browser geolocation track me when I close the tab?

No. The W3C Geolocation API is strictly session-bound. Once you navigate away or close the browser tab, all hardware location tracking immediately terminates.

Why is my IP-based location showing a different city?

IP geolocation relies on ISP routing hubs. Your ISP may route traffic through a regional data center located tens or hundreds of kilometers away from your physical house.

Explore More Geospatial Guides

Browse our full library of technical tutorials, troubleshooting walkthroughs, and coordinate standards.

← Return to All Guides