jargon

Frontend & browser·JavaScript in the browser

you deferred the analytics work until the browser said it had nothing better to do.

requestIdleCallback

Also calledrIC, idle callback

A callback run when the browser has spare time at the end of a frame, given a deadline it asks you to respect. It is right for genuinely optional work — prefetching, logging, warming a cache — and wrong for anything the user is waiting on, because a busy page may never go idle. Safari's support has lagged for years, so anything depending on it needs a timeout fallback.

Commonly confused with