[App router] Always reload a page when clicking on a <Link>
#65487
-
SummaryNext.js caches pages that you have opened. Clicking on I couldn't find documentation on this, but in nextjs v My problem is that I have some pages that often change, meaning that they have to be reloaded every time the user opens them. Is anyone familiar with how to tell it to disable cache? For now my workaround is to use Additional informationTo be clear I tried using This discussion seems similar, but isn't #48312 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Here are the docs:
And to opt-out, https://nextjs.org/docs/app/building-your-application/caching#opting-out-3 You'd need an onClick handler on the |
Beta Was this translation helpful? Give feedback.
Here are the docs:
And to opt-out, https://nextjs.org/docs/app/building-your-application/caching#opting-out-3
You'd need an onClick handler on the
Link
, which callsrouter.refresh()
I guess. For people without JS, it doesn't matter because theLink
, would just work as a regulara
.