Battery and Pressure

Battery, Device Memory and Compute Pressure

These Chromium-only hints scale work to the device: skip autoplay on a low battery, load lighter assets on a small-memory phone, or lower a video call's frame rate under CPU pressure. Firefox 52 555 removed getBattery(). navigator.deviceMemory rounds RAM to coarse buckets (2 to 32 GB on desktop since Chrome 147 1 ), Chrome 152 adds the navigator.cpuPerformance tier (1-4, 0 unknown), and PressureObserver (Chrome 125, desktop) reports CPU state changes. Headless Chrome 152 printed:

Reading battery, memory, CPU tier and CPU pressureJavaScript
const battery = await navigator.getBattery?.();
console.log(battery?.level, battery?.charging, navigator.deviceMemory, navigator.cpuPerformance);
const observer = new PressureObserver(([record]) => console.log(record.source, record.state));
await observer.observe('cpu', { sampleInterval: 2000 });   // nominal, fair, serious, critical
Output
1 true 32 4
cpu nominal