no-cache

3 views
Skip to first unread message

Sara

unread,
Nov 17, 2008, 3:57:19 PM11/17/08
to CS193H High Performance Web Sites
Hi,

In the Ajax class, the is an example about google document which has
no-cache and no-store in its chache-controle header.
If no-cache means no caching at all, why we need to have no-store
after it?
If I am right no-store means no caching on disk.
This is what spec says about no-cache, not very clear to me:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1

If the no-cache directive does not specify a field-name, then a
cache MUST NOT use the response to satisfy a subsequent request
without successful revalidation with the origin server. This allows an
origin server to prevent caching even by caches that have been
configured to return stale responses to client requests.
If the no-cache directive does specify one or more field-names,
then a cache MAY use the response to satisfy a subsequent request,
subject to any other restrictions on caching. However, the specified
field-name(s) MUST NOT be sent in the response to a subsequent request
without successful revalidation with the origin server. This allows an
origin server to prevent the re-use of certain header fields in a
response, while still allowing caching of the rest of the response.

Thanks,
Sara

Steve Souders

unread,
Nov 17, 2008, 4:09:01 PM11/17/08
to cs193...@googlegroups.com
For no-cache, the critical text is this:
...a cache MUST NOT use the response to satisfy a subsequent
request without successful revalidation with the origin server.
This says that a cache *can* cache the response, but can only use the
cached response after first validating with the server. Basically, this
should force a cache to always to a conditional GET request.

For no-store, the critical text is:
...a cache MUST NOT store any part of either this response
or the request that elicited it.
In this case, the cache can't even store the response.

-Steve
Reply all
Reply to author
Forward
0 new messages