Hardware & Capabilities · Browser Tests

Battery Status Test

Read your battery level, charging state and time remaining, and see which browsers still expose it.

Reading battery status…
Reading battery status…

Asking the browser for the Battery Status API.

On this page
  1. What the API reports
  2. Reading the numbers
  3. Why some browsers removed it
  4. Battery as a tracking signal
  5. How the reading varies by device
  6. What it can and cannot tell you
  7. What you can do about it

What the Battery Status API reports

The Battery Status API is one of the smallest interfaces a browser exposes and one of the most discussed. A single call to navigator.getBattery() returns a promise that resolves to a BatteryManager object, and that object answers four questions about the power supply.

  • level is a fraction from 0 to 1, so 0.63 means 63 per cent. The panel rounds it to a whole percentage.
  • charging is a simple true or false for whether the device is plugged in and taking power.
  • chargingTime is the estimated seconds until the battery is full, and is Infinity when the browser cannot say.
  • dischargingTime is the estimated seconds until empty, and similarly reports Infinity when unknown.

The object also fires four change events, one per value. The panel subscribes to all four and repaints whenever one arrives, which is why the numbers above can shift while you leave the page open.

Reading the numbers

The percentage is honest but coarse. Browsers round the level so that it cannot be used as a fine-grained sensor, and the updates are deliberately sluggish: Chromium throttles the events to roughly one a minute. If the figure looks stuck while your system tray counts down, that is the throttle, not a bug.

The two time estimates come from the operating system and are the least reliable part of the read-out. Just after you unplug, the battery driver often has no recent power-draw sample, so it reports nothing useful and the browser hands back Infinity. A minute later it may settle on a sensible figure, then jump when you open a demanding app. The panel prints Unknown in those cases rather than inventing a number.

A read-out, not a measurement

The battery values are the browser relaying what the operating system chooses to share. Two laptops at the same percentage can honestly report very different times remaining, because the estimate depends on what the machine is doing.

Why Firefox and Safari removed it

The API was designed to help web apps behave sensibly on low power, for example by pausing a download when the battery is nearly empty. It became a privacy concern instead. Firefox shipped the API and then removed it in version 52, in 2016, specifically because of fingerprinting. Safari has never implemented it. Chromium browsers keep it on desktop, though it requires a secure context and can still be switched off by a policy or an extension.

When the interface is absent, the panel above shows a plain not exposed state. That is deliberate: an empty read-out is more useful than a fabricated one, and it also tells you something real about the browser you are using. The browser information test confirms which browser and version you are running if you want to check that against this result.

Battery level as a tracking signal

A battery percentage changes slowly and predictably, which is exactly what makes it interesting to a tracker. Within one browsing session the value barely moves, so it can act as a short-lived tag that survives a cleared cookie jar. Across visits on the same day the level usually differs, but the charging flag, the presence of the API at all and the exact rounding behaviour still contribute a few bits.

Those bits matter only in combination. The number of people sharing your battery level right now is enormous; the number sharing your level, your graphics card, your fonts and your screen geometry is very small. The device and hardware test shows the other hardware signals that sit next to it, and the fingerprint test weighs them all together.

How the reading varies by device

A desktop tower with no battery makes the API behave oddly. Chromium still resolves the promise and hands back a BatteryManager with a level of 1 and charging set to true, because the machine is on mains power and the value has nowhere else to go. That is a placeholder rather than a reading, and every desktop in the same situation reports the same one.

Laptops are where the numbers become interesting, and phones are where they are coarsest. Mobile browsers round the level more aggressively, and the operating system's own estimate of time remaining is often more optimistic than the battery delivers in practice.

What it can and cannot tell you

What you get here is a rounded percentage, a charging flag and two estimates that are frequently unknown. The percentage is capped in precision, so a site cannot read 63.7 per cent, only 63 or 64. The times are guesses from the power driver, and they vanish entirely on many machines.

What this page does not do is keep, send or act on any of it. No request leaves the browser, nothing is stored, and the panel does not change your power settings. If you would rather a site could not read the level at all, the reliable options are a browser that does not implement the API, or a setting or extension that blocks it. No single signal here protects you on its own, and it is worth being sceptical of anything that claims otherwise.

What you can do about it

Because the API is Chromium-only and needs a secure context, the simplest lever is the browser you use. Firefox removed it and Safari never had it, so a page opening on either finds nothing to read at all. That is a larger change than most people want, but it is the one that actually works.

It is worth keeping the signal in proportion as well. A rounded percentage on its own places you in a group of millions, and the charging flag adds very little to it. If the reading concerns you, the better move is to reduce the other signals you emit, which the fingerprint test measures directly, rather than to hunt for one setting that hides the battery.

Frequently Asked Questions

What is the Battery Status API?
It is a small browser interface, reached through navigator.getBattery(), that resolves to a BatteryManager object. That object carries four values: level as a fraction from 0 to 1, a charging flag, the estimated seconds until full, and the estimated seconds until empty. It also fires events when any of them change. The read-out above multiplies the level by 100 for the percentage.
Why does this test say my browser does not expose it?
Firefox removed the Battery Status API in version 52, in 2016, and Safari has never included it. On Chromium browsers it may still be blocked by a privacy setting or extension. When the API is missing the panel says so rather than guessing, because there is genuinely no value to read.
How accurate is the charging and discharging time?
Not very. The browser passes on an estimate supplied by the operating system, which is derived from recent power draw and rounded heavily. It commonly shows Unknown just after you unplug, then settles a minute later, and it will jump again the moment you open a demanding app. Treat it as a rough hint, not a countdown you can plan around.
Can a website use my battery level to track me?
In principle, yes. Battery level is a slowly changing number between 0 and 100 that persists for a while, so it can help link visits from the same device, especially alongside other signals. That possibility is the main reason the API was restricted. On its own it is a weak identifier, and the fingerprint test shows how it stacks with everything else.
Does this page store anything or drain my battery?
No. The values are read in your browser and shown only to you, and nothing is uploaded or stored. Reading the battery level costs no measurable power either; the page only listens for the change events the browser already fires and repaints a few small numbers when one arrives. Closing the tab ends the subscription.