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

Redirect and not found responses never gets revalidated #75023

Closed
sroebert opened this issue Jan 17, 2025 · 3 comments
Closed

Redirect and not found responses never gets revalidated #75023

sroebert opened this issue Jan 17, 2025 · 3 comments

Comments

@sroebert
Copy link

sroebert commented Jan 17, 2025

Link to the code that reproduces this issue

https://github.com/sroebert/nextjs-redirect-revalidate-issue

To Reproduce

  1. Deploy the application to Vercel
  2. Open the home page, which will redirect to /redirect
  3. Fetch the response from the home page again, verifying the age of the response by checking the Age HTTP header.

Current vs. Expected behavior

The layout of the home page contains the following configuration:

export const dynamic = 'force-static';
export const revalidate = 10;

This should result in the response being revalidated every 10 seconds. This works fine for normal content, but not for a redirect response. Redirect responses never seem to get revalidated.

This also seems to be the case for notFound() responses.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 20.13.0
  npm: 8.19.4
  Yarn: 1.22.19
  pnpm: 9.15.4
Relevant Packages:
  next: 15.2.0-canary.13 // Latest available version is detected (15.2.0-canary.13).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

We are deploying our website on Vercel, we have not tested on other platforms. We have started noticing this issue when we updated from the last Next.js 14 release to the latest 15 release.

@sroebert sroebert changed the title Redirect response never gets revalidated Redirect and not found responses never gets revalidated Jan 17, 2025
@sroebert
Copy link
Author

Seems to also be related to #72546

@darthmaim
Copy link
Contributor

Probably already fixed by

@sroebert
Copy link
Author

Indeed fixed by #75009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants