Battery Status API: Why Browsers Deprecated Battery Level Tracking
Explore the history of the HTML5 Battery Status API, how high-precision battery discharge metrics allowed cross-site tracking, and why it was removed.
The Innocent API That Became a Tracking Threat
When the W3C introduced the HTML5 Battery Status API (navigator.getBattery()), the goal was innocent: allow web applications (like video editors or games) to throttle resource usage and save power when a laptop or mobile device was running low on battery.
However, security researchers soon discovered that high-precision battery readouts created a severe privacy vulnerability.
How the Battery API Created a Short-Term Fingerprint
The API exposed four key properties:
battery.level(e.g. 0.542385...)battery.charging(true/false)battery.chargingTimebattery.dischargingTime(seconds remaining)
When combined, these four values produced millions of distinct combinations. Because battery discharge is continuous and predictable, tracking scripts could follow a user moving between Incognito tabs or across different browsers on the same device within a 30-minute window.
Browser Deprecation and Privacy Lessons
Recognizing this threat, browser vendors took decisive action:
- Mozilla Firefox: Completely removed the Battery Status API in Firefox 52.
- Apple WebKit (Safari): Never implemented the API due to fingerprinting concerns.
- Google Chromium: Restricted precision and deprecated unprompted access.
This case study demonstrates why modern privacy diagnostics, such as Device Info and Browser Fingerprinting, audit all browser hardware APIs.
Browser Fingerprint Diagnostic
Analyze your Canvas ID, WebGL renderer, system fonts, and trackability score.