Nextjs Fundamentals · Navigation

Prefetching and instant navigation

Partial Prefetching

Prefetching and instant navigation

Navigation feels instant when the next route is already on the client by the time you click. That is prefetching: Next.js loads a route in the background, and it happens automatically for routes linked with <Link> once the link enters the viewport.

How much is prefetched depends on the route:

  • A static route is fully prefetched.
  • A dynamic route is skipped, or partially prefetched when the segment has a loading.tsx — the shared layout and loading shell come ahead of time.

Next.js 16.3 generalised this into Partial Prefetching (opt in with partialPrefetching: true in next.config). Next.js can now extract a reusable loading shell from any route's UI, and a link's <Link prefetch={true}> decides how much of the target page to include — as much or as little as you want. The goal is SPA-like responsiveness without giving up server rendering.

You can opt out per link with prefetch={false} — useful for long lists of links you would rather not prefetch. To reduce cost without disabling it entirely, prefetch only on hover by starting with prefetch={false} and switching to null on onMouseEnter. Prefetching runs in production; in development it is disabled, so what you see locally is not the prefetched experience.

Because <Link> is a Client Component, it must hydrate before prefetching starts, so a large JavaScript bundle can delay it.

You are about to answer a short quiz on Partial Prefetching.

  1. Next.js automatically prefetches routes linked with `<Link>` when they enter the viewport.
  2. A static route linked with `<Link>` is ___ prefetched.
  3. A dynamic route with a `loading.tsx` can be partially prefetched.
  4. Next.js 16.3 introduced ___ Prefetching, giving per-link control over how much of a page is prefetched.
  5. Setting `prefetch={false}` on a `<Link>` disables prefetching for that link.
  6. Prefetching is enabled in development so you always see the prefetched experience locally.