Why do browsers throttle JavaScript timers?
Posted August 31, 2025 by Nolan Lawson in performance, Web. Tagged: timers. 9 Comments Even if you’ve been doing JavaScript for a while, you might be surprised to learn that setTimeout(0) is not really setTimeout(0) . Instead, it could run 4 milliseconds later: const start = performance.now() setTimeout(() => { // Likely 4ms console.log(performance.now() - start) }, 0) Nearly a decade ago when I was on the Microsoft Edge team, it was explained to me that browsers did this to avoid “abuse.” I.