However, the specified field-names must not be sent in the response to a subsequent request without revalidation with the origin server. If the no-cache directive does specify one or more field-names, then a cache may use a response to satisfy a subsequent request, subject to any other restrictions on caching. This allows an origin server to prevent caching even by caches that have been configured to return stale responses to client requests. Technically speaking, if the no-cache directive does not specify a field-name, then a cache can not use the response to satisfy a subsequent request without successful revalidation with the origin server. This is useful to assure that authentication is respected (in combination with public), or to maintain rigid object freshness, without sacrificing all the benefits of caching. In general, this directive forces caches (both proxy and browser) to submit the request to the origin server for validation before releasing a cached copy, every time. A private (non-shared) cache may cache the response. This allows an origin server to state that the specified parts of the response are intended for only one user and are not a valid response for requests by other users. Indicates that all or part of the response message is intended for a single user and must not be cached by a shared cache. For instance, if your pages are authenticated, this directive makes them cacheable. Indicates that the response may be cached by any cache, even if it would normally be non-cacheable or cacheable only within a non-shared cache. The following Cache-Control directives allow an origin server to override the default cacheability of a response: Control over transformation of entities.īy default, a response is cacheable if the requirements of the request method, request header fields, and the response status indicate that it is cacheable.Controls over cache revalidation and reload these may only be imposed by a user agent.Modifications of the basic expiration mechanism these may be imposed by either the origin server or the user agent.Restrictions on what may be stored by a cache these may be imposed by either the origin server or the user agent.Restrictions on what are cacheable these may only be imposed by the origin server.They can be broken down into the following general categories: HTTP/1.1 introduces a new class of headers, the Cache-Control response headers, which allow web publishers to define how pages should be handled by caches. Next: Validation and Validators Up: Caching Previous: WarningsĪlthough the Expires header is useful, it's still somewhat limited there are many situations where content is cacheable, but the HTTP/1.0 protocol lacks methods of telling caches what it is, or how to work with it.
0 Comments
Leave a Reply. |