Question presented to candidate:
"Our product list page has fifty <Link>s to product pages. Clicking one feels instant in production but not in development, and the network tab shows a lot of requests. Explain what Next.js 16 prefetches, where it keeps it, and what Partial Prefetching changed in 16.3 and 16.4."
What a strong answer should cover:
<Link>prefetches in production only, when the link enters the viewport (and again on hover if expired), through a scheduler that prioritises visible and hovered links.- The prefetched RSC payload is stored in the in-memory client cache keyed by route segment; shared layouts are fetched once (16.0 layout deduplication and incremental prefetching), and static data is reused for about 5 minutes by default.
- Without Partial Prefetching: static routes are prefetched fully, dynamic routes only down to the nearest
loading.js. - With
partialPrefetching: true(16.3, requirescacheComponents), a default link loads one reusable App Shell per route;prefetch={true}adds the URL-specific content; the rest renders on navigation. - 16.4 added
prefetch()andnavigation()fromnext/cacheto defer subtrees to later navigation stages, andensureStaticto enforce that a stage stays static.
Clarifying questions expected:
- "Is Cache Components enabled?" β Partial Prefetching and the new functions require it.
- "Are the pages static, cached or per-user?" β that decides what can be in the shell and what must wait.
Code / implementation expected: Optional β a link list, a page using prefetch()/navigation(), and the config.