By

Filip Vidović
A keyboard on which settimeout javascript is written

How to fix JavaScript Timer Drift in Background Tabs with Web Workers

setInterval breaks in background tabs. Chrome throttles it to once per minute, Firefox enforces strict minimum intervals, Safari does something similar. If your app relies on setInterval for status polling, countdown timers, or notification checks, it will fail when users switch tabs. The timer callbacks get delayed, batched or skipped. Your UI updates become sluggish...

Contact Us