Note: Battery Status API is deprecated and removed from most browsers due to privacy concerns.
The Battery Status API was designed to let websites know the device's battery percentage, but was deprecated and removed due to severe privacy implications. It revealed precise battery level (0-100%) which could be used for tracking.
The Battery Status API was introduced in 2012 to help websites optimize for low-power situations. The intent was good, but the implementation created serious privacy problems.
In 2016-2017, researchers discovered the API was being used for "battery status tracking" - a fingerprinting technique that uniquely identified users based on precise battery percentage combined with other data. Because battery level changes uniquely over time, it created a tracking vector that persisted even after clearing cookies.
0.0 to 1.0 representing 0% to 100% charge
Example: 0.73 = 73% battery
The API has been removed from all major browsers. Attempting to access it will return:
| Browser | Status | When Removed |
|---|---|---|
| Chrome | Removed | Version 103 (2022) |
| Firefox | Removed | Version 72 (2020) |
| Safari | Never supported | N/A |
| Edge | Removed | Following Chrome (Chromium) |
| Mobile browsers | All removed | 2020-2022 |
Battery level was one of the most effective fingerprinting vectors, uniquely identifying users even after clearing all browser data.
Battery level changes in small increments. Combined with other data (screen size, timezone, etc.), it created a highly unique fingerprint. As battery drained uniquely per user's activity, it could track users across sessions.
Unlike cookies or localStorage, battery level persisted even after clearing all browser data. Users couldn't remove this tracking vector.
In 2016, researchers from Belgium and France demonstrated that battery status could identify users with 97% accuracy within 2 minutes. The combination of:
Created a near-unique identifier for each device.
You don't need to do anything to protect against battery tracking. All modern browsers have removed this API entirely.
The Battery Status API serves as a cautionary tale about well-intentioned features with unintended privacy consequences. It demonstrates why: