Link component behavior on Prefetching resources
Unanswered
American Sable posted this in #help-forum
American SableOP
Hey I want to confirm that does the Link component in next js only prefetches the JavaScript bundle or does it Prefecthes the fetch api data/database query defined in RSC components too?
1 Reply
Depends on the page.
If it's static, it prefetches the entire page.
If it's dynamic, it prefetches the metadata and loading page.
I stumbled upon this post, because I was looking for a solution regarding the metadata. Making API calls 50+ times per page load because a page has dynamic metadata is ridiculous and shouldn't happen. Avoid using
If it's static, it prefetches the entire page.
If it's dynamic, it prefetches the metadata and loading page.
I stumbled upon this post, because I was looking for a solution regarding the metadata. Making API calls 50+ times per page load because a page has dynamic metadata is ridiculous and shouldn't happen. Avoid using
generateMetadata
.