Battery Status
Battery level, charging state and time estimates, without a prompt on Chromium.
In one line
Can see your battery level and charging state, with no prompt in Chrome
Battery level, charging state and time estimates, without a prompt on Chromium.
Shows how drained a phone or laptop is. Researchers showed level plus charge time works as a short-term tracking ID. Site could raise prices for low battery or tell laptop from desktop.
What it can and can't do
What the user does: Nothing. It happens when the page runs the check
It can
- Check how full your battery is and whether it is charging
- See estimated minutes to full or empty
- Tell a laptop or phone from a desktop that has no battery
- Use level plus charge time as a short term tracking clue
It cannot
- Work in Safari or on iPhone
- Work in Firefox, which removed it
- See battery health, make, or exact power draw
- Track you for long; the level changes within minutes
How it differs between platforms: Chrome, Edge, and Samsung Internet allow it. Firefox removed it and Safari never offered it.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 38 | 2014-10-07 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Removed | 52 | 2017-03-07 | Supported 43 to 51, removed in 52 |
| Safari | Not supported | Not available | Not listed | Never implemented |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 38 | 2014-10-08 | None |
| Samsung Internet | Supported | 3.0 | 2015-04-10 | None |
How a site asks for it
| API | navigator.getBattery() returning BatteryManager |
| Browser compat keys | api.Navigator.getBatteryapi.BatteryManager |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
level | float | fraction | 0 to 1 | 0.01 steps |
charging | boolean | None | true or false | Not listed |
chargingTime | float | seconds | 0 to Infinity | whole seconds |
dischargingTime | float | seconds | 0 to Infinity | whole seconds |
Technical limits
- Absent on Safari, iOS, Firefox
- Desktop without a battery reports charging true, level 1
- Cannot read battery health or temperature
The story
What it is
Battery level, charging state and time left, readable by a page without a pop-up in Chromium browsers.
For you
You do not get asked, and you will not notice it happening. A site may quietly decide to show a lighter page if your phone is almost empty. Or it may record your battery number as a clue about you.
For makers
Developers use it to be kind to batteries and to warn people before a long task. Ad and fraud teams watch it as one more detail that is hard for a bot or a fake device to get right. Privacy teams treat the combined level and timing as a risk.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A cloud gaming page warns you to plug in your laptop because streaming at high quality drains the battery fast. | Xbox Cloud Gaming, GeForce NOW |
| video | A video call app suggests turning off the camera when the battery is at 5 percent. | Google Meet |
| fitness | A web workout player lowers screen effects so a phone survives the full class. | None named |
| education | An online exam site checks that the laptop is plugged in before a timed test begins. | None named |
| security | A bank's fraud tool sees a device claiming to be a phone with a battery that never changes and flags it as an emulator. | None named |
| travel | A booking site shows a lighter mobile page when a traveller's battery is low in an airport. | None named |
Risks
- Hard to notice
- Combines with other clues to follow you
What the platform says
- MDN: Battery Status API. Developer docs describe it as a way for pages to adapt behaviour to the device power state.
Good uses and abuse
Legitimate uses
- Low-power mode for video or sync
- Warn before big uploads
Known abuse
- Cross-site short-term ID
- Surveillance pricing on low battery
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
A real example: LinkedIn
Battery level, charging state, discharge estimate (BleepingComputer: battery status). Read by the LinkedIn APFC fingerprint script (48 features, alleged by BrowserGate, partly confirmed by BleepingComputer).
History
- 2015-08, paper: Olejnik et al. show battery data can track users across sites
- 2017-03, Firefox 52: Removed over fingerprinting and privacy
- 2018-01, Chrome: Permissions-Policy battery integration discussed; Safari and Firefox refuse to ship
- 2022-06, Chrome 103: Restricted to secure contexts
Sources
- Olejnik et al. The leaking battery (2015)
- MDN Battery Status API
- W3C Battery Status
- CreepJS (abrahamjuliot)
How well checked: Checked against real behavior.