This page knows your battery charge level (unless you're using Firefox)
A simple web page demonstrating `navigator.getBattery()` reignites concern over how much hardware information browsers expose by default. Commenters note that the Battery Status API now mostly works only in Chromium-based browsers, having been removed or blocked in Firefox and Safari due to fingerprinting and potential abuse (such as dynamic pricing based on low battery). While there are some legitimate use cases like power-saving features or performance tuning, many argue the benefit to users is tiny compared with the privacy risks, especially when JavaScript-heavy sites are the norm.
Browser support and behavior
- Many reports that the page works only in Chromium-based browsers (Chrome, Vivaldi, some Brave/Arc/Kiwi) and fails in Firefox, Safari (desktop and iOS), Librewolf, Edge on desktop, DDG browser, Vanadium, etc.
- Some users see only an animation or incorrect values (e.g., always “charging 100%”), suggesting either blocked/nerfed APIs or no battery hardware.
- Brave results conflict: some see real levels, others see fake “100% charging,” and some see nothing; shields/fingerprinting settings may affect this, but behavior is unclear.
- iOS browsers generally don’t expose this through the web API, although native apps can read battery state.
Role of JavaScript and defaults
- The page relies on
navigator.getBattery()and therefore on JavaScript. - Some posters note this still matches default browser behavior: JS auto-runs on most sites.
- Others describe running with JS heavily restricted (NoScript/uMatrix/uBlock setups), but acknowledge that doing this in 2023+ is niche and inconvenient.
Privacy, fingerprinting, and standardization
- Firefox and Safari removed the Battery Status API due to fingerprinting risk; a paper is cited showing how precise battery readings aided cross-site tracking.
- Chrome kept a reduced-precision version and restricts it on insecure origins; some see this as a “middle ground.”
- Concerns: battery state can help track users and could be “weaponized” (e.g., price discrimination). Some see exposing this without explicit permission as problematic.
Legitimate and intended use cases
- Stated purposes include: reducing app resource use on low battery, warning users before data loss, enabling power-aware features (e.g., 3D, video), performance measurement, and parity with native apps.
- Several commenters argue that only a tiny fraction of web apps genuinely need this; others suggest a simpler “low-power-mode” signal or three-state API instead of exact levels.
Ethics and pricing debate (Uber example)
- A cited story about ride-hailing apps using battery level for pricing triggers a long ethics debate.
- One side: hiding battery status to avoid higher prices is acceptable self-protection; opaque use of such data by companies is exploitative.
- Other side: intentionally withholding or falsifying data to gain a better price is framed by some as akin to fraud; counterarguments strongly dispute this.