What is the Battery Status API?

Abisola | Feb 7, 2026

The Battery Status API was a web API that let JavaScript read a device’s battery level, charging state, and rough time-to-charge or time-to-empty estimates via navigator.getBattery() and a BatteryManager object. It was meant for power-aware sites (for example, reducing motion when charge is low). Major browsers have removed or restricted it because fine-grained battery readouts became a tracking risk.

How it worked before removal

Calling getBattery() returned a Promise that resolved to BatteryManager with level (0.0 to 1.0), charging, chargingTime, and dischargingTime. Event listeners could react to levelchange and related events.

Research showed that precise level plus charging could act as a short-lived fingerprint: few users share the exact same percentage and plug state at the same instant. That enabled cross-site correlation even when cookies were cleared, which conflicted with privacy expectations.

Vendors responded by deprecating or gating the API. New sites should not rely on it. For performance, prefer general optimizations (smaller assets, less main-thread work) and user-controlled modes such as data-saver hints where appropriate.

Why it mattered for fraud and fingerprinting

Fraud vendors and trackers sometimes folded battery signals into browser fingerprint bundles alongside canvas, audio, fonts, and WebRTC. Stable or synchronized battery tuples across many sessions could indicate shared virtual profiles or scripted environments, though the signal was noisy and short-lived.

Today, with the API largely gone, historical knowledge still explains old datasets and why some legacy scripts fail silently. Current fraud detection leans on durable signals: IP and ASN reputation, proxy and VPN hints, device integrity, and behavior around clicks and forms. Understanding removed APIs clarifies why modern stacks emphasize other layers for click fraud and ad fraud. Privacy-focused discussion of fingerprinting overlaps with topics like third-party cookies and evolving browser limits.

Frequently Asked Questions

  • What did the Battery Status API return?

    Calling navigator.getBattery() returned a Promise resolving to a BatteryManager object with level from 0.0 to 1.0, charging state, chargingTime, and dischargingTime. Event listeners could react to levelchange and related events. Major browsers later removed or restricted the API because fine-grained battery readouts became a privacy and tracking risk.

  • Why was the Battery Status API deprecated?

    Research showed precise battery level plus charging state could fingerprint users: few people share the exact same percentage and plug state at the same instant. That enabled cross-site correlation even when cookies were cleared. Vendors deprecated or gated the API, so new sites should not rely on battery readouts for performance or analytics features.

  • Did fraud tools use battery data for fingerprinting?

    Fraud vendors and trackers sometimes folded battery signals into browser fingerprint bundles alongside canvas, audio, fonts, and WebRTC data. Stable or synchronized battery tuples across many sessions could indicate shared virtual profiles or scripted environments, though the signal was noisy and short-lived. With the API largely gone, legacy scripts may fail silently.

  • What signals replaced battery API fingerprinting?

    Modern fraud detection leans on durable signals such as IP and ASN reputation, proxy and VPN hints, device integrity checks, and behavior around clicks and forms. Understanding removed APIs like the Battery Status API explains why current stacks emphasize those layers for click fraud and ad fraud rather than short-lived browser hardware readouts.

Abisola

Abisola

Abisola handles content and support at ClickPatrol. She helps customers get more value from cleaner traffic data and writes practical resources about ad fraud, fake traffic, and smarter PPC decisions.