How a battery became an identifier
The 2015 research showed the readout combined the battery level (for example 0.57, meaning 57% full) with chargingTime and dischargingTime in seconds. Together those values produced roughly 14 million possible combinations at any instant — enough to pick out a single device. Two sites reading the API within a few seconds saw the same set of numbers, letting them re-identify and link a user even right after they cleared their cookies, for that short window. Firefox removed the API; Chrome restricted it to secure contexts (pages served over https) and rounded the values to be less precise. The episode is now a standard teaching example of an unintended fingerprinting surface — a feature that quietly leaks identifying detail.
The bot-detection angle
For anti-bot systems the battery readout is a coherence check — a test of whether a browser's story holds together. A server-hosted headless browser (one running on a server with no screen) has no battery, so the API is missing or reports a permanently full, charging state. A laptop user-agent (UA) that claims no battery, or a battery frozen at exactly 1.0 and charging forever, looks mildly suspicious and feeds a lie-detection score alongside stronger signals. It is rarely decisive on its own, but it is cheap to read and adds to the overall picture.
Current status and how to handle it
The Battery Status API has been walked back since its 2012 debut: Firefox removed it outright, and Chrome restricts it (notably gating it behind secure contexts and reducing its precision). That history matters for scraping because the API's presence or absence is now itself a fingerprint surface — a browser claiming to be current Firefox while still exposing navigator.getBattery() is contradicting itself, and a Chrome profile returning suspiciously round values (exactly 100%, charging, infinite time) looks synthetic.
The right move is not to invent battery values but to match the API surface to the browser you claim to be: expose it only where that browser version really does, and let the values reflect a plausible device. Patched browsers such as Camoufox keep these capability surfaces aligned with the reported identity, which is more robust than bolting a fake getBattery() onto a stock headless build.
