Are <Links/> more expensive on the server than <a/>?
Answered
Philippine Crocodile posted this in #help-forum
Philippine CrocodileOP
my application renders a table with 50 entries per page; a user can click on an entry and go to its details page
initially i had this implemented with a <Link/> for smoother navigation; but the <Link/> does some prefetching for every entry, and i'm afraid that at scale this will increase my cloud bill...
i want your opinion on the tradeoff between <Link/> and <a/>
is my fear justified, or is it negletable?
initially i had this implemented with a <Link/> for smoother navigation; but the <Link/> does some prefetching for every entry, and i'm afraid that at scale this will increase my cloud bill...
i want your opinion on the tradeoff between <Link/> and <a/>
is my fear justified, or is it negletable?
11 Replies
@Philippine Crocodile my application renders a table with 50 entries per page; a user can click on an entry and go to its details page
initially i had this implemented with a <Link/> for smoother navigation; but the <Link/> does some prefetching for every entry, and i'm afraid that **at scale** this will increase my **cloud bill**...
i want your opinion on the tradeoff between <Link/> and <a/>
is my fear justified, or is it negletable?
you can disable prefetch on specific
<Link prefetch={false} />Answer
Philippine CrocodileOP
doesn't that reduce the "smoothness" on navigation?
<a /> will cause a full reload the whole page
@Philippine Crocodile doesn't that reduce the "smoothness" on navigation?
yeah but you want to reduce the cloud bill?
Philippine CrocodileOP
serverless function isn't expensive, is it?
Philippine CrocodileOP
so i don't have a cloud bill yet, i'm still on free tiers; i'm just thinking ahead a bit
ah ok, I think you can set a budget/limit on the platform to prevent big bill?
Philippine CrocodileOP
yep that might be a good idea; i'll monitor it as i open it to more users
thanks!
thanks!
also, prefetching should happen when the link display within the viewpoint
you could open the dev console, and scroll down the page