prefetching

Loading a route's data in the background before the user clicks, so navigation feels instant.

In more detail

The browser or framework guesses what the user will need next, such as the page behind a visible link, and downloads it ahead of time. Done well it makes navigation feel instant; done too eagerly it wastes bandwidth.

Example

Next.js prefetches routes whose Link components enter the viewport, in production only; dynamic routes are prefetched down to the nearest loading.tsx.

Related terms

Taught in

References