How <Link prefetch="render" /> works? #2490
-
If I make the links on the homepage to have I want to make sure that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
No, it means that for each Typically you would add Just remember, prefetch only occurs in the browser. It does not affect SSR. |
Beta Was this translation helpful? Give feedback.
No, it means that for each
<Link prefetch="render"/>
, a<PrefetchPageLinks/>
component will be rendered. This component simply adds a new<link rel="prefetch"/>
element to start the prefetch. So when the browser processes the page, it will start prefetching those links in the background.Typically you would add
prefetch="intent"
so the browser would only prefetch when the user hovers over the link. Withprefetch="render"
, those resources will be prefetched automatically as soon as the page is rendered.Just remember, prefetch only occurs in the browser. It does not affect SSR.