Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISR: is navigating between pages isn't considered a new request? #28195

Closed
pranavmalvawala opened this issue Aug 17, 2021 · 2 comments
Closed
Labels
bug Issue was opened via the bug report template.

Comments

@pranavmalvawala
Copy link

What version of Next.js are you using?

11.0.1

What version of Node.js are you using?

14.17.0

What browser are you using?

Chrome

What operating system are you using?

Windows

How are you deploying your application?

Vercel

Describe the Bug

I have an app with ISR and it appears simply navigating to a page (multiple times) is not enough to view updates. I have to actually land on that url or refresh the page. It feels navigating is not enough to even trigger ISR. So can I know is this the ideal / expected behavior? or are there any chances for including this in future?

Expected Behavior

I think it can be over demanding to ask but I expect the page to revalidate on navigating to the page and also have it be in an updated state in case the user accesses the same page again after revalidation time has passed and regeneration is finished.

To Reproduce

  1. Have 2 pages with ISR (data must change for both pages) and a link to navigate between them
  2. Change data for both pages
  3. Navigate between pages and check if ISR gets triggered
  4. wait for time > revalidate time and then hit refresh (ISR must have triggered just now so pages must still have stale data, check both pages using navigation)
  5. ISR was triggered in last step so a refresh again should do the trick and new data can be filled in pages.

I was under the impression navigating to a page would trigger ISR for it and later on when I go back to that page again, it would have latest data. The confusion began for me with word "request" in doc.

@pranavmalvawala pranavmalvawala added the bug Issue was opened via the bug report template. label Aug 17, 2021
@ijjk
Copy link
Member

ijjk commented Oct 5, 2021

Hi, yes this is the expected behavior for ISR, we prefetch the data for the pages and leverage this in memory cache during navigations to provide the fastest transitions we can. We do not cache getServerSideProps data for transitions though as this data is expected to change often.

@ijjk ijjk closed this as completed Oct 5, 2021
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants