Replies: 3 comments 1 reply
-
Data is not prefetched if you use getServerSideProps, if you use getStaticProps you'll also get data prefetching automatically. |
Beta Was this translation helpful? Give feedback.
-
Would be interesting to have prefetch with getServerSideProps at least on link hover or something like that |
Beta Was this translation helpful? Give feedback.
-
@timneutkens says in #11578 (comment) that it would increase the server load. (I assume he means that the default behavior of the Link is to prefetch all links in the viewport). It's true, but getting to prefetch on hover could be a good middle ground, where the user has a high chance of clicking the link, which would mean a few milliseconds head start. It may also be possible to cancel the prefetch action, if/when the user unhovers the link, but that may be unnecessary. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I was wondering if you could add an option to prefetch data even when a page uses getServerSideProps. Something like
<Link serverPrefetch={true} href="/post/[id]" as="/post/1"></Link>
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions