Files
Andrew ClarkandGitHub fc65fbb01c Reuse bfcache data during Full prefetches (#88606)
During a Full prefetch (`<Link prefetch={true}>`), check the bfcache for
matching segment data before issuing a new request. The bfcache stores
data from previous navigations, which always includes dynamic data.

This optimization avoids redundant server requests when the user has
already navigated to a route and the data is still fresh according to
the staleTimes.dynamic configuration.
2026-01-20 22:49:51 -05:00

20 lines
438 B
TypeScript

import Link from 'next/link'
import { LinkAccordion } from '../components/link-accordion'
export default function Page() {
return (
<ul>
<li>
<LinkAccordion href="/dynamic" prefetch={true}>
Dynamic page
</LinkAccordion>
</li>
<li>
<Link href="/dynamic" prefetch={false} id="link-without-prefetch">
Dynamic page (no prefetch)
</Link>
</li>
</ul>
)
}