Prefetch and pending navigation
Prefetching prepares route resources before the user follows a link. It can reduce waiting, but it consumes network and computation resources. Automatic prefetching in Next.js is a production behavior; development observations alone are not a reliable test.
Scope: Next.js 16.x candidate, App Router only, Cache Components disabled, TypeScript unless otherwise labeled. Examples are static source walkthroughs; exact framework patch and build are not verified.
A pair of catalog links (partial JSX)
<Link href="/catalog/moss">Read about Moss</Link><Link href="/catalog/harbor" prefetch={false}>Read about Harbor</Link>The first link uses default automatic prefetch behavior; the second opts out of automatic Link prefetching in this App Router lane. Following either remains a valid navigation. Do not reuse this as a Pages Router rule: the documented Pages Router prefetch=false still permits hover prefetching. Other code may also initiate manual prefetching.
Pending feedback without false promises
The amount of work prepared depends on the route and available loading boundaries. Do not assume every visible link downloads a complete page or that prefetching guarantees fresh data. useLinkStatus can expose pending state from a component rendered inside a Link. It is not a global network progress meter. For fast or already prefetched transitions a visible pending state may never appear. The loading file convention is covered later.
app/catalog/LinkHint.tsx
'use client';import { useLinkStatus } from 'next/link';export default function LinkHint() { const { pending } = useLinkStatus(); return <span role="status">{pending ? ' Opening book…' : ''}</span>;}Place <LinkHint /> inside the link after its meaningful label. A delayed navigation may show the status text. The user can still understand the link when no status appears.
Common mistake
Do not measure production prefetch by counting development requests or use arbitrary sleeps as proof of a performance improvement. Avoid placing separate buttons inside a link.
Try it yourself
Design a production test: compare default and disabled prefetch, record requests before a click, then record whether the pending text appears. Use a fixed local fixture and avoid promising a speedup.
After this lesson, you should be able to: Describe prefetch tradeoffs; Design a loading affordance.