performance.memory
Chromium exposes non-standard performance.memory:
{ jsHeapSizeLimit: 4294705152, totalJSHeapSize: 35839476, usedJSHeapSize: 25031212}Our browser demos poll usedJSHeapSize every second for the live chart.
function heapMb() { if (!performance.memory) return null; return (performance.memory.usedJSHeapSize / 1024 / 1024).toFixed(1);}
setInterval(() => console.log(`${heapMb()} MB`), 1000);Limitations
Section titled “Limitations”| Limitation | Detail |
|---|---|
| Chromium only | Not in Firefox/Safari |
| Approximate | Rounded for security |
| Not for production RUM | Use PerformanceObserver + your backend carefully |
Enable in headless Chrome
Section titled “Enable in headless Chrome”chrome --enable-precise-memory-infoBroken interpretation
Section titled “Broken interpretation”“Topped 100 MB once → leak!” — could be one-time load.
Healthy interpretation
Section titled “Healthy interpretation”Track slope over repeated identical actions after GC.