browser idle time

Moments when the browser has finished urgent work and is waiting, which scripts can use for low-priority tasks.

In more detail

requestIdleCallback lets code run in these gaps without delaying user input or rendering. Idle time is not guaranteed, so work scheduled this way must tolerate waiting.

Example

next/script lazyOnload waits until the page has fully loaded and the browser is idle.

Related terms

Taught in

References