Cell tower triangulation: Lower accuracy (100-1000m), mobile devices
IP geolocation: Fallback method, city-level accuracy only
2. Background & Purpose
The Geolocation API was standardized by the W3C in 2008 to provide websites with location information for location-aware applications. Before this, websites could only approximate location via IP address.
Why Geolocation API Was Created
Location-based services: Maps, navigation, local search
User must explicitly allow or deny location access
3. Location Retrieved
If allowed, browser returns latitude, longitude, accuracy, and optional altitude/speed
3. Possible Values & Detection
API Availability
"Available"
Browser supports the Geolocation API (all modern browsers)
"Not available"
Very old browsers or API explicitly disabled
How It's Detected
// Check if API exists
'geolocation' in navigator
// Request location (requires user permission)
navigator.geolocation.getCurrentPosition(
(position) => {
console.log('Latitude:', position.coords.latitude);
console.log('Longitude:', position.coords.longitude);
console.log('Accuracy:', position.coords.accuracy, 'meters');
},
(error) => {
console.error('Error:', error.message);
}
);
Accuracy Levels
High accuracy (GPS): 5-50 meters (enableHighAccuracy: true)
Standard accuracy (WiFi/Cell): 100-1000 meters
IP-based fallback: City-level (5-50 km)
4. Common Legitimate Uses
Navigation & Maps
Turn-by-turn directions: Google Maps, Waze, Apple Maps
Location search: "Restaurants near me"
ETA calculation: Real-time arrival estimates
Traffic updates: Route optimization
Local Services
Delivery services: UberEats, DoorDash, Instacart
Ride-sharing: Uber, Lyft pickup locations
Store locators: Find nearest retail location
Local inventory: Check in-store product availability
Emergency Services
E911: Emergency responders locate you precisely
Safety features: Share location in emergency
Roadside assistance: AAA, tow services
Weather & News
Local weather: Hyperlocal forecasts
Regional news: Stories relevant to your area
Event discovery: Concerts, meetups nearby
Social & Gaming
Check-ins: Facebook, Yelp location tags
AR games: Pokemon Go, Ingress
Dating apps: Find matches nearby
Photo geotagging: Add location to photos
5. Browser & Platform Differences
Platform
Accuracy
Notes
Smartphones
Excellent (GPS)
5-50m accuracy, requires permission per domain
Laptops (WiFi)
Good (WiFi)
20-100m accuracy, uses WiFi database
Desktops (Ethernet)
Poor (IP)
City-level only, falls back to IP geolocation
Tablets
Varies
GPS models: excellent; WiFi-only: good
Chrome
-
Requires HTTPS (not HTTP)
Safari iOS
-
Prompts once per session, stricter permissions
HTTPS Requirement
Security Requirement
Modern browsers require HTTPS (secure connection) to access geolocation. HTTP sites cannot use this API.
6. Privacy Implications & Tracking Risks
Privacy Risk: VERY HIGH (when granted)
Geolocation reveals your precise physical location, potentially down to a few meters. This is one of the most sensitive pieces of information you can share.
What Geolocation Reveals
Exact Physical Location
GPS coordinates can pinpoint your home, workplace, school, or current location within meters.
Movement Patterns
Continuous location tracking reveals your daily routines, travel patterns, and frequently visited places.
Personal Information
Location data can reveal:
Where you live and work
Your income level (neighborhood affluence)
Medical visits (hospital locations)
Religious affiliation (places of worship)
Political views (rally attendance)
Relationships (co-location with others)
Real-World Privacy Violations
Catholic App Scandal (2021)
A Catholic news publication bought location data from Grindr (gay dating app) to identify and out priests visiting gay bars. This led to resignations and exposed the dangers of location tracking.
Period Tracking Apps
Some period tracking apps share location data with advertisers, potentially revealing visits to abortion clinics in states where abortion is criminalized.
Stalkerware & Domestic Abuse
Location tracking features in legitimate apps have been weaponized by abusive partners to stalk victims.
Location Data Brokers
Many free apps sell your location data to data brokers who:
Create detailed movement profiles
Sell data to advertisers, insurers, and law enforcement
Aggregate locations to identify patterns and behaviors
Never delete data even if you stop using the app
7. How to Protect Your Location Privacy
Browser Permissions (Most Important)
Chrome/Edge
Settings → Privacy and security → Site Settings → Location
Set to "Don't allow sites to see your location" or manage per-site