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

Cache Control for 404 response #1001

Closed
oleghalin opened this issue Feb 27, 2023 · 4 comments · May be fixed by #1236
Closed

Cache Control for 404 response #1001

oleghalin opened this issue Feb 27, 2023 · 4 comments · May be fixed by #1236

Comments

@oleghalin
Copy link
Contributor

Environment

Cloudflare Workers (i think all envs have same logic)

Reproduction

Try to access localhost:3000/_nuxt/test.css and see Cache Control headers.

Describe the bug

I think nitro shouldnt cache 404's errors by default or atleast with different rules. For now we are facing issue when user visited page after deploy and 404 response was cached in browser.

Additional context

No response

Logs

No response

@pi0
Copy link
Member

pi0 commented Feb 27, 2023

Hi. Can you please share nuxt/nitro versions?

@oleghalin
Copy link
Contributor Author

It's latest 2.2.3

@oleghalin
Copy link
Contributor Author

@pi0 here is example, https://test-docus.vercel.app/_nuxt/test.css.

As you see cache-control exists here, while response status is 404

age: 3
cache-control: public, max-age=2592000, immutable
content-encoding: br
content-type: text/html;charset=utf-8
date: Wed, 01 Mar 2023 13:11:00 GMT
server: Vercel

@pi0
Copy link
Member

pi0 commented May 17, 2024

Hi. I'm not sure if the deployment (cannot see source of open it anymore) were depending on cache headers generated by vercel edge or nitro so please feel free to open new issue with reproduction if facing similar issues.

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants