-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
fix wrong explanation about cache-control and authroization header #29064
Conversation
Co-authored-by: Donghun Shin <huipulci1@naver.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jxck
The changes are great.
But I think we've overlooked something.
The changes don't seem to have anything to do with private cache
after all.
Is it right for this to be in the private cache
paragraph?
(append)
And it seems to include similar content to this
The public value has the effect of making the response storable even if the Authorization header is present.
Note: The public directive should only be used if there is a need to store the response when the Authorization header is set. It is not required otherwise, because a response will be stored in the shared cache as long as max-age is given.
So if the response is personalized with basic authentication, the presence of public may cause problems. If you are concerned about that, you can choose the second-longest value, 38 (1 month).
(The above is what exists in the Cache Busting paragraph.)
hmm, so it seems reasonable to just remove. |
Preview URLs External URLs (9)URL:
(comment last updated: 2023-09-15 02:50:28) |
Yes this should be removed. Serves me right for not reading all the context. I have made that change. Thanks @shin-mallang for sticking with it, and @Jxck for providing the canonical answer. |
@hamishwillee @shin-mallang Thanks for tons of helps! |
@hamishwillee @Jxck |
Description
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching#private_caches
has incorrect explanation about cache-control and authorization header.
Motivation
in Spec (RFC 9111) only mentions that if request contains
Authorization
header, it can't be stored in Shared Cache by default.https://httpwg.org/specs/rfc9111.html#response.cacheability:~:text=if%20the%20cache%20is%20shared%3A%20the%20authorization%20header%20field%20is%20not%20present%20in%20the%20request%20(see%20section%2011.6.2%20of%20%5Bhttp%5D)
But the content mentions like below.
should remove
private cache
from here.Related issues and pull requests
Fixes #29019