lazyOnload
A next/script strategy that loads the script only after everything else has loaded, during browser idle time.
In more detail
Use it for low-priority extras such as chat widgets and social embeds. The script loads only after the page has finished loading.
Related terms
- next/script — The Next.js Script component, which loads third-party JavaScript with a chosen strategy so it does not block the page.
- browser idle time — Moments when the browser has finished urgent work and is waiting, which scripts can use for low-priority tasks.
- lazy loading (web resources) — Waiting to load something, such as an image, script or video, until it is actually needed.
Taught in
- Script Optimization: next/script & Lazy Third Parties — Next.js 15 & Modern App Router Architecture