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
Issue about the Age response header and the term "Reload" #29294
Comments
Pinging @Jxck, maybe? |
for Realod
What browser do you use ? for Age
this line in RFC 9111 doesn't mentioning about any requirement for Age header. - When a response is stored in a shared cache, it is necessary to inform the client of the response's age.
+ When a response is stored in a shared cache, it is possible to inform the response's age. I'll PR here. |
I use Chrome 117.0.5938.150 and also have tried recently released versions, and Edge reload_demo.mp4I record a demo here, before this demo, I have cleared all the cache in the browser and restarted the browser. Then I first visit a site, then find a request, it's Cache-Control shows public etc, then I clicked reload button on top left, but the Cache-Control in the same request doesn't change, and the request is tagged from memory cache. Obviously, this is a situation where caching comes in handy. But, the article say when reload is triggered, request will add Maybe I have misunderstood in somewhere, can you help me make it clear? |
@yionr what you see is "Response Header". Reload affects to "Request Header". |
@Jxck I'm sorry, I made a mistake by accident. But since the response is cached by the client(browser),it didn't process request header anymore. 20231004_133828.mp4However, if I checked |
I found you see the Subresource (js, css, img etc), not Main Resources (HTML).
there are two type of request from browser by UI. And they behave differently.
Disable Cache on devtools is equivalent with Super Reload. So you send |
I get it! Thank you very much!!! After reload, the Finally, is there a pretty way to inform readers to know this implementation? I think there are many people like me, who first start learning cache concept from this article, but don't know this implementation(the different reload way between subresources and Main Resource), and finally can't watch the true result. In my view, maybe add following:
My English is not good at present🤣 |
Yeah, I'm agree with that. It's fine if we adding a section or article for "Reloading" describes this behavior. |
Ah I forgot but it already mentioned here. |
Yes, there are already descriptions about reload, But I mean, it might be helpful to understand the mechanism that the browser make a difference reload action between Main Resource and Subresource, which is not mentioned in the section. In the article, it is written as:
Readers may think that all the requests act as the same, but in fact, the browser treats Main Resource and Subresource as different during a reload. Finally, I respect your opinion, and it's also possible that the number of people encountering this issue is actually quite small. Perhaps content here is any inappropriate. |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
What specific section or headline is this issue about?
reload;fresh_and_stale_based_on_age
What information was incorrect, unhelpful, or incomplete?
About "Reload"
Sorry but, what action is called Reload? Is the refresh button? During the article, it say Reload action will put
Cache-Control: max-age=0
in request header. But I have tried many sites, like google github, when I click refresh button, it shows the resource is getting from cache and show the provisional header(there is no max-age header at all).I mean, in my first read, I can't recognize the term Reload's corresponding action, the only information the article provided is:
About "Age" response header
In the article, it says:
and RFC2616 write the same:
But this RFC was obsoleted, in RFC9111, there is no description about if cache server MUST include a Age header:
Finally, I did a experiment, I use nginx as proxy server, open it's cache function, config origin server's max-age, and successfully watched cache is HIT, but I can't watch Age header during this whole experiment. I asked nginx's community for help, but no team member reply me.
What did you expect to see?
For reload, is the Reload's description wrong? Or I think it's better have a example action as a hint.
For latter, maybe "When a response is stored in a shared cache, it is NOT necessary to inform the client of the response's age." or just delete the sentence.
Do you have any supporting links, references, or citations?
https://stackoverflow.com/questions/6239090/reload-vs-refresh
https://datatracker.ietf.org/doc/html/rfc2616#section-14.6
https://datatracker.ietf.org/doc/html/rfc9111#name-age
https://nginxcommunity.slack.com/archives/C02MRSU7CKT/p1695369835259619
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/http/caching
The text was updated successfully, but these errors were encountered: