Tag Archives: metrics

Simple way to detect browser’s FPS via JS

It’s dumb and dead simple but works. You can even track browser’s metrics with that. (() => { const times = []; let fps; function refreshLoop() { window.requestAnimationFrame(() => { const now = performance.now(); while (times.length > 0 && times[0] {console.log(fps);}, 1000) })();