4 ms·
Caching in this context means “no need to ask the server for a new copy of this within the cache lifetime”. no-cache then does what it says: You can store it if
by mikl 6y ago
Caching in this context means “no need to ask the server for a new copy of this within the cache lifetime”. no-cache then does what it says: You can store it if you like, but you need to check with the server before reusing it.
That might be a little counter-intuitive, but if you read the definitions of the words, it does make sense.
- pas 6y agoBut there was must-revalidate too, right? What's the difference?
- uuidgen 6y ago> must-revalidate, max-age=0 if server doesn't respond it may give you cached > no-cache won't give you cached entry without validation > must-revalidate, max-age=10 will revalidate only after the time has expired
- edaemon 6y agono-cache: you MAY store this, but you MUST revalidate with the server before using it must-revalidate: you MUST revalidate with the server before using this after it expires They overlap but address different things; no-cache is for cacheability while must-revalidate is for validity. I don't think either of them are named very well.