Does NextJS on demand revalidation works for Next/link?

Viewed 38

https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration#on-demand-revalidation

From NextJS docs, it seems that on demand cache revalidation should work fine with regular <a> tags and also when you refresh the page.

But will it work when the user clicks on <a> tag that has been rendered using Link from 'next/link' ?

Those links are client-side rendered and it's not clear to me if this is going to work:

  1. User visits home
  2. User clicks and visits Post1 link
  3. Post1 gets revalidated on the server
  4. User goes back home
  5. User clicks and visits Post1 link again

Assuming all those links were rendered using Link from next/link.

Will they see the new version of Post1 on step 5? Or will they still the same page they saw on step 2?

0 Answers
Related