How it works
The prefetch and navigation requests, from a Chrome request log on next start (Cache Components on, trimmed):
GET /d?_rsc=5CB68i4pnAekjehf rsc=1 next-router-prefetch=1 next-router-segment-prefetch=/_tree next-url=/
GET /d?_rsc=5DLj9ndsnH3jzETe rsc=1 next-router-prefetch=1 next-router-segment-prefetch=/d/__PAGE__ next-url=/
(click)
GET /d?_rsc=vkeXZpkQjgg3d_yp rsc=1 next-router-state-tree=… next-url=/
-> 200 text/x-component
Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate
Vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding
Prefetching is per segment: the route tree first, then each segment the client lacks (here only the page; the root layout was already loaded). Per the docs, sibling routes reuse a cached parent layout. The click's request carries the state tree, URL-encoded JSON of the client's segments, with the page marked "refetch". The response body (trimmed):
3:[["children",{"s":"__PAGE__","d":{"r":["$","$4","c",{"children":[["$","main",null,{"children":[["$","h1",null,{"id":"h","children":"d"}],…,["$","$8",null,{"fallback":["$","p",null,{"id":"fb","children":"loading d…"}],"children":"$L9"}]]}],…
2:[["children",{"s":"d","d":{"r":null,"p":true,"v":null},"c":"$Q3"}]]
0:{…,"t":{"t":{"s":"","d":{"r":null,"p":true,"v":null},"c":"$Q2"},…},…}
Row 0 is the envelope; layouts the client already has are "r":null, and the page's tree contains "$L9", a reference to a row streamed later, which fills the Suspense boundary when the server finishes.
The _rsc value isn't random: every link with the same router headers sent the same value, whatever its path. Sending a wrong one got 307 with a location carrying the right one. Together with Vary it keeps an RSC payload and the HTML for the same URL apart in HTTP caches.
The router commits the new tree in a transition and calls history.pushState. Back and Forward restore earlier trees from memory: going forward to /d made no request and showed the same t.
Edge cases
- Without Cache Components, a link to a dynamic route with no
loading.js was still "prefetched": the request carried next-router-state-tree ending in "metadata-only" and returned 832 bytes of route tree and <head> data, no UI. That's what the docs mean by "skipped".
prefetch={false} made no request on viewport entry or hover; the click to a static page then waited for its round trip (413 ms at 400 ms latency).
- Cache Components on,
partialPrefetching on or off: the dynamic page's shell was prefetched either way, so the fallback appeared at once. The server never ran <Now /> for an automatic prefetch.
- Chrome and Firefox agreed on request order and on fallback and content timings within 20 ms. The added latency was Chrome-only: Firefox under Puppeteer's BiDi protocol has no network emulation.
Real-world scenario
An account area built without Cache Components reads cookies in every page, so every route is dynamic and none has loading.js. Users click a sidebar link and nothing happens for a second, then the page jumps in; some click twice. Adding app/account/loading.js makes every child route prefetch the layout and skeleton: the click commits immediately and the sidebar stays interactive. Turning on Cache Components goes further, prefetching each page's own static shell.
Trade-offs
Client-side navigation keeps shared layouts mounted and sends only the changed segments, but every dynamic visit still costs a server render, and an instant-feeling click depends on what was prefetched. Prefetching costs bandwidth and server work for links never clicked; prefetch={false} saves that but brings the round trip back.