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: incorrect example of max-stale #34221

Closed
BlueGreenMagick opened this issue Jun 17, 2024 · 1 comment · Fixed by #34231
Closed

Cache-control: incorrect example of max-stale #34221

BlueGreenMagick opened this issue Jun 17, 2024 · 1 comment · Fixed by #34231
Labels
Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@BlueGreenMagick
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

What specific section or headline is this issue about?

max-stale

What information was incorrect, unhelpful, or incomplete?

The max-stale=N request directive indicates that the client allows a stored response that is stale within N seconds.

Cache-Control: max-stale=3600

In the case above, if the response with Cache-Control: max-age=604800 was generated more than 3 hours ago (calculated from max-age and the Age header), the cache couldn't reuse that response.

What did you expect to see?

I believe the text should be changed to below:

... if the response with Cache-Control: max-age=7200 was generated more than 3 hours ago ...

max-stale=3600 in request means that cached responses that were stale up to 3600 seconds (1h) may be served. So the response should be considered stale after 7200 seconds (2h), set in max-age.

Do you have any supporting links, references, or citations?

https://datatracker.ietf.org/doc/html/rfc7234#section-5.2.1.2

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@BlueGreenMagick BlueGreenMagick added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 17, 2024
@github-actions github-actions bot added the Content:HTTP HTTP docs label Jun 17, 2024
@hamishwillee
Copy link
Collaborator

Thanks - yes that is confusing. I've just removed the link to the expiry info, since that is actually irrelevant here. Fixed by #34231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants