Adopting Partial Prefetching
Learn how to enable Partial Prefetching and what changes for `<Link>`.
Partial Prefetching changes what <Link> downloads for a Cache Components route. By default, a <Link> loads a per-route App Shell, and the page's cached content is downloaded only when the link sets prefetch={true}. This is the biggest change from the pre-Cache Components behavior, where fully static pages were always prefetched by default.
<Link prefetch={true}> also stops prefetching dynamic content. It now only prefetches the cached parts of the page, so the link no longer pulls cookies, headers, or other request-time data ahead of the navigation.
Good to know: Partial Prefetching only works when cacheComponents is enabled.
What changes for <Link>
<Link> prop | Before (Cache Components default) | After Partial Prefetching |
|---|---|---|
<Link href="/x"> | Prefetched the cached page render. | Loads the App Shell for /x. |
<Link href="/x" prefetch> | Prefetched the cached page render and any dynamic content. | Loads the App Shell and the cached page content. |
<Link href="/x" prefetch={false}> | Disabled prefetching for this link. | Unchanged. Still disabled. |
The App Shell is shared across every link to a given route, regardless of dynamic params, so rendering many <Link>s to the same destination doesn't multiply the work.
Adopting in a new project
Enable partialPrefetching in next.config.ts alongside Cache Components:
Add prefetch to any <Link> whose destination's cached content is worth shipping ahead of the navigation. Leave it off for the rest:
Adopting incrementally in an existing project
If you can't enable partialPrefetching for the entire app at once, opt routes in one at a time with the prefetch route segment config:
A <Link> pointing at a route with prefetch = 'partial' loads the App Shell only, even when partialPrefetching is not set in next.config.ts.
Good to know: Adopting per-route first also preserves the dev-only <Link prefetch={true}> warning, which points at <Link prefetch={true}> calls whose destinations haven't adopted yet. Enabling the global flag first marks every route as adopted, which silences the warning and removes the signal for the audit below.
Once every route in scope has prefetch = 'partial', enable the config and remove the per-route exports:
Auditing existing <Link prefetch={true}> calls
When partialPrefetching is enabled, <Link prefetch={true}> now prefetches the App Shell plus cached content, but not dynamic data. Review each existing usage and decide whether the prop is still providing value. In next dev, the dev overlay surfaces a link-prefetch-partial insight for each call that points at a route without Partial Prefetching, so you can work through them one at a time.
Previously, <Link prefetch={true}> also prefetched dynamic data.
| Destination | Recommendation |
|---|---|
Fully static (no "use cache", no Suspense) | Drop prefetch={true}. The default <Link> already loads the full page because the App Shell is the page. |
| Has cached content worth shipping ahead of the click | Keep prefetch={true}. The cached parts come with the App Shell. |
Reads request data (cookies(), headers(), searchParams) the user will need on arrival | Keep prefetch={true}. Optionally enhance it with runtime prefetching (prefetch = 'allow-runtime') so the request data is prefetched too. |
Good to know: prefetch = 'allow-runtime' is an enhancement that adds runtime prefetching of request data. It is not a way to silence the dev <Link prefetch={true}> warning. That warning means the link does a legacy full prefetch of a route that hasn't adopted Partial Prefetching. The per-route opt-in for Partial Prefetching is prefetch = 'partial', which is separate from 'allow-runtime'.
Before:
After:
Next steps
- Runtime prefetching for per-link runtime prefetches and App Shells in depth.
partialPrefetchingAPI reference for the global config flag.prefetchAPI reference for the per-segment prefetch config.<Link>API reference for the per-linkprefetchprop.- Instant navigation to validate that the routes you've marked actually navigate instantly.