source: draft-ietf-httpbis/latest/p6-cache.xml @ 2358

Last change on this file since 2358 was 2358, checked in by julian.reschke@…, 6 years ago

make references more precise (see #492)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 107.1 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
3<!DOCTYPE rfc [
4  <!ENTITY MAY "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MAY</bcp14>">
5  <!ENTITY MUST "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST</bcp14>">
6  <!ENTITY MUST-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>MUST NOT</bcp14>">
7  <!ENTITY OPTIONAL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>OPTIONAL</bcp14>">
8  <!ENTITY RECOMMENDED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>RECOMMENDED</bcp14>">
9  <!ENTITY REQUIRED "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>REQUIRED</bcp14>">
10  <!ENTITY SHALL "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL</bcp14>">
11  <!ENTITY SHALL-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHALL NOT</bcp14>">
12  <!ENTITY SHOULD "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD</bcp14>">
13  <!ENTITY SHOULD-NOT "<bcp14 xmlns='http://purl.org/net/xml2rfc/ext'>SHOULD NOT</bcp14>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "August">
16  <!ENTITY ID-YEAR "2013">
17  <!ENTITY mdash "&#8212;">
18  <!ENTITY Note "<x:h xmlns:x='http://purl.org/net/xml2rfc/ext'>Note:</x:h>">
19  <!ENTITY architecture                "<xref target='Part1' x:rel='#architecture' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
20  <!ENTITY conformance                 "<xref target='Part1' x:rel='#conformance' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
21  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
22  <!ENTITY abnf-extension             "<xref target='Part1' x:rel='#abnf.extension' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
23  <!ENTITY acks                        "<xref target='Part1' x:rel='#acks' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
24  <!ENTITY whitespace                  "<xref target='Part1' x:rel='#whitespace' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
25  <!ENTITY field-components            "<xref target='Part1' x:rel='#field.components' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
26  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
27  <!ENTITY effective-request-uri       "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
28  <!ENTITY messaging                   "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
29  <!ENTITY semantics                   "<xref target='Part2' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
30  <!ENTITY conditional                 "<xref target='Part4' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
31  <!ENTITY partial                     "<xref target='Part5' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
32  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
33  <!ENTITY http-date                   "<xref target='Part2' x:rel='#http.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
34  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
35  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
36  <!ENTITY header-date                 "<xref target='Part2' x:rel='#header.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
37  <!ENTITY header-last-modified        "<xref target='Part4' x:rel='#header.last-modified' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
38  <!ENTITY header-vary                 "<xref target='Part2' x:rel='#header.vary' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
39  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
40  <!ENTITY header-fields               "<xref target='Part1' x:rel='#header.fields' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
41  <!ENTITY GET                         "<xref target='Part2' x:rel='#GET' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
42  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
43  <!ENTITY entity-tags                 "<xref target='Part4' x:rel='#header.etag' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
44  <!ENTITY weak-and-strong             "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
45  <!ENTITY lastmod-comparison          "<xref target='Part4' x:rel='#lastmod.comparison' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
46  <!ENTITY status-codes                "<xref target='Part2' x:rel='#status.codes' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
47  <!ENTITY status.2xx                  "<xref target='Part2' x:rel='#status.2xx' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
48  <!ENTITY transformations             "<xref target='Part1' x:rel='#message.transformations' xmlns:x='http://purl.org/net/xml2rfc/ext'/>">
49]>
50<?rfc toc="yes" ?>
51<?rfc symrefs="yes" ?>
52<?rfc sortrefs="yes" ?>
53<?rfc compact="yes"?>
54<?rfc subcompact="no" ?>
55<?rfc linkmailto="no" ?>
56<?rfc editing="no" ?>
57<?rfc comments="yes"?>
58<?rfc inline="yes"?>
59<?rfc rfcedstyle="yes"?>
60<?rfc-ext allow-markup-in-artwork="yes" ?>
61<?rfc-ext include-references-in-index="yes" ?>
62<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
63  obsoletes="2616" x:maturity-level="proposed" xmlns:x="http://purl.org/net/xml2rfc/ext">
64<x:link rel="prev" basename="p5-range"/>
65<x:link rel="next" basename="p7-auth"/>
66<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
67<front>
68
69  <title abbrev="HTTP/1.1 Caching">Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
70
71  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
72    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
73    <address>
74      <postal>
75        <street>345 Park Ave</street>
76        <city>San Jose</city>
77        <region>CA</region>
78        <code>95110</code>
79        <country>USA</country>
80      </postal>
81      <email>fielding@gbiv.com</email>
82      <uri>http://roy.gbiv.com/</uri>
83    </address>
84  </author>
85
86  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
87    <organization>Akamai</organization>
88    <address>
89      <email>mnot@mnot.net</email>
90      <uri>http://www.mnot.net/</uri>
91    </address>
92  </author>
93
94  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
95    <organization abbrev="greenbytes">greenbytes GmbH</organization>
96    <address>
97      <postal>
98        <street>Hafenweg 16</street>
99        <city>Muenster</city><region>NW</region><code>48155</code>
100        <country>Germany</country>
101      </postal>
102      <email>julian.reschke@greenbytes.de</email>
103      <uri>http://greenbytes.de/tech/webdav/</uri>
104    </address>
105  </author>
106
107  <date month="&ID-MONTH;" year="&ID-YEAR;" />
108  <workgroup>HTTPbis Working Group</workgroup>
109
110<abstract>
111<t>
112   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
113   distributed, collaborative, hypertext information systems. This document
114   defines requirements on HTTP caches and the associated header fields
115   that control cache behavior or indicate cacheable response messages.
116</t>
117</abstract>
118
119<note title="Editorial Note (To be removed by RFC Editor)">
120  <t>
121    Discussion of this draft takes place on the HTTPBIS working group
122    mailing list (ietf-http-wg@w3.org), which is archived at
123    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
124  </t>
125  <t>
126    The current issues list is at
127    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
128    documents (including fancy diffs) can be found at
129    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
130  </t>
131  <t>
132    The changes in this draft are summarized in <xref target="changes.since.23"/>.
133  </t>
134</note>
135
136   </front>
137   <middle>
138
139<section anchor="caching" title="Introduction">
140<t>
141   HTTP is typically used for distributed information systems, where
142   performance can be improved by the use of response caches. This document
143   defines aspects of HTTP/1.1 related to caching and reusing response
144   messages.
145</t>
146
147<iref item="cache" />
148<t>
149   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the
150   subsystem that controls storage, retrieval, and deletion of messages in it.
151   A cache stores cacheable responses in order to reduce the response time and
152   network bandwidth consumption on future, equivalent requests. Any client or
153   server &MAY; employ a cache, though a cache cannot be used by a server that
154   is acting as a tunnel.
155</t>
156<iref item="shared cache" />
157<iref item="private cache" />
158<t anchor="shared.and.non-shared.caches">
159   A <x:dfn>shared cache</x:dfn> is a cache that stores responses to be reused
160   by more than one user; shared caches are usually (but not always) deployed
161   as a part of an intermediary. A <x:dfn>private cache</x:dfn>, in contrast,
162   is dedicated to a single user.
163</t>
164<t>
165   The goal of caching in HTTP/1.1 is to significantly improve performance
166   by reusing a prior response message to satisfy a current request.
167   A stored response is considered "fresh", as defined in
168   <xref target="expiration.model" />, if the response can be reused without
169   "validation" (checking with the origin server to see if the cached response
170   remains valid for this request).  A fresh response can therefore
171   reduce both latency and network overhead each time it is reused.
172   When a cached response is not fresh, it might still be reusable if it can
173   be freshened by validation (<xref target="validation.model" />) or if the
174   origin is unavailable (<xref target="serving.stale.responses" />).
175</t>
176
177<section title="Conformance and Error Handling" anchor="conformance">
178<t>
179   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
180   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
181   document are to be interpreted as described in <xref target="RFC2119"/>.
182</t>
183<t>
184   Conformance criteria and considerations regarding error handling
185   are defined in &conformance;.
186</t>
187</section>
188
189<section title="Syntax Notation" anchor="notation">
190<t>
191   This specification uses the Augmented Backus-Naur Form (ABNF) notation
192   of <xref target="RFC5234"/> with the list rule extension defined in
193   &abnf-extension;. <xref target="imported.abnf"/> describes rules imported from
194   other documents. <xref target="collected.abnf"/> shows the collected ABNF
195   with the list rule expanded.
196</t>
197
198<section title="Delta Seconds" anchor="delta-seconds">
199<t>
200   The delta-seconds rule specifies a non-negative integer, representing time
201   in seconds.
202</t>
203<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
204  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
205</artwork></figure>
206<t>
207   If a cache receives a delta-seconds value larger than the largest
208   positive integer it can represent, or if any of its subsequent calculations
209   overflows, it &MUST; consider the value to be 2147483648
210   (2<x:sup>31</x:sup>). Recipients parsing a delta-seconds value &MUST; use
211   an arithmetic type of at least 31 bits of range, and senders &MUST-NOT;
212   generate delta-seconds with a value greater than 2147483648.
213</t>
214</section>
215
216</section>
217</section>
218
219<section anchor="caching.overview" title="Overview of Cache Operation">
220<iref item="cache entry" />
221<iref item="cache key" />
222<t>
223   Proper cache operation preserves the semantics of HTTP transfers
224   (&semantics;) while eliminating the transfer of information already held
225   in the cache.  Although caching is an entirely &OPTIONAL; feature of HTTP,
226   we assume that reusing the cached response is desirable and that such
227   reuse is the default behavior when no requirement or local
228   configuration prevents it.  Therefore, HTTP cache requirements are focused
229   on preventing a cache from either storing a non-reusable response or
230   reusing a stored response inappropriately, rather than mandating that
231   caches always store and reuse particular responses.
232</t>
233<t>
234   Each <x:dfn>cache entry</x:dfn> consists of a cache key and one or more
235   HTTP responses corresponding to prior requests that used the same key. The
236   most common form of cache entry is a successful result of a retrieval
237   request: i.e., a <x:ref>200 (OK)</x:ref> response to a GET request, which
238   contains a representation of the resource identified by the request target
239   (&GET;). However, it is also possible to cache permanent redirects,
240   negative results (e.g., <x:ref>404 (Not Found)</x:ref>),
241   incomplete results (e.g., <x:ref>206 (Partial Content)</x:ref>), and
242   responses to methods other than GET if the method's definition allows such
243   caching and defines something suitable for use as a cache key.
244</t>
245<iref item="cache key" />
246<t>
247   The primary <x:dfn>cache key</x:dfn> consists of the request method and
248   target URI.  However, since HTTP caches in common use today are typically
249   limited to caching responses to GET, many caches simply decline
250   other methods and use only the URI as the primary cache key.
251</t>
252<t>
253   If a request target is subject to content negotiation, its cache entry
254   might consist of multiple stored responses, each differentiated by a
255   secondary key for the values of the original request's selecting header
256   fields (<xref target="caching.negotiated.responses"/>).
257</t>
258</section>
259
260<section anchor="response.cacheability" title="Storing Responses in Caches">
261<t>
262   A cache &MUST-NOT; store a response to any request, unless:
263   <list style="symbols">
264      <t>The request method is understood by the cache and defined as being
265      cacheable, and</t>
266      <t>the response status code is understood by the cache, and</t>
267      <t>the "no-store" cache directive (see <xref
268      target="header.cache-control" />) does not appear in request or response
269      header fields, and</t>
270      <t>the "private" cache response directive (see <xref
271      target="cache-response-directive.private" />) does not appear in the
272      response, if the cache is shared, and</t>
273      <t>the <x:ref>Authorization</x:ref> header field (see
274      &header-authorization;) does not appear in the request, if the cache is
275      shared, unless the response explicitly allows it (see <xref
276      target="caching.authenticated.responses" />), and</t>
277      <t>the response either:
278         <list style="symbols">
279            <t>contains an <x:ref>Expires</x:ref> header field (see
280            <xref target="header.expires"/>), or</t>
281            <t>contains a max-age response cache directive (see <xref
282            target="cache-response-directive.max-age" />), or</t>
283            <t>contains a s-maxage response cache directive (see <xref
284            target="cache-response-directive.s-maxage" />) and the cache is
285            shared, or</t>
286            <t>contains a Cache Control Extension (see <xref
287            target="cache.control.extensions" />) that allows it to be cached,
288            or</t>
289            <t>has a status code that is defined as cacheable
290            (see <xref target="heuristic.freshness" />), or</t>
291            <t>contains a public response cache directive (see <xref
292            target="cache-response-directive.public"/>).</t>
293         </list>
294      </t>
295   </list>
296</t>
297<t>
298   Note that any of the requirements listed above can be overridden by a
299   cache-control extension; see <xref target="cache.control.extensions" />.
300</t>
301<t>
302   In this context, a cache has "understood" a request method or a response
303   status code if it recognizes it and implements all specified
304   caching-related behavior.
305</t>
306<t>
307   Note that, in normal operation, some caches will not store a response that
308   has neither a cache validator nor an explicit expiration time, as such
309   responses are not usually useful to store. However, caches are not
310   prohibited from storing such responses.
311</t>
312
313<section anchor="incomplete.responses" title="Storing Incomplete Responses">
314<t>
315   A response message is considered complete when all of the octets indicated
316   by the message framing (&messaging;) are received prior to the connection
317   being closed. If the request is GET, the response status is <x:ref>200
318   (OK)</x:ref>, and the entire response header block has been received, a
319   cache &MAY; store an incomplete response message body if the cache entry is
320   recorded as incomplete. Likewise, a <x:ref>206 (Partial Content)</x:ref>
321   response &MAY; be stored as if it were an incomplete <x:ref>200
322   (OK)</x:ref> cache entry. However, a cache &MUST-NOT; store incomplete or
323   partial content responses if it does not support the <x:ref>Range</x:ref>
324   and <x:ref>Content-Range</x:ref> header fields or if it does not understand
325   the range units used in those fields.
326</t>
327<t>
328   A cache &MAY; complete a stored incomplete response by making a subsequent
329   range request (&partial;) and combining the successful response with the
330   stored entry, as defined in <xref target="combining.responses"/>. A cache
331   &MUST-NOT; use an incomplete response to answer requests unless the
332   response has been made complete or the request is partial and specifies a
333   range that is wholly within the incomplete response. A cache &MUST-NOT;
334   send a partial response to a client without explicitly marking it as such
335   using the <x:ref>206 (Partial Content)</x:ref> status code.
336</t>
337</section>
338
339
340<section anchor="caching.authenticated.responses" 
341   title="Storing Responses to Authenticated Requests">
342<t>
343   A shared cache &MUST-NOT; use a cached response to a request with an
344   <x:ref>Authorization</x:ref> header field (&header-authorization;) to
345   satisfy any subsequent request unless a cache directive that allows such
346   responses to be stored is present in the response.
347</t>
348<t>
349   In this specification, the following <x:ref>Cache-Control</x:ref> response
350   directives (<xref target="cache-response-directive"/>) have such an effect:
351   must-revalidate, public, s-maxage.
352</t>
353<t>
354   Note that cached responses that contain the "must-revalidate" and/or
355   "s-maxage" response directives are not allowed to be served stale (<xref
356   target="serving.stale.responses"/>) by shared caches. In particular, a
357   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
358   used to satisfy a subsequent request without revalidating it on the origin
359   server.
360</t>
361</section>
362
363<section anchor="combining.responses" title="Combining Partial Content">
364<t>
365   A response might transfer only a partial representation if the
366   connection closed prematurely or if the request used one or more Range
367   specifiers (&partial;).  After several such transfers, a cache might have
368   received several ranges of the same representation.  A cache &MAY; combine
369   these ranges into a single stored response, and reuse that response to
370   satisfy later requests, if they all share the same strong validator and
371   the cache complies with the client requirements in &combining-byte-ranges;.
372</t>
373<t>
374   When combining the new response with one or more stored responses, a
375   cache &MUST;:
376   <list style="symbols">
377      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
378         with warn-code 1xx (see <xref target="header.warning" />);</t>
379      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
380         with warn-code 2xx; and,</t>
381      <t>use other header fields provided in the new response, aside
382         from <x:ref>Content-Range</x:ref>, to replace all instances of the
383         corresponding header fields in the stored response.</t>
384   </list>
385</t>
386</section>
387
388</section>
389
390
391<section anchor="constructing.responses.from.caches" 
392   title="Constructing Responses from Caches">
393<t>
394   When presented with a request, a cache &MUST-NOT; reuse a stored response,
395   unless:
396   <list style="symbols">
397      <t>The presented effective request URI (&effective-request-uri;) and
398      that of the stored response match, and</t>
399      <t>the request method associated with the stored response allows it to
400      be used for the presented request, and</t>
401      <t>selecting header fields nominated by the stored response (if any)
402      match those presented (see <xref target="caching.negotiated.responses"
403      />), and</t>
404      <t>the presented request does not contain the no-cache pragma (<xref
405      target="header.pragma"/>), nor the no-cache cache directive (<xref
406      target="cache-request-directive"/>), unless the stored response is
407      successfully validated (<xref target="validation.model"/>), and</t>
408      <t>the stored response does not contain the no-cache cache directive
409      (<xref target="cache-response-directive.no-cache"/>), unless it is
410      successfully validated (<xref target="validation.model"/>), and</t>
411      <t>the stored response is either:
412         <list style="symbols">
413            <t>fresh (see <xref target="expiration.model" />), or</t>
414            <t>allowed to be served stale (see <xref
415            target="serving.stale.responses" />), or</t>
416            <t>successfully validated (see <xref target="validation.model"
417            />).</t>
418         </list>
419      </t>
420  </list>
421</t>
422<t>
423   Note that any of the requirements listed above can be overridden by a
424   cache-control extension; see <xref target="cache.control.extensions" />.
425</t>
426<t>
427   When a stored response is used to satisfy a request without validation, a
428   cache &MUST; generate an <x:ref>Age</x:ref> header field (<xref
429   target="header.age"/>), replacing any present in the response with a value
430   equal to the stored response's current_age; see <xref
431   target="age.calculations" />.
432</t>
433<t>
434   A cache &MUST; write through requests with methods that are unsafe
435   (&safe-methods;) to the origin server; i.e., a cache is not allowed to
436   generate a reply to such a request before having forwarded the request and
437   having received a corresponding response.
438</t>
439<t>
440   Also, note that unsafe requests might invalidate already stored responses;
441   see <xref target="invalidation.after.updates.or.deletions" />.
442</t>
443<t>
444   When more than one suitable response is stored, a cache &MUST; use the
445   most recent response (as determined by the <x:ref>Date</x:ref> header
446   field). It can also forward the request with "Cache-Control: max-age=0" or
447   "Cache-Control: no-cache" to disambiguate which response to use.
448</t>
449<t>
450   A cache that does not have a clock available &MUST-NOT; use stored
451   responses without revalidating them upon every use.
452</t>
453
454
455<section anchor="expiration.model" title="Freshness">
456<iref item="fresh" />
457<iref item="stale" />
458<t>
459   A <x:dfn>fresh</x:dfn> response is one whose age has not yet exceeded its
460   freshness lifetime. Conversely, a <x:dfn>stale</x:dfn>
461   response is one where it has.
462</t>
463<iref item="freshness lifetime" />
464<iref item="explicit expiration time" />
465<iref item="heuristic expiration time" />
466<t>
467   A response's <x:dfn>freshness lifetime</x:dfn> is the length of time
468   between its generation by the origin server and its expiration time. An
469   <x:dfn>explicit expiration time</x:dfn> is the time at which the origin
470   server intends that a stored response can no longer be used by a cache
471   without further validation, whereas a <x:dfn>heuristic expiration
472   time</x:dfn> is assigned by a cache when no explicit expiriation time is
473   available.
474</t>
475<iref item="age" />
476<t>
477   A response's <x:dfn>age</x:dfn> is the time that has passed since it was
478   generated by, or successfully validated with, the origin server. 
479</t>
480<t>
481   When a response is "fresh" in the cache, it can be used to satisfy
482   subsequent requests without contacting the origin server, thereby improving
483   efficiency.
484</t>
485<t>
486   The primary mechanism for determining freshness is for an origin server to
487   provide an explicit expiration time in the future, using either the
488   <x:ref>Expires</x:ref> header field (<xref target="header.expires" />) or
489   the max-age response cache directive (<xref
490   target="cache-response-directive.max-age" />). Generally, origin servers
491   will assign future explicit expiration times to responses in the belief
492   that the representation is not likely to change in a semantically
493   significant way before the expiration time is reached.
494</t>
495<t>
496   If an origin server wishes to force a cache to validate every request, it
497   can assign an explicit expiration time in the past to indicate that the
498   response is already stale. Compliant caches will normally validate a stale
499   cached response before reusing it for subsequent requests (see <xref
500   target="serving.stale.responses" />).
501</t>
502<t>
503   Since origin servers do not always provide explicit expiration times,
504   caches are also allowed to use a heuristic to determine an expiration time
505   under certain circumstances (see <xref target="heuristic.freshness"/>).
506</t>
507<figure>
508<preamble>
509  The calculation to determine if a response is fresh is:
510</preamble>
511<artwork type="code">
512   response_is_fresh = (freshness_lifetime &gt; current_age)
513</artwork>
514</figure>
515<t>
516   freshness_lifetime is defined in <xref
517   target="calculating.freshness.lifetime" />; current_age is defined in
518   <xref target="age.calculations" />.
519</t>
520<t>
521   Clients can send the max-age or min-fresh cache directives in a request to
522   constrain or relax freshness calculations for the corresponding response
523   (<xref target="cache-request-directive" />).
524</t>
525<t>
526   When calculating freshness, to avoid common problems in date parsing:
527</t>
528<t>
529  <list style="symbols">
530     <t>Although all date formats are specified to be case-sensitive,
531        cache recipients &SHOULD; match day, week and timezone names
532        case-insensitively.</t>
533             
534     <t>If a cache recipient's internal implementation of time has less
535        resolution than the value of an HTTP-date, the recipient &MUST;
536        internally represent a parsed <x:ref>Expires</x:ref> date as the
537        nearest time equal to or earlier than the received value.</t>
538
539     <t>Cache recipients &MUST-NOT; allow local time zones to influence the
540        calculation or comparison of an age or expiration time.</t>
541
542     <t>Cache recipients &SHOULD; consider a date with a zone abbreviation
543        other than "GMT" to be invalid for calculating expiration.</t>
544  </list>
545</t>
546<t>
547   Note that freshness applies only to cache operation; it cannot be used to
548   force a user agent to refresh its display or reload a resource. See <xref
549   target="history.lists" /> for an explanation of the difference between
550   caches and history mechanisms.
551</t>
552
553<section anchor="calculating.freshness.lifetime" 
554   title="Calculating Freshness Lifetime">
555<t>
556   A cache can calculate the freshness lifetime (denoted as
557   freshness_lifetime) of a response by using the first match of:
558   <list style="symbols">
559      <t>If the cache is shared and the s-maxage response cache directive
560      (<xref target="cache-response-directive.s-maxage" />) is present, use its value,
561      or</t>
562      <t>If the max-age response cache directive (<xref
563      target="cache-response-directive.max-age" />) is present, use its value, or</t>
564      <t>If the <x:ref>Expires</x:ref> response header field
565      (<xref target="header.expires" />) is present, use its value minus the
566      value of the <x:ref>Date</x:ref> response header field, or</t>
567      <t>Otherwise, no explicit expiration time is present in the response. A
568      heuristic freshness lifetime might be applicable; see <xref
569      target="heuristic.freshness" />.</t>
570   </list>
571</t>
572<t>
573   Note that this calculation is not vulnerable to clock skew, since all of
574   the information comes from the origin server.
575</t>
576<t>
577   When there is more than one value present for a given directive (e.g., two
578   <x:ref>Expires</x:ref> header fields, multiple Cache-Control: max-age
579   directives), the directive's value is considered invalid. Caches are
580   encouraged to consider responses that have invalid freshness information to
581   be stale.
582</t>
583</section>
584
585<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
586<t>
587   Since origin servers do not always provide explicit expiration times, a
588   cache &MAY; assign a heuristic expiration time when an explicit time is not
589   specified, employing algorithms that use other header field values (such as
590   the <x:ref>Last-Modified</x:ref> time) to estimate a plausible expiration
591   time. This specification does not provide specific algorithms, but does
592   impose worst-case constraints on their results.
593</t>
594<t>
595   A cache &MUST-NOT; use heuristics to determine freshness when an explicit
596   expiration time is present in the stored response. Because of the
597   requirements in <xref target="response.cacheability"/>, this means that,
598   effectively, heuristics can only be used on responses without explicit
599   freshness whose status codes are defined as cacheable, and responses
600   without explicit freshness that have been marked as explicitly cacheable
601   (e.g., with a "public" response cache directive).
602</t>
603<t>
604   If the response has a <x:ref>Last-Modified</x:ref> header field
605   (&header-last-modified;), caches are encouraged to use a heuristic
606   expiration value that is no more than some fraction of the interval since
607   that time. A typical setting of this fraction might be 10%.
608</t>
609<t>
610   When a heuristic is used to calculate freshness lifetime, a cache &SHOULD;
611   attach a <x:ref>Warning</x:ref> header field with a 113 warn-code to the
612   response if its current_age is more than 24 hours and such a warning is not
613   already present.
614</t>
615<x:note>
616   <t>
617      &Note; <xref target="RFC2616" x:fmt="of" x:sec="13.9"/> prohibited caches
618      from calculating heuristic freshness for URIs with query components
619      (i.e., those containing '?'). In practice, this has not been widely
620      implemented. Therefore, origin servers are encouraged to send explicit
621      directives (e.g., Cache-Control: no-cache) if they wish to preclude
622      caching.
623   </t>
624</x:note>
625</section>
626
627<section anchor="age.calculations" title="Calculating Age">
628<t>
629   The <x:ref>Age</x:ref> header field is used to convey an estimated
630   age of the response message when obtained from a cache. The Age field value
631   is the cache's estimate of the number of seconds since the response was
632   generated or validated by the origin server. In essence, the Age value is
633   the sum of the time that the response has been resident in each of the
634   caches along the path from the origin server, plus the amount of time it
635   has been in transit along network paths.
636</t>
637<t>
638   The following data is used for the age calculation:
639</t>
640<t>
641   <x:dfn>age_value</x:dfn>
642   <list>
643      <t>
644         The term "age_value" denotes the value of the <x:ref>Age</x:ref>
645         header field (<xref target="header.age"/>), in a form appropriate for
646         arithmetic operation; or 0, if not available.
647      </t>
648   </list>
649</t>
650<t>
651   <x:dfn>date_value</x:dfn>
652   <list>
653      <t>
654         The term "date_value" denotes the value of
655         the Date header field, in a form appropriate for arithmetic
656         operations. See &header-date; for the definition of the Date header
657         field, and for requirements regarding responses without it.
658      </t>
659   </list>
660</t>
661<t>
662   <x:dfn>now</x:dfn>
663   <list>
664      <t>
665         The term "now" means "the current value of the clock at the host
666         performing the calculation". A host ought to use NTP (<xref
667         target="RFC1305"/>) or some similar protocol to synchronize its
668         clocks to Coordinated Universal Time.
669      </t>
670   </list>
671</t>
672<t>
673   <x:dfn>request_time</x:dfn>
674   <list>
675      <t>
676         The current value of the clock at the host at the time the request
677         resulting in the stored response was made.
678      </t>
679   </list>
680</t>
681<t>
682   <x:dfn>response_time</x:dfn>
683   <list>
684      <t>
685         The current value of the clock at the host at the time the response
686         was received.
687      </t>
688   </list>
689</t>
690<t>
691   A response's age can be calculated in two entirely independent ways:
692   <list style="numbers">
693      <t>the "apparent_age": response_time minus date_value, if the local
694      clock is reasonably well synchronized to the origin server's clock. If
695      the result is negative, the result is replaced by zero.</t>
696      <t>the "corrected_age_value", if all of the caches along the response
697      path implement HTTP/1.1. A cache &MUST; interpret this value relative
698      to the time the request was initiated, not the time that the response
699      was received.</t>
700   </list>
701</t>
702<figure>
703<artwork type="code">
704  apparent_age = max(0, response_time - date_value);
705
706  response_delay = response_time - request_time;
707  corrected_age_value = age_value + response_delay; 
708</artwork>
709</figure>
710<figure>
711<preamble>These are combined as</preamble>
712<artwork type="code">
713  corrected_initial_age = max(apparent_age, corrected_age_value);
714</artwork></figure>
715<t>
716   unless the cache is confident in the value of the <x:ref>Age</x:ref> header
717   field (e.g., because there are no HTTP/1.0 hops in the <x:ref>Via</x:ref>
718   header field), in which case the corrected_age_value &MAY; be used as the
719   corrected_initial_age.
720</t>
721<t>
722   The current_age of a stored response can then be calculated by adding the
723   amount of time (in seconds) since the stored response was last validated by
724   the origin server to the corrected_initial_age.
725</t>
726<figure><artwork type="code">
727  resident_time = now - response_time;
728  current_age = corrected_initial_age + resident_time;
729</artwork></figure>
730</section>
731
732<section anchor="serving.stale.responses" title="Serving Stale Responses">
733<t>
734   A "stale" response is one that either has explicit expiry information or is
735   allowed to have heuristic expiry calculated, but is not fresh according to
736   the calculations in <xref target="expiration.model" />.
737</t>
738<t>
739   A cache &MUST-NOT; generate a stale response if it is prohibited by an
740   explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache
741   directive, a "must-revalidate" cache-response-directive, or an applicable
742   "s-maxage" or "proxy-revalidate" cache-response-directive; see <xref
743   target="cache-response-directive"/>).
744</t>
745<t>
746   A cache &MUST-NOT; send stale responses unless it is disconnected
747   (i.e., it cannot contact the origin server or otherwise find a forward
748   path) or doing so is explicitly allowed (e.g., by the max-stale request
749   directive; see <xref target="cache-request-directive" />).
750</t>
751<t>
752   A cache &SHOULD; append a <x:ref>Warning</x:ref> header field with the 110
753   warn-code (see <xref target="header.warning"/>) to stale responses.
754   Likewise, a cache &SHOULD; add the 112 warn-code to stale responses if the
755   cache is disconnected.
756</t>
757<iref item="first-hand" />
758<t>
759   Note that if a cache receives a <x:dfn>first-hand</x:dfn> response (one
760   where the freshness model is not in use; i.e., its age is 0, whether it is
761   an entire response, or a <x:ref>304 (Not Modified)</x:ref> response) that
762   it would normally forward to the requesting client, and the received
763   response is no longer fresh, the cache &MAY; forward it to the requesting
764   client without adding a new <x:ref>Warning</x:ref> (but without removing
765   any existing Warning header fields). A cache ought not attempt to validate
766   a response simply because that response became stale in transit.
767</t>
768</section>
769</section>
770
771<section anchor="validation.model" title="Validation">
772<t>
773   When a cache has one or more stored responses for a requested URI, but
774   cannot serve any of them (e.g., because they are not fresh, or one cannot
775   be selected; see <xref target="caching.negotiated.responses"/>), it can use
776   the conditional request mechanism &conditional; in the forwarded request to
777   give the origin server an opportunity to both select a valid stored
778   response to be used, and to update it. This process is known as
779   "validating" or "revalidating" the stored response.
780</t>
781<iref item="validator" />
782<t>
783   When sending such a conditional request, a cache adds a
784   <x:dfn>validator</x:dfn> (or more than one), that is used to find
785   out whether a stored response is an equivalent copy of a current
786   representation of the resource.
787</t>
788<t>
789   One such validator is the <x:ref>If-Modified-Since</x:ref> header field,
790   whose value is that of the <x:ref>Last-Modified</x:ref> header field from
791   the selected (see <xref target="caching.negotiated.responses"/>) stored
792   response, if available.
793</t>
794<t>
795   Another is the <x:ref>If-None-Match</x:ref> header field,
796   whose value is that of the <x:ref>ETag</x:ref> header field(s) from
797   relevant responses stored for the primary cache key, if present. However,
798   if any of the stored responses contains only partial content, the cache
799   ought not include its entity-tag in the If-None-Match header field unless
800   the request is for a range that would be fully satisfied by that stored
801   response.
802</t>
803
804<t>Cache handling of a response to a conditional request is dependent upon its
805status code:</t>
806
807<t>
808   <list style="symbols">
809      <t>
810         A <x:ref>304 (Not Modified)</x:ref> response status code indicates
811         that the stored response can be updated and reused; see <xref
812         target="freshening.responses"/>.
813      </t>
814      <t>
815         A full response (i.e., one with a payload body) indicates that none
816         of the stored responses nominated in the conditional request is
817         suitable. Instead, the cache can use the full response to
818         satisfy the request and &MAY; replace the stored response(s).
819      </t>
820      <t>
821         However, if a cache receives a <x:ref>5xx (Server Error)</x:ref>
822         response while attempting to validate a response, it can either
823         forward this response to the requesting client, or act as if the
824         server failed to respond. In the latter case, it can send a
825         previously stored response (see <xref
826         target="serving.stale.responses" />).
827      </t>
828   </list>
829</t>
830
831<section anchor="freshening.responses" title="Freshening Stored Responses upon Validation">
832<t>
833   When a cache receives a <x:ref>304 (Not Modified)</x:ref> response and
834   already has one or more stored <x:ref>200 (OK)</x:ref> responses for the
835   same cache key, the cache needs to identify which of the stored responses
836   are updated by this new response and then update the stored response(s)
837   with the new information provided in the <x:ref>304</x:ref> response.
838</t>
839<iref item="strong validator" />
840<t>
841   The stored response to update is identified by using the first match (if
842   any) of:
843   <list style="symbols">
844    <t>
845     If the new response contains a <x:dfn>strong validator</x:dfn> (see
846     &weak-and-strong;), then that strong validator identifies the selected
847     representation for update. All of the stored responses with the same
848     strong validator are selected. If none of the stored responses contain the
849     same strong validator, then the cache &MUST-NOT; use the new response to
850     update any stored responses.
851    </t>
852    <t>
853     If the new response contains a weak validator and that validator
854     corresponds to one of the cache's stored responses, then the most
855     recent of those matching stored responses is selected for update.
856    </t>
857    <t>
858     If the new response does not include any form of validator (such as in
859     the case where a client generates an If-Modified-Since request from a
860     source other than the Last-Modified response header field), and there is
861     only one stored response, and that stored response also lacks a
862     validator, then that stored response is selected for update.
863    </t>
864   </list>
865</t>
866<t>
867   If a stored response is selected for update, the cache &MUST;:
868   <list style="symbols">
869      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
870         with warn-code 1xx (see <xref target="header.warning" />);</t>
871      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
872         with warn-code 2xx; and,</t>
873      <t>use other header fields provided in the <x:ref>304 (Not Modified)</x:ref>
874         response to replace all instances of the corresponding header
875         fields in the stored response.</t>
876   </list>
877</t>
878</section>
879
880</section>
881
882<section anchor="caching.negotiated.responses" 
883   title="Calculating Secondary Keys with Vary">
884<t>
885   When a cache receives a request that can be satisfied by a stored response
886   that has a <x:ref>Vary</x:ref> header field (&header-vary;),
887   it &MUST-NOT; use that response unless all of the selecting header fields
888   nominated by the Vary header field match in both the original request
889   (i.e., that associated with the stored response), and the presented
890   request.
891</t>
892<t>
893   The selecting header fields from two requests are defined to match if and
894   only if those in the first request can be transformed to those in the
895   second request by applying any of the following:
896   <list style="symbols">
897      <t>
898         adding or removing whitespace, where allowed in the header field's
899         syntax
900      </t>
901      <t>
902         combining multiple header fields with the same field name
903         (see &header-fields;)
904      </t>
905      <t>
906         normalizing both header field values in a way that is known to have
907         identical semantics, according to the header field's specification
908         (e.g., re-ordering field values when order is not significant;
909         case-normalization, where values are defined to be case-insensitive)
910      </t>
911  </list>
912</t>
913<t>
914   If (after any normalization that might take place) a header field is absent
915   from a request, it can only match another request if it is also absent
916   there.
917</t>
918<t>
919   A <x:ref>Vary</x:ref> header field-value of "*" always fails to match.
920</t>
921<t>
922   The stored response with matching selecting header fields is known as the
923   selected response.
924</t>
925<t>
926   If multiple selected responses are available (potentially including
927   responses without a Vary header field), the cache will need to choose one to use.
928   When a selecting header field has a known mechanism for doing so (e.g., qvalues on
929   <x:ref>Accept</x:ref> and similar request header fields), that mechanism &MAY; be
930   used to select preferred responses; of the remainder, the most recent
931   response (as determined by the <x:ref>Date</x:ref> header field) is used, as
932   per <xref target="constructing.responses.from.caches"/>.
933</t>
934<t>
935   If no selected response is available, the cache cannot satisfy the
936   presented request. Typically, it is forwarded to the origin server
937   in a (possibly conditional; see <xref target="validation.model"/>) request.
938</t>
939</section>
940
941</section>
942
943
944<section anchor="head.effects" title="Updating Caches with HEAD Responses">
945<t>
946   A response to the HEAD method is identical to what an equivalent request
947   made with a GET would have been, except it lacks a body. This property
948   of HEAD responses is used to both invalidate and update cached GET
949   responses.
950</t>
951<t>
952   If one or more stored GET responses can be selected (as per <xref
953   target="caching.negotiated.responses"/>) for a HEAD request, and the
954   <x:ref>Content-Length</x:ref>, <x:ref>ETag</x:ref> or
955   <x:ref>Last-Modified</x:ref> value of a HEAD response differs from that in a
956   selected GET response, the cache &MUST; consider that selected response to
957   be stale.
958</t>
959<t>
960   If the <x:ref>Content-Length</x:ref>, <x:ref>ETag</x:ref> and
961   <x:ref>Last-Modified</x:ref> values of a HEAD response (when present) are
962   the same as that in a selected GET response (as per
963   <xref target="caching.negotiated.responses"/>), the cache &SHOULD; update
964   the remaining header fields in the stored response using the following
965   rules:
966   <list style="symbols">
967      <t>delete any <x:ref>Warning</x:ref> header fields in the stored response
968         with warn-code 1xx (see <xref target="header.warning" />);</t>
969      <t>retain any <x:ref>Warning</x:ref> header fields in the stored response
970         with warn-code 2xx; and,</t>
971      <t>use other header fields provided in the response to replace
972         all instances of the corresponding header fields in the stored
973         response.</t>
974   </list>
975</t>
976
977</section>
978
979
980<section anchor="invalidation.after.updates.or.deletions" 
981   title="Request Methods that Invalidate">
982<t>
983   Because unsafe request methods (&safe-methods;) such as PUT, POST or DELETE
984   have the potential for changing state on the origin server, intervening
985   caches can use them to keep their contents up-to-date.
986</t>
987<t>
988   A cache &MUST; invalidate the effective Request URI
989   (&effective-request-uri;) as well as the URI(s) in the
990   <x:ref>Location</x:ref> and <x:ref>Content-Location</x:ref> response header
991   fields (if present) when a non-error response to a request with an unsafe
992   method is received.
993</t>
994<t>
995   However, a cache &MUST-NOT; invalidate a URI from a <x:ref>Location</x:ref>
996   or <x:ref>Content-Location</x:ref> response header field if the host part of
997   that URI differs from the host part in the effective request URI
998   (&effective-request-uri;). This helps prevent denial of service attacks.
999</t>
1000<t>
1001   A cache &MUST; invalidate the effective request URI
1002   (&effective-request-uri;) when it receives a non-error response
1003   to a request with a method whose safety is unknown.
1004</t>
1005<t>
1006   Here, a "non-error response" is one with a <x:ref>2xx (Successful)</x:ref>
1007   or <x:ref>3xx (Redirection)</x:ref> status code. "Invalidate" means that
1008   the cache will either remove all stored responses related to the effective
1009   request URI, or will mark these as "invalid" and in need of a mandatory
1010   validation before they can be sent in response to a subsequent request.
1011</t>
1012<t>
1013   Note that this does not guarantee that all appropriate responses are
1014   invalidated. For example, a state-changing request might invalidate
1015   responses in the caches it travels through, but relevant responses still
1016   might be stored in other caches that it has not.</t>
1017</section>
1018
1019
1020
1021
1022<section anchor="header.field.definitions" title="Header Field Definitions">
1023<t>
1024   This section defines the syntax and semantics of HTTP/1.1 header fields
1025   related to caching.
1026</t>
1027
1028<section anchor="header.age" title="Age">
1029   <iref item="Age header field" primary="true" x:for-anchor="" />
1030   <x:anchor-alias value="Age"/>
1031   <x:anchor-alias value="age-value"/>
1032<t>
1033   The "Age" header field conveys the sender's estimate of the amount
1034   of time since the response was generated or successfully validated at the
1035   origin server. Age values are calculated as specified in <xref
1036   target="age.calculations" />.
1037</t>
1038<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/>
1039  <x:ref>Age</x:ref> = <x:ref>delta-seconds</x:ref>
1040</artwork></figure>
1041<t>
1042  Age field-values are non-negative integers, representing time in seconds
1043  (see <xref target="delta-seconds"/>).
1044</t>
1045<t>
1046   The presence of an Age header field in a response implies that a response
1047   is not first-hand. However, the converse is not true, since HTTP/1.0 caches
1048   might not implement the Age header field.
1049</t>
1050</section>
1051
1052<section anchor="header.cache-control" title="Cache-Control">
1053   <iref item="Cache-Control header field" primary="true" x:for-anchor="" />
1054   <x:anchor-alias value="Cache-Control"/>
1055   <x:anchor-alias value="cache-directive"/>
1056<t>
1057   The "Cache-Control" header field is used to specify directives for
1058   caches along the request/response chain. Such cache directives are
1059   unidirectional in that the presence of a directive in a request does not
1060   imply that the same directive is to be given in the response.
1061</t>
1062<t>
1063   A cache &MUST; obey the requirements of the Cache-Control
1064   directives defined in this section. See <xref
1065   target="cache.control.extensions"/> for information about how Cache-Control
1066   directives defined elsewhere are handled.
1067</t>
1068<x:note>
1069   <t>
1070       &Note; Some HTTP/1.0 caches might not implement Cache-Control.
1071   </t>
1072</x:note>
1073<t>
1074   A proxy, whether or not it implements a cache, &MUST; pass cache directives
1075   through in forwarded messages, regardless of their
1076   significance to that application, since the directives might be applicable
1077   to all recipients along the request/response chain. It is not possible to
1078   target a directive to a specific cache.
1079</t>
1080<t>
1081   Cache directives are identified by a token, to be compared case-insensitively,
1082   and have an optional argument, that can use both token and quoted-string
1083   syntax. For the directives defined below that define arguments, recipients
1084   ought to accept both forms, even if one is documented to be preferred. For
1085   any directive not defined by this specification, recipients &MUST; accept
1086   both forms.
1087</t>
1088<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-directive"/>
1089  <x:ref>Cache-Control</x:ref>   = 1#<x:ref>cache-directive</x:ref>
1090
1091  <x:ref>cache-directive</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1092</artwork></figure>
1093<t>
1094   For the cache directives defined below, no argument is defined (nor allowed)
1095   unless stated otherwise.
1096</t>
1097
1098<section title="Request Cache-Control Directives" anchor="cache-request-directive">
1099
1100<section title="max-age" anchor="cache-request-directive.max-age">
1101   <iref item="max-age (cache directive)" primary="true" />
1102<t>
1103   Argument syntax:
1104   <list>
1105      <t>
1106        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1107      </t>
1108   </list>
1109</t>
1110<t>
1111   The "max-age" request directive indicates that the client is unwilling to
1112   accept a response whose age is greater than the specified number of
1113   seconds. Unless the max-stale request directive is also present, the
1114   client is not willing to accept a stale response.
1115</t>
1116<t>
1117   &Note; This directive uses the token form of the argument syntax;
1118   e.g., 'max-age=5', not 'max-age="5"'. Senders &SHOULD-NOT; use the
1119   quoted-string form.
1120</t>
1121</section>
1122
1123<section title="max-stale" anchor="cache-request-directive.max-stale">
1124   <iref item="max-stale (cache directive)" primary="true" />
1125<t>
1126   Argument syntax:
1127   <list>
1128      <t>
1129        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1130      </t>
1131   </list>
1132</t>
1133<t>
1134   The "max-stale" request directive indicates that the client is willing
1135   to accept a response that has exceeded its freshness lifetime. If max-stale
1136   is assigned a value, then the client is willing to accept a response
1137   that has exceeded its freshness lifetime by no more than the specified
1138   number of seconds. If no value is assigned to max-stale, then the client
1139   is willing to accept a stale response of any age.
1140</t>
1141<t>
1142   &Note; This directive uses the token form of the argument syntax;
1143   e.g., 'max-stale=10', not 'max-stale="10"'. Senders &SHOULD-NOT; use the
1144   quoted-string form.
1145</t>
1146</section>
1147
1148<section title="min-fresh" anchor="cache-request-directive.min-fresh">
1149   <iref item="min-fresh (cache directive)" primary="true" />
1150<t>
1151   Argument syntax:
1152   <list>
1153      <t>
1154        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1155      </t>
1156   </list>
1157</t>
1158<t>
1159   The "min-fresh" request directive indicates that the client is willing
1160   to accept a response whose freshness lifetime is no less than its
1161   current age plus the specified time in seconds. That is, the client
1162   wants a response that will still be fresh for at least the specified
1163   number of seconds.
1164</t>
1165<t>
1166   &Note; This directive uses the token form of the argument syntax;
1167   e.g., 'min-fresh=20', not 'min-fresh="20"'. Senders &SHOULD-NOT; use the
1168   quoted-string form.
1169</t>
1170</section>
1171
1172<section title="no-cache" anchor="cache-request-directive.no-cache">
1173   <iref item="no-cache (cache directive)" primary="true" />
1174<t>
1175   The "no-cache" request directive indicates that a cache &MUST-NOT; 
1176   use a stored response to satisfy the request without successful
1177   validation on the origin server.
1178</t>
1179</section>
1180 
1181<section title="no-store" anchor="cache-request-directive.no-store">
1182   <iref item="no-store (cache directive)" primary="true" />
1183<t>
1184   The "no-store" request directive indicates that a cache &MUST-NOT;
1185   store any part of either this request or any response to it. This
1186   directive applies to both private and shared caches. "&MUST-NOT;
1187   store" in this context means that the cache &MUST-NOT; intentionally
1188   store the information in non-volatile storage, and &MUST; make a
1189   best-effort attempt to remove the information from volatile storage as
1190   promptly as possible after forwarding it.
1191</t>
1192<t>
1193   This directive is NOT a reliable or sufficient mechanism for ensuring
1194   privacy. In particular, malicious or compromised caches might not
1195   recognize or obey this directive, and communications networks might be
1196   vulnerable to eavesdropping.
1197</t>
1198<t>
1199   Note that if a request containing this directive is satisfied from a
1200   cache, the no-store request directive does not apply to the already
1201   stored response.
1202</t>
1203</section>
1204
1205<section title="no-transform" anchor="cache-request-directive.no-transform">
1206   <iref item="no-transform (cache directive)" primary="true" />
1207<t>
1208   The "no-transform" request directive indicates that an intermediary
1209   (whether or not it implements a cache) &MUST-NOT; transform the payload,
1210   as defined in &transformations;.
1211</t>
1212</section>
1213
1214<section title="only-if-cached" anchor="cache-request-directive.only-if-cached">
1215   <iref item="only-if-cached (cache directive)" primary="true" />
1216<t>
1217   The "only-if-cached" request directive indicates that the client only wishes
1218   to obtain a stored response. If it receives this directive, a cache &SHOULD;
1219   either respond using a stored response that is consistent with the other
1220   constraints of the request, or respond with a <x:ref>504 (Gateway
1221   Timeout)</x:ref> status code. If a group of caches is being operated as a
1222   unified system with good internal connectivity, a member cache &MAY;
1223   forward such a request within that group of caches.
1224</t>
1225</section>
1226</section>
1227
1228<section anchor="cache-response-directive" 
1229   title="Response Cache-Control Directives">
1230   <x:anchor-alias value="cache-response-directive" />
1231
1232<section title="must-revalidate" anchor="cache-response-directive.must-revalidate">
1233   <iref item="must-revalidate (cache directive)" primary="true" />
1234<t>
1235   The "must-revalidate" response directive indicates that once it has
1236   become stale, a cache &MUST-NOT; use the response to satisfy subsequent
1237   requests without successful validation on the origin server.
1238</t>
1239<t>
1240   The must-revalidate directive is necessary to support reliable
1241   operation for certain protocol features. In all circumstances a
1242   cache &MUST; obey the must-revalidate directive; in particular,
1243   if a cache cannot reach the origin server for any reason, it &MUST;
1244   generate a <x:ref>504 (Gateway Timeout)</x:ref> response.
1245</t>
1246<t>
1247   The must-revalidate directive ought to be used by servers if and only
1248   if failure to validate a request on the representation could result in
1249   incorrect operation, such as a silently unexecuted financial
1250   transaction.
1251</t>
1252</section>
1253
1254<section title="no-cache" anchor="cache-response-directive.no-cache">
1255   <iref item="no-cache (cache directive)" primary="true" />
1256<t>
1257   Argument syntax:
1258   <list>
1259      <t>
1260        #<x:ref>field-name</x:ref>
1261      </t>
1262   </list>
1263</t>
1264<t>
1265   The "no-cache" response directive indicates that the response &MUST-NOT;
1266   be used to satisfy a subsequent request without successful validation on
1267   the origin server. This allows an origin server to prevent a cache from
1268   using it to satisfy a request without contacting it, even by caches that
1269   have been configured to send stale responses.
1270</t>
1271<t>
1272   If the no-cache response directive specifies one or more field-names,
1273   then a cache &MAY; use the response to satisfy a subsequent request,
1274   subject to any other restrictions on caching. However, any header fields
1275   in the response that have the field-name(s) listed &MUST-NOT; be sent
1276   in the response to a subsequent request without successful revalidation
1277   with the origin server. This allows an origin server to prevent the
1278   re-use of certain header fields in a response, while still allowing
1279   caching of the rest of the response.
1280</t> 
1281<t>
1282   The field-names given are not limited to the set of header
1283   fields defined by this specification. Field names are case-insensitive.
1284</t>
1285<t>
1286   &Note; Although it has been back-ported to many implementations, some
1287   HTTP/1.0 caches will not recognize or obey this directive. Also, no-cache
1288   response directives with field-names are often handled by caches
1289   as if an unqualified no-cache directive was received; i.e., the special
1290   handling for the qualified form is not widely implemented.
1291</t>
1292<t>
1293   &Note; This directive uses the quoted-string form of the argument syntax.
1294   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1295   needed for single-entry lists).
1296</t>
1297</section>
1298
1299<section title="no-store" anchor="cache-response-directive.no-store">
1300   <iref item="no-store (cache directive)" primary="true" />
1301<t>
1302   The "no-store" response directive indicates that a cache &MUST-NOT;
1303   store any part of either the immediate request or response. This
1304   directive applies to both private and shared caches. "&MUST-NOT;
1305   store" in this context means that the cache &MUST-NOT; intentionally
1306   store the information in non-volatile storage, and &MUST; make a
1307   best-effort attempt to remove the information from volatile storage as
1308   promptly as possible after forwarding it.
1309</t>
1310<t>
1311   This directive is NOT a reliable or sufficient mechanism for ensuring
1312   privacy. In particular, malicious or compromised caches might not
1313   recognize or obey this directive, and communications networks might be
1314   vulnerable to eavesdropping.
1315</t>
1316</section>
1317
1318<section title="no-transform" anchor="cache-response-directive.no-transform">
1319   <iref item="no-transform (cache directive)" primary="true" />
1320<t>
1321   The "no-transform" response directive indicates that an intermediary
1322   (regardless of whether it implements a cache) &MUST-NOT; transform the
1323   payload, as defined in &transformations;.
1324</t>
1325</section>
1326
1327<section title="public" anchor="cache-response-directive.public">
1328   <iref item="public (cache directive)" primary="true" />
1329<t>
1330   The "public" response directive indicates that any cache &MAY; store the
1331   response, even if the response would normally be non-cacheable or cacheable
1332   only within a non-shared cache. (See <xref
1333   target="caching.authenticated.responses"/> for additional details related
1334   to the use of public in response to a request containing
1335   <x:ref>Authorization</x:ref>, and <xref target="response.cacheability"/>
1336   for details of how public affects responses that would normally not be
1337   stored, due to their status codes not being defined as cacheable.)
1338</t>
1339</section>
1340
1341<section title="private" anchor="cache-response-directive.private">
1342   <iref item="private (cache directive)" primary="true" />
1343<t>
1344   Argument syntax:
1345   <list>
1346      <t>
1347        #<x:ref>field-name</x:ref>
1348      </t>
1349   </list>
1350</t>
1351<t>
1352   The "private" response directive indicates that the response message is
1353   intended for a single user and &MUST-NOT; be stored by a shared cache. A
1354   private cache &MAY; store the response and reuse it for later requests,
1355   even if the response would normally be non-cacheable.
1356</t>
1357<t>
1358   If the private response directive specifies one or more field-names,
1359   this requirement is limited to the field-values associated with the
1360   listed response header fields. That is, a shared cache &MUST-NOT; store
1361   the specified field-names(s), whereas it &MAY; store the remainder of the
1362   response message.
1363</t>
1364<t>
1365   The field-names given are not limited to the set of header
1366   fields defined by this specification. Field names are case-insensitive.
1367</t>
1368<t>
1369   &Note; This usage of the word "private" only controls
1370   where the response can be stored; it cannot ensure the privacy of the
1371   message content. Also, private response directives with field-names are
1372   often handled by caches as if an unqualified private directive
1373   was received; i.e., the special handling for the qualified form is not
1374   widely implemented.
1375</t>
1376<t>
1377   &Note; This directive uses the quoted-string form of the argument syntax.
1378   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1379   needed for single-entry lists).
1380</t>
1381</section>
1382
1383<section title="proxy-revalidate" anchor="cache-response-directive.proxy-revalidate">
1384   <iref item="proxy-revalidate (cache directive)" primary="true" />
1385<t>
1386   The "proxy-revalidate" response directive has the same meaning as the
1387   must-revalidate response directive, except that it does not apply to
1388   private caches.
1389</t>
1390</section>
1391
1392<section title="max-age" anchor="cache-response-directive.max-age">
1393   <iref item="max-age (cache directive)" primary="true" />
1394<t>
1395   Argument syntax:
1396   <list>
1397      <t>
1398        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1399      </t>
1400   </list>
1401</t>
1402<t>
1403   The "max-age" response directive indicates that the response is to be
1404   considered stale after its age is greater than the specified number of
1405   seconds.
1406</t>
1407<t>
1408   &Note; This directive uses the token form of the argument syntax;
1409   e.g., 'max-age=5', not 'max-age="5"'. Senders &SHOULD-NOT; use the
1410   quoted-string form.
1411</t>
1412</section>     
1413
1414<section title="s-maxage" anchor="cache-response-directive.s-maxage">
1415   <iref item="s-maxage (cache directive)" primary="true" />
1416<t>
1417   Argument syntax:
1418   <list>
1419      <t>
1420        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1421      </t>
1422   </list>
1423</t>
1424<t>
1425   The "s-maxage" response directive indicates that, in shared caches, the
1426   maximum age specified by this directive overrides the maximum age
1427   specified by either the max-age directive or the <x:ref>Expires</x:ref>
1428   header field. The s-maxage directive also implies the semantics of the
1429   proxy-revalidate response directive.
1430</t>
1431<t>
1432   &Note; This directive uses the token form of the argument syntax;
1433   e.g., 's-maxage=10', not 's-maxage="10"'. Senders &SHOULD-NOT; use the
1434   quoted-string form.
1435</t>
1436</section>
1437
1438</section>
1439
1440<section anchor="cache.control.extensions" title="Cache Control Extensions">
1441<t>
1442   The Cache-Control header field can be extended through the use of one or
1443   more cache-extension tokens, each with an optional value.
1444</t>
1445<t>
1446   Informational extensions (those that do not require a change in cache
1447   behavior) can be added without changing the semantics of other directives.
1448   Behavioral extensions are designed to work by acting as modifiers to the
1449   existing base of cache directives.
1450</t>
1451<t>   
1452   Both the new directive and the standard directive are supplied, such that
1453   applications that do not understand the new directive will default to the
1454   behavior specified by the standard directive, and those that understand the
1455   new directive will recognize it as modifying the requirements associated
1456   with the standard directive. In this way, extensions to the cache-control
1457   directives can be made without requiring changes to the base protocol.
1458</t>
1459<t>
1460   This extension mechanism depends on an HTTP cache obeying all of the
1461   cache-control directives defined for its native HTTP-version, obeying
1462   certain extensions, and ignoring all directives that it does not
1463   understand.
1464</t>
1465<t>
1466   For example, consider a hypothetical new response directive called
1467   "community" that acts as a modifier to the private directive. We define
1468   this new directive to mean that, in addition to any private cache, any
1469   cache that is shared only by members of the community named within its
1470   value is allowed to cache the response. An origin server wishing to allow
1471   the UCI community to use an otherwise private response in their shared
1472   cache(s) could do so by including
1473</t>
1474<figure><artwork type="example">
1475  Cache-Control: private, community="UCI"
1476</artwork></figure>
1477<t>
1478   A cache seeing this header field will act correctly even if the cache does
1479   not understand the community cache-extension, since it will also see and
1480   understand the private directive and thus default to the safe behavior.
1481</t>
1482<t>
1483   A cache &MUST; ignore unrecognized cache directives; it is assumed that any
1484   cache directive likely to be unrecognized by an HTTP/1.1 cache will be
1485   combined with standard directives (or the response's default cacheability)
1486   such that the cache behavior will remain minimally correct even if the
1487   cache does not understand the extension(s).
1488</t>
1489</section>
1490
1491</section>
1492
1493<section anchor="header.expires" title="Expires">
1494   <iref item="Expires header field" primary="true" x:for-anchor="" />
1495   <x:anchor-alias value="Expires"/>
1496<t>
1497   The "Expires" header field gives the date/time after which the
1498   response is considered stale. See <xref target="expiration.model" /> for
1499   further discussion of the freshness model.
1500</t>
1501<t>
1502   The presence of an Expires field does not imply that the original resource
1503   will change or cease to exist at, before, or after that time.
1504</t>
1505<t>
1506   The Expires value is an HTTP-date timestamp, as defined in &http-date;.
1507</t>
1508<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
1509  <x:ref>Expires</x:ref> = <x:ref>HTTP-date</x:ref>
1510</artwork></figure>
1511<figure>
1512  <preamble>For example</preamble>
1513<artwork type="example">
1514  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1515</artwork></figure>
1516<t>
1517   A cache recipient &MUST; interpret invalid date formats, especially the
1518   value "0", as representing a time in the past (i.e., "already expired").
1519</t>
1520<t>
1521   If a response includes a <x:ref>Cache-Control</x:ref> field with
1522   the max-age directive (<xref target="cache-response-directive.max-age"/>),
1523   a recipient &MUST; ignore the Expires field.
1524   Likewise, if a response includes the s-maxage directive
1525   (<xref target="cache-response-directive.s-maxage" />), a shared cache
1526   recipient &MUST; ignore the Expires field. In both these cases, the value
1527   in Expires is only intended for recipients that have not yet implemented
1528   the Cache-Control field.
1529</t>
1530<t>
1531   An origin server without a clock &MUST-NOT; generate an Expires field
1532   unless its value represents a fixed time in the past (always expired)
1533   or its value has been associated with the resource by a system or user
1534   with a reliable clock.
1535</t>
1536<t>
1537   Historically, HTTP required the Expires field-value to be no more than a
1538   year in the future. While longer freshness lifetimes are no longer
1539   prohibited, extremely large values have been demonstrated to cause
1540   problems (e.g., clock overflows due to use of 32-bit integers for
1541   time values), and many caches will evict a response far sooner than
1542   that.
1543</t>
1544</section>
1545
1546<section anchor="header.pragma" title="Pragma">
1547   <iref item="Pragma header field" primary="true" x:for-anchor="" />
1548   <x:anchor-alias value="extension-pragma"/>
1549   <x:anchor-alias value="Pragma"/>
1550   <x:anchor-alias value="pragma-directive"/>
1551<t>
1552   The "Pragma" header field allows backwards compatibility with HTTP/1.0
1553   caches, so that clients can specify a "no-cache" request that they will
1554   understand (as <x:ref>Cache-Control</x:ref> was not defined until HTTP/1.1).
1555   When the Cache-Control header field is also present and understood in a
1556   request, Pragma is ignored.
1557</t>
1558<t>
1559   In HTTP/1.0, Pragma was defined as an extensible field for
1560   implementation-specified directives for recipients. This specification
1561   deprecates such extensions to improve interoperability.
1562</t>
1563<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
1564  <x:ref>Pragma</x:ref>           = 1#<x:ref>pragma-directive</x:ref>
1565  <x:ref>pragma-directive</x:ref> = "no-cache" / <x:ref>extension-pragma</x:ref>
1566  <x:ref>extension-pragma</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1567</artwork></figure>
1568<t>
1569   When the <x:ref>Cache-Control</x:ref> header field is not present in a
1570   request, caches &MUST; consider the no-cache request pragma-directive as
1571   having the same effect as if "Cache-Control: no-cache" were present (see
1572   <xref target="cache-request-directive" />).
1573</t>
1574<t>
1575   When sending a no-cache request, a client ought to include both the pragma
1576   and cache-control directives, unless Cache-Control: no-cache is
1577   purposefully omitted to target other <x:ref>Cache-Control</x:ref> response
1578   directives at HTTP/1.1 caches. For example:
1579</t>
1580<figure>
1581<artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
1582GET / HTTP/1.1
1583Host: www.example.com
1584Cache-Control: max-age=30
1585Pragma: no-cache
1586
1587</artwork>
1588</figure>
1589<t>
1590   will constrain HTTP/1.1 caches to serve a response no older than 30
1591   seconds, while precluding implementations that do not understand
1592   <x:ref>Cache-Control</x:ref> from serving a cached response.
1593</t>
1594<x:note>
1595   <t>
1596      &Note; Because the meaning of "Pragma: no-cache" in responses is not
1597      specified, it does not provide a reliable replacement for
1598      "Cache-Control: no-cache" in them.
1599   </t>
1600</x:note>
1601</section>
1602
1603<section anchor="header.warning" title="Warning">
1604   <iref item="Warning header field" primary="true" x:for-anchor="" />
1605   <x:anchor-alias value="Warning"/>
1606   <x:anchor-alias value="warning-value"/>
1607   <x:anchor-alias value="warn-agent"/>
1608   <x:anchor-alias value="warn-code"/>
1609   <x:anchor-alias value="warn-date"/>
1610   <x:anchor-alias value="warn-text"/>
1611<t>
1612   The "Warning" header field is used to carry additional information
1613   about the status or transformation of a message that might not be reflected
1614   in the message. This information is typically used to warn about possible
1615   incorrectness introduced by caching operations or transformations applied
1616   to the payload of the message.
1617</t>
1618<t>
1619   Warnings can be used for other purposes, both cache-related and otherwise.
1620   The use of a warning, rather than an error status code, distinguishes these
1621   responses from true failures.
1622</t>
1623<t>
1624   Warning header fields can in general be applied to any message, however some
1625   warn-codes are specific to caches and can only be applied to response
1626   messages.
1627</t>
1628<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="warning-value"/><iref primary="true" item="Grammar" subitem="warn-code"/><iref primary="true" item="Grammar" subitem="warn-agent"/><iref primary="true" item="Grammar" subitem="warn-text"/><iref primary="true" item="Grammar" subitem="warn-date"/>
1629  <x:ref>Warning</x:ref>       = 1#<x:ref>warning-value</x:ref>
1630 
1631  <x:ref>warning-value</x:ref> = <x:ref>warn-code</x:ref> <x:ref>SP</x:ref> <x:ref>warn-agent</x:ref> <x:ref>SP</x:ref> <x:ref>warn-text</x:ref>
1632                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
1633 
1634  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
1635  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
1636                  ; the name or pseudonym of the server adding
1637                  ; the Warning header field, for use in debugging
1638  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1639  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
1640</artwork></figure>
1641<t>
1642   Multiple warnings can be attached to a response (either by the origin
1643   server or by a cache), including multiple warnings with the same code
1644   number, only differing in warn-text.
1645</t>
1646<t>
1647   When this occurs, the user agent &SHOULD; inform the user of as many of
1648   them as possible, in the order that they appear in the response.
1649</t>
1650<t>
1651   Systems that generate multiple Warning header fields are encouraged to
1652   order them with this user agent behavior in mind. New Warning header fields
1653   are added after any existing Warning header fields.
1654</t>
1655<t>
1656   Warnings are assigned three digit warn-codes. The first digit indicates
1657   whether the Warning is required to be deleted from a stored response after
1658   validation:
1659   <list style="symbols">
1660      <t>1xx Warnings describe the freshness or validation status of the
1661      response, and so &MUST; be deleted by a cache after validation. They can
1662      only be generated by a cache when validating a cached entry, and
1663      &MUST-NOT; be generated in any other situation.</t>
1664      <t>2xx Warnings describe some aspect of the representation that is not
1665      rectified by a validation (for example, a lossy compression of the
1666      representation) and &MUST-NOT; be deleted by a cache after validation,
1667      unless a full response is sent, in which case they &MUST; be.</t>
1668   </list>
1669</t>
1670<t>
1671   If an implementation sends a message with one or more Warning header fields
1672   to a receiver whose version is HTTP/1.0 or lower, then the sender &MUST;
1673   include in each warning-value a warn-date that matches the
1674   <x:ref>Date</x:ref> header field in the message.
1675</t>
1676<t>
1677   If a system receives a message with a warning-value that includes a
1678   warn-date, and that warn-date is different from the <x:ref>Date</x:ref>
1679   value in the response, then that warning-value &MUST; be deleted from the
1680   message before storing, forwarding, or using it. (preventing the
1681   consequences of naive caching of Warning header fields.) If all of the
1682   warning-values are deleted for this reason, the Warning header field &MUST;
1683   be deleted as well.
1684</t>
1685<t>
1686   The following warn-codes are defined by this specification, each with a
1687   recommended warn-text in English, and a description of its meaning.
1688</t>
1689
1690<section title="110 Response is Stale" anchor="warn.110">
1691  <iref primary="true" item="110 Response is Stale (warn code)" x:for-anchor=""/>
1692<t>
1693   A cache &SHOULD; generate this whenever the sent response is stale.
1694</t>
1695</section>
1696
1697<section title="111 Revalidation Failed" anchor="warn.111">
1698  <iref primary="true" item="111 Revalidation Failed (warn code)" x:for-anchor=""/>
1699<t>
1700   A cache &SHOULD; generate this when sending a stale response because an
1701   attempt to validate the response failed, due to an inability to reach
1702   the server.
1703</t>
1704</section>
1705
1706<section title="112 Disconnected Operation" anchor="warn.112">
1707  <iref primary="true" item="112 Disconnected Operation (warn code)" x:for-anchor=""/>
1708<t>
1709   A cache &SHOULD; generate this if it is intentionally disconnected from
1710   the rest of the network for a period of time.
1711</t>
1712</section>
1713
1714<section title="113 Heuristic Expiration" anchor="warn.113">
1715  <iref primary="true" item="113 Heuristic Expiration (warn code)" x:for-anchor=""/>
1716<t>
1717   A cache &SHOULD; generate this if it heuristically chose a freshness
1718   lifetime greater than 24 hours and the response's age is greater than 24
1719   hours.
1720</t>
1721</section>
1722
1723<section title="199 Miscellaneous Warning" anchor="warn.199">
1724  <iref primary="true" item="199 Miscellaneous Warning (warn code)" x:for-anchor=""/>
1725<t>
1726   The warning text can include arbitrary information to be presented to
1727   a human user, or logged. A system receiving this warning &MUST-NOT; take
1728   any automated action, besides presenting the warning to the user.
1729</t>
1730</section>
1731
1732<section title="214 Transformation Applied" anchor="warn.214">
1733  <iref primary="true" item="214 Transformation Applied (warn code)" x:for-anchor=""/>
1734<t>
1735   &MUST; be added by a proxy if it applies any transformation to the
1736   representation, such as changing the content-coding, media-type, or
1737   modifying the representation data, unless this Warning code already appears
1738   in the response.
1739</t>
1740</section>
1741
1742<section title="299 Miscellaneous Persistent Warning" anchor="warn.299">
1743  <iref primary="true" item="299 Miscellaneous Persistent Warning (warn code)" x:for-anchor=""/>
1744<t>
1745   The warning text can include arbitrary information to be presented to
1746   a human user, or logged. A system receiving this warning &MUST-NOT; take
1747   any automated action.
1748</t>
1749</section>
1750
1751<section title="Warn Code Extensions" anchor="warn.code.extensions">
1752<t>
1753   Extension warn codes can be defined; see <xref target="warn.code.registry.procedure"/>
1754   for details.
1755</t>
1756</section>
1757</section>
1758</section>
1759
1760<section anchor="history.lists" title="History Lists">
1761<t>
1762   User agents often have history mechanisms, such as "Back" buttons and
1763   history lists, that can be used to redisplay a representation retrieved
1764   earlier in a session.
1765</t>
1766<t>
1767   The freshness model (<xref target="expiration.model"/>) does not
1768   necessarily apply to history mechanisms. I.e., a history mechanism can
1769   display a previous representation even if it has expired.
1770</t>
1771<t>
1772   This does not prohibit the history mechanism from telling the user that a
1773   view might be stale, or from honoring cache directives (e.g.,
1774   Cache-Control: no-store).
1775</t>
1776</section>
1777
1778
1779<section title="IANA Considerations" anchor="iana.considerations">
1780
1781<section title="Cache Directive Registry" anchor="cache.directive.registry">
1782<t>
1783   The HTTP Cache Directive Registry defines the name space for the
1784   cache directives. It will be created and maintained at
1785   <eref target="http://www.iana.org/assignments/http-cache-directives"/>.
1786</t>
1787
1788<section title="Procedure" anchor="cache.directive.registry.procedure">
1789<t>
1790   A registration &MUST; include the following fields:
1791   <list style="symbols">
1792      <t>Cache Directive Name</t>
1793      <t>Pointer to specification text</t>
1794   </list>
1795</t>
1796<t>
1797   Values to be added to this name space require IETF Review (see <xref
1798   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1799</t>
1800</section>
1801
1802<section title="Considerations for New Cache Control Directives" anchor="cache.directive.considerations">
1803<t>
1804   New extension directives ought to consider defining:
1805</t>
1806<t>
1807   <list style="symbols">
1808      <t>What it means for a directive to be specified multiple times,</t>
1809      <t>When the directive does not take an argument, what it means when an
1810      argument is present,</t>
1811      <t>When the directive requires an argument, what it means when it is
1812      missing,</t>
1813      <t>Whether the directive is specific to requests, responses, or able
1814        to be used in either.</t>
1815   </list>
1816</t>
1817<t>
1818  See also <xref target="cache.control.extensions"/>.
1819</t>
1820</section>
1821
1822<section title="Registrations" anchor="cache.directive.registration">
1823<t>
1824  The HTTP Cache Directive Registry shall be populated with the registrations below:
1825</t>
1826<?BEGININC p6-cache.cache-directives ?>
1827<!--AUTOGENERATED FROM extract-cache-directives-defs.xslt, do not edit manually-->
1828<texttable xmlns:my="#my" align="left" suppress-title="true"
1829           anchor="iana.cache.directive.registration.table">
1830   <ttcol>Cache Directive</ttcol>
1831   <ttcol>Reference</ttcol>
1832
1833   <c>max-age</c>
1834   <c>
1835      <xref target="cache-request-directive.max-age"/>, <xref target="cache-response-directive.max-age"/>
1836   </c>
1837   <c>max-stale</c>
1838   <c>
1839      <xref target="cache-request-directive.max-stale"/>
1840   </c>
1841   <c>min-fresh</c>
1842   <c>
1843      <xref target="cache-request-directive.min-fresh"/>
1844   </c>
1845   <c>must-revalidate</c>
1846   <c>
1847      <xref target="cache-response-directive.must-revalidate"/>
1848   </c>
1849   <c>no-cache</c>
1850   <c>
1851      <xref target="cache-request-directive.no-cache"/>, <xref target="cache-response-directive.no-cache"/>
1852   </c>
1853   <c>no-store</c>
1854   <c>
1855      <xref target="cache-request-directive.no-store"/>, <xref target="cache-response-directive.no-store"/>
1856   </c>
1857   <c>no-transform</c>
1858   <c>
1859      <xref target="cache-request-directive.no-transform"/>, <xref target="cache-response-directive.no-transform"/>
1860   </c>
1861   <c>only-if-cached</c>
1862   <c>
1863      <xref target="cache-request-directive.only-if-cached"/>
1864   </c>
1865   <c>private</c>
1866   <c>
1867      <xref target="cache-response-directive.private"/>
1868   </c>
1869   <c>proxy-revalidate</c>
1870   <c>
1871      <xref target="cache-response-directive.proxy-revalidate"/>
1872   </c>
1873   <c>public</c>
1874   <c>
1875      <xref target="cache-response-directive.public"/>
1876   </c>
1877   <c>s-maxage</c>
1878   <c>
1879      <xref target="cache-response-directive.s-maxage"/>
1880   </c>
1881   <c>stale-if-error</c>
1882   <c>
1883      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="4"/>
1884   </c>
1885   <c>stale-while-revalidate</c>
1886   <c>
1887      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="3"/>
1888   </c>
1889</texttable>
1890<!--(END)-->
1891<?ENDINC p6-cache.cache-directives ?>
1892</section>
1893</section>
1894
1895<section title="Warn Code Registry" anchor="warn.code.registry">
1896<t>
1897   The HTTP Warn Code Registry defines the name space for warn codes.
1898   It will be created and maintained at
1899   <eref target="http://www.iana.org/assignments/http-warn-codes"/>.
1900</t>
1901
1902<section title="Procedure" anchor="warn.code.registry.procedure">
1903<t>
1904   A registration &MUST; include the following fields:
1905   <list style="symbols">
1906      <t>Warn Code (3 digits)</t>
1907      <t>Short Description</t>
1908      <t>Pointer to specification text</t>
1909   </list>
1910</t>
1911<t>
1912   Values to be added to this name space require IETF Review (see <xref
1913   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1914</t>
1915</section>
1916
1917<section title="Registrations" anchor="warn.code.registration">
1918<t>
1919  The HTTP Warn Code Registry shall be populated with the registrations below:
1920</t>
1921<?BEGININC p6-cache.iana-warn-codes ?>
1922<!--AUTOGENERATED FROM extract-warn-code-defs.xslt, do not edit manually-->
1923<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
1924   <ttcol>Warn Code</ttcol>
1925   <ttcol>Short Description</ttcol>
1926   <ttcol>Reference</ttcol>
1927   <c>110</c>
1928   <c>Response is Stale</c>
1929   <c>
1930      <xref target="warn.110"/>
1931   </c>
1932   <c>111</c>
1933   <c>Revalidation Failed</c>
1934   <c>
1935      <xref target="warn.111"/>
1936   </c>
1937   <c>112</c>
1938   <c>Disconnected Operation</c>
1939   <c>
1940      <xref target="warn.112"/>
1941   </c>
1942   <c>113</c>
1943   <c>Heuristic Expiration</c>
1944   <c>
1945      <xref target="warn.113"/>
1946   </c>
1947   <c>199</c>
1948   <c>Miscellaneous Warning</c>
1949   <c>
1950      <xref target="warn.199"/>
1951   </c>
1952   <c>214</c>
1953   <c>Transformation Applied</c>
1954   <c>
1955      <xref target="warn.214"/>
1956   </c>
1957   <c>299</c>
1958   <c>Miscellaneous Persistent Warning</c>
1959   <c>
1960      <xref target="warn.299"/>
1961   </c>
1962</texttable>
1963<!--(END)-->
1964<?ENDINC p6-cache.iana-warn-codes ?>
1965</section>
1966</section>
1967
1968<section title="Header Field Registration" anchor="header.field.registration">
1969<t>
1970   HTTP header fields are registered within the Message Header Field Registry
1971   maintained at
1972   <eref target="http://www.iana.org/assignments/message-headers/message-header-index.html"/>.
1973</t>
1974<t>
1975   This document defines the following HTTP header fields, so their
1976   associated registry entries shall be updated according to the permanent
1977   registrations below (see <xref target="BCP90"/>):
1978</t>
1979<?BEGININC p6-cache.iana-headers ?>
1980<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
1981<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1982   <ttcol>Header Field Name</ttcol>
1983   <ttcol>Protocol</ttcol>
1984   <ttcol>Status</ttcol>
1985   <ttcol>Reference</ttcol>
1986
1987   <c>Age</c>
1988   <c>http</c>
1989   <c>standard</c>
1990   <c>
1991      <xref target="header.age"/>
1992   </c>
1993   <c>Cache-Control</c>
1994   <c>http</c>
1995   <c>standard</c>
1996   <c>
1997      <xref target="header.cache-control"/>
1998   </c>
1999   <c>Expires</c>
2000   <c>http</c>
2001   <c>standard</c>
2002   <c>
2003      <xref target="header.expires"/>
2004   </c>
2005   <c>Pragma</c>
2006   <c>http</c>
2007   <c>standard</c>
2008   <c>
2009      <xref target="header.pragma"/>
2010   </c>
2011   <c>Warning</c>
2012   <c>http</c>
2013   <c>standard</c>
2014   <c>
2015      <xref target="header.warning"/>
2016   </c>
2017</texttable>
2018<!--(END)-->
2019<?ENDINC p6-cache.iana-headers ?>
2020<t>
2021   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task
2022   Force".
2023</t>
2024</section>
2025</section>
2026
2027<section anchor="security.considerations" title="Security Considerations">
2028<t>
2029   This section is meant to inform developers, information providers, and
2030   users of known security concerns specific to HTTP/1.1 caching.
2031   More general security considerations are addressed in HTTP messaging
2032   &messaging; and semantics &semantics;.
2033</t>
2034<t>
2035   Caches expose additional potential vulnerabilities, since the contents of
2036   the cache represent an attractive target for malicious exploitation.
2037   Because cache contents persist after an HTTP request is complete, an attack
2038   on the cache can reveal information long after a user believes that the
2039   information has been removed from the network. Therefore, cache contents
2040   need to be protected as sensitive information.
2041</t>
2042<t>
2043   Furthermore, the very use of a cache can bring about privacy concerns. For
2044   example, if two users share a cache, and the first one browses to a site,
2045   the second may be able to detect that the other has been to that site,
2046   because the resources from it load more quickly, thanks to the cache.
2047</t>
2048<t>
2049   Implementation flaws might allow attackers to insert content into a cache
2050   ("cache poisoning"), leading to compromise of clients that trust that
2051   content. Because of their nature, these attacks are difficult to mitigate.
2052</t>
2053<t>
2054   Likewise, implementation flaws (as well as misunderstanding of cache
2055   operation) might lead to caching of sensitive information (e.g.,
2056   authentication credentials) that is thought to be private, exposing it to
2057   unauthorized parties.
2058</t>
2059<t>
2060   Note that the Set-Cookie response header field <xref target="RFC6265"/> does not
2061   inhibit caching; a cacheable response with a Set-Cookie header field can be (and
2062   often is) used to satisfy subsequent requests to caches. Servers who wish
2063   to control caching of these responses are encouraged to emit appropriate
2064   Cache-Control response header fields.
2065</t>
2066
2067</section>
2068
2069<section title="Acknowledgments" anchor="acks">
2070<t>
2071  See &acks;.
2072</t>
2073</section>
2074
2075</middle>
2076
2077<back>
2078<references title="Normative References">
2079
2080  <reference anchor="Part1">
2081    <front>
2082      <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
2083      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2084        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2085        <address><email>fielding@gbiv.com</email></address>
2086      </author>
2087      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2088        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2089        <address><email>julian.reschke@greenbytes.de</email></address>
2090      </author>
2091      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2092    </front>
2093    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
2094    <x:source basename="p1-messaging" href="p1-messaging.xml">
2095      <x:defines>Content-Length</x:defines>
2096      <x:defines>Via</x:defines>
2097    </x:source>
2098  </reference>
2099
2100  <reference anchor="Part2">
2101    <front>
2102      <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
2103      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2104        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2105        <address><email>fielding@gbiv.com</email></address>
2106      </author>
2107      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2108        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2109        <address><email>julian.reschke@greenbytes.de</email></address>
2110      </author>
2111      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2112    </front>
2113    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
2114    <x:source basename="p2-semantics" href="p2-semantics.xml">
2115      <x:defines>2xx (Successful)</x:defines>
2116      <x:defines>200 (OK)</x:defines>
2117      <x:defines>203 (Non-Authoritative Information)</x:defines>
2118      <x:defines>3xx (Redirection)</x:defines>
2119      <x:defines>300 (Multiple Choices)</x:defines>
2120      <x:defines>301 (Moved Permanently)</x:defines>
2121      <x:defines>404 (Not Found)</x:defines>
2122      <x:defines>410 (Gone)</x:defines>
2123      <x:defines>5xx (Server Error)</x:defines>
2124      <x:defines>504 (Gateway Timeout)</x:defines>
2125      <x:defines>Accept</x:defines>
2126      <x:defines>Content-Encoding</x:defines>
2127      <x:defines>Content-Location</x:defines>
2128      <x:defines>Content-Type</x:defines>
2129      <x:defines>Date</x:defines>
2130      <x:defines>Location</x:defines>
2131      <x:defines>Vary</x:defines>
2132    </x:source>
2133  </reference>
2134
2135  <reference anchor="Part4">
2136    <front>
2137      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
2138      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2139        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2140        <address><email>fielding@gbiv.com</email></address>
2141      </author>
2142      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2143        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2144        <address><email>julian.reschke@greenbytes.de</email></address>
2145      </author>
2146      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2147    </front>
2148    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
2149    <x:source basename="p4-conditional" href="p4-conditional.xml">
2150      <x:defines>304</x:defines>
2151      <x:defines>304 (Not Modified)</x:defines>
2152      <x:defines>ETag</x:defines>
2153      <x:defines>If-Modified-Since</x:defines>
2154      <x:defines>If-None-Match</x:defines>
2155      <x:defines>Last-Modified</x:defines>
2156    </x:source>
2157  </reference>
2158
2159  <reference anchor="Part5">
2160    <front>
2161      <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
2162      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2163        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2164        <address><email>fielding@gbiv.com</email></address>
2165      </author>
2166      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2167        <organization abbrev="W3C">World Wide Web Consortium</organization>
2168        <address><email>ylafon@w3.org</email></address>
2169      </author>
2170      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2171        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2172        <address><email>julian.reschke@greenbytes.de</email></address>
2173      </author>
2174      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2175    </front>
2176    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
2177    <x:source basename="p5-range" href="p5-range.xml">
2178      <x:defines>206 (Partial Content)</x:defines>
2179      <x:defines>Content-Range</x:defines>
2180      <x:defines>Range</x:defines>
2181    </x:source>
2182  </reference>
2183
2184  <reference anchor="Part7">
2185    <front>
2186      <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
2187      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2188        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2189        <address><email>fielding@gbiv.com</email></address>
2190      </author>
2191      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2192        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2193        <address><email>julian.reschke@greenbytes.de</email></address>
2194      </author>
2195      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2196    </front>
2197    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
2198    <x:source basename="p7-auth" href="p7-auth.xml">
2199      <x:defines>Authorization</x:defines>
2200    </x:source>
2201  </reference>
2202
2203  <reference anchor="RFC2119">
2204    <front>
2205      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2206      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2207        <organization>Harvard University</organization>
2208        <address><email>sob@harvard.edu</email></address>
2209      </author>
2210      <date month="March" year="1997" />
2211    </front>
2212    <seriesInfo name="BCP" value="14" />
2213    <seriesInfo name="RFC" value="2119" />
2214  </reference>
2215
2216  <reference anchor="RFC5234">
2217    <front>
2218      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2219      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2220        <organization>Brandenburg InternetWorking</organization>
2221        <address>
2222          <email>dcrocker@bbiw.net</email>
2223        </address> 
2224      </author>
2225      <author initials="P." surname="Overell" fullname="Paul Overell">
2226        <organization>THUS plc.</organization>
2227        <address>
2228          <email>paul.overell@thus.net</email>
2229        </address>
2230      </author>
2231      <date month="January" year="2008"/>
2232    </front>
2233    <seriesInfo name="STD" value="68"/>
2234    <seriesInfo name="RFC" value="5234"/>
2235  </reference>
2236 
2237</references>
2238
2239<references title="Informative References">
2240
2241  <reference anchor="RFC1305">
2242    <front>
2243      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2244      <author fullname="David L. Mills" initials="D." surname="Mills">
2245        <organization>University of Delaware, Electrical Engineering Department</organization>
2246        <address><email>mills@udel.edu</email></address>
2247      </author>
2248      <date month="March" year="1992" />
2249    </front>
2250    <seriesInfo name="RFC" value="1305" />
2251  </reference>
2252
2253  <reference anchor="RFC2616">
2254    <front>
2255      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2256      <author fullname="R. Fielding" initials="R." surname="Fielding">
2257        <organization>University of California, Irvine</organization>
2258        <address><email>fielding@ics.uci.edu</email></address>
2259      </author>
2260      <author fullname="J. Gettys" initials="J." surname="Gettys">
2261        <organization>W3C</organization>
2262        <address><email>jg@w3.org</email></address>
2263      </author>
2264      <author fullname="J. Mogul" initials="J." surname="Mogul">
2265        <organization>Compaq Computer Corporation</organization>
2266        <address><email>mogul@wrl.dec.com</email></address>
2267      </author>
2268      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2269        <organization>MIT Laboratory for Computer Science</organization>
2270        <address><email>frystyk@w3.org</email></address>
2271      </author>
2272      <author fullname="L. Masinter" initials="L." surname="Masinter">
2273        <organization>Xerox Corporation</organization>
2274        <address><email>masinter@parc.xerox.com</email></address>
2275      </author>
2276      <author fullname="P. Leach" initials="P." surname="Leach">
2277        <organization>Microsoft Corporation</organization>
2278        <address><email>paulle@microsoft.com</email></address>
2279      </author>
2280      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2281        <organization>W3C</organization>
2282        <address><email>timbl@w3.org</email></address>
2283      </author>
2284      <date month="June" year="1999" />
2285    </front>
2286    <seriesInfo name="RFC" value="2616" />
2287  </reference>
2288
2289  <reference anchor="BCP90">
2290    <front>
2291      <title>Registration Procedures for Message Header Fields</title>
2292      <author fullname="G. Klyne" initials="G." surname="Klyne">
2293        <organization>Nine by Nine</organization>
2294        <address><email>GK-IETF@ninebynine.org</email></address>
2295      </author>
2296      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2297        <organization>BEA Systems</organization>
2298        <address><email>mnot@pobox.com</email></address>
2299      </author>
2300      <author fullname="J. Mogul" initials="J." surname="Mogul">
2301        <organization>HP Labs</organization>
2302        <address><email>JeffMogul@acm.org</email></address>
2303      </author>
2304      <date month="September" year="2004" />
2305    </front>
2306    <seriesInfo name="BCP" value="90" />
2307    <seriesInfo name="RFC" value="3864" />
2308  </reference>
2309
2310  <reference anchor='RFC5226'>
2311    <front>
2312      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2313      <author initials='T.' surname='Narten' fullname='T. Narten'>
2314        <organization>IBM</organization>
2315        <address><email>narten@us.ibm.com</email></address>
2316      </author>
2317      <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
2318        <organization>Google</organization>
2319        <address><email>Harald@Alvestrand.no</email></address>
2320      </author>
2321      <date year='2008' month='May' />
2322    </front>
2323    <seriesInfo name='BCP' value='26' />
2324    <seriesInfo name='RFC' value='5226' />
2325  </reference>
2326
2327  <reference anchor='RFC5861'>
2328    <front>
2329      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2330      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2331        <organization>Yahoo! Inc.</organization>
2332        <address><email>mnot@yahoo-inc.com</email></address>
2333      </author>
2334      <date month="April" year="2010"/>
2335    </front>
2336    <seriesInfo name='RFC' value='5861' />
2337  </reference>
2338
2339  <reference anchor="RFC6265">
2340    <front>
2341      <title>HTTP State Management Mechanism</title>
2342      <author initials="A." surname="Barth" fullname="Adam Barth">
2343        <organization abbrev="U.C. Berkeley">
2344          University of California, Berkeley
2345        </organization>
2346        <address><email>abarth@eecs.berkeley.edu</email></address>
2347      </author>
2348      <date year="2011" month="April" />
2349    </front>
2350    <seriesInfo name="RFC" value="6265"/>
2351  </reference>
2352
2353</references>
2354
2355<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2356<t>
2357  Caching-related text has been substantially rewritten for clarity.
2358</t>
2359<t>
2360  The algorithm for calculating age is now less conservative.
2361  (<xref target="age.calculations"/>)
2362</t>
2363<t>
2364  Caches are now required to handle dates with timezones as if they're
2365  invalid, because it's not possible to accurately guess.
2366  (<xref target="age.calculations"/>)
2367</t>
2368<t>
2369  The <x:ref>Content-Location</x:ref> response header field is no longer used
2370  to determine the appropriate response to use when validating.
2371  (<xref target="validation.model" />)
2372</t>
2373<t>
2374  The algorithm for selecting a cached negotiated response to use has been
2375  clarified in several ways. In particular, it now explicitly allows
2376  header-specific canonicalization when processing selecting header fields.
2377  (<xref target="caching.negotiated.responses" />)
2378</t>
2379<t>
2380  Requirements regarding denial of service attack avoidance when performing
2381  invalidation have been clarified.
2382  (<xref target="invalidation.after.updates.or.deletions" />)
2383</t>
2384<t>
2385  Cache invalidation only occurs when a successful response is received.
2386  (<xref target="invalidation.after.updates.or.deletions" />)
2387</t>
2388<t>
2389  The conditions under which an authenticated response can be cached have been
2390  clarified.
2391  (<xref target="caching.authenticated.responses" />)
2392</t>
2393<t>
2394  The one-year limit on Expires header field values has been removed; instead,
2395  the reasoning for using a sensible value is given.
2396  (<xref target="header.expires" />)
2397</t>
2398<t>
2399  The Pragma header field is now only defined for backwards compatibility;
2400  future pragmas are deprecated.
2401  (<xref target="header.pragma" />)
2402</t>
2403<t>
2404  Cache directives are explicitly defined to be case-insensitive.
2405  (<xref target="header.cache-control" />)
2406</t>
2407<t>
2408  Handling of multiple instances of cache directives when only one is
2409  expected is now defined.
2410  (<xref target="header.cache-control" />)
2411</t>
2412<t>
2413  The qualified forms of the private and no-cache cache directives are noted
2414  to not be widely implemented; e.g., "private=foo" is interpreted by many
2415  caches as simply "private". Additionally, the meaning of the qualified
2416  form of no-cache has been clarified.
2417  (<xref target="cache-response-directive" />)
2418</t>
2419<t>
2420  The "no-store" cache request directive doesn't apply to responses; i.e.,
2421  a cache can satisfy a request with no-store on it, and does not invalidate
2422  it.
2423  (<xref target="cache-request-directive.no-store" />)
2424</t>
2425<t>
2426  The "no-cache" response cache directive's meaning has been clarified.
2427  (<xref target="cache-response-directive.no-cache" />)
2428</t>
2429<t>
2430  New status codes can now define that caches are allowed to use heuristic
2431  freshness with them.
2432  (<xref target="heuristic.freshness" />)
2433</t>
2434<t>
2435  Caches are now allow to calculate heuristic freshness for URLs with query
2436  components.
2437  (<xref target="heuristic.freshness" />)
2438</t>
2439<t>
2440  Some requirements regarding production of the <x:ref>Warning</x:ref> 
2441  header fields have been relaxed, as it is not widely implemented.
2442  Furthermore, the <x:ref>Warning</x:ref> header field no longer uses RFC 2047 encoding,
2443  nor allows multiple languages, as these aspects were not implemented.
2444  (<xref target="header.warning" />)
2445</t>
2446<t>
2447  This specification introduces the Cache Directive and Warn Code Registries,
2448  and defines considerations for new cache directives.
2449  (<xref target="cache.control.extensions"/> and <xref target="warn.code.extensions"/>)
2450</t>
2451</section>
2452
2453<section title="Imported ABNF" anchor="imported.abnf">
2454   <x:anchor-alias value="ALPHA"/>
2455   <x:anchor-alias value="CR"/>
2456   <x:anchor-alias value="DIGIT"/>
2457   <x:anchor-alias value="DQUOTE"/>
2458   <x:anchor-alias value="LF"/>
2459   <x:anchor-alias value="OCTET"/>
2460   <x:anchor-alias value="SP"/>
2461   <x:anchor-alias value="VCHAR"/>
2462   <x:anchor-alias value="quoted-string"/>
2463   <x:anchor-alias value="token"/>
2464   <x:anchor-alias value="OWS"/>
2465   <x:anchor-alias value="field-name"/>
2466   <x:anchor-alias value="HTTP-date"/>
2467   <x:anchor-alias value="port"/>
2468   <x:anchor-alias value="pseudonym"/>
2469   <x:anchor-alias value="uri-host"/>
2470<t>
2471   The following core rules are included by reference, as defined in <xref
2472   target="RFC5234" x:fmt="of" x:sec="B.1"/>: ALPHA (letters), CR (carriage
2473   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
2474   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
2475   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
2476</t>
2477<t>
2478   The rules below are defined in <xref target="Part1"/>:
2479</t>
2480<figure><artwork type="abnf2616">
2481  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &whitespace;&gt;
2482  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &header-fields;&gt;
2483  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &field-components;&gt;
2484  <x:ref>token</x:ref>         = &lt;token, defined in &field-components;&gt;
2485
2486  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
2487  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
2488  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
2489</artwork></figure>
2490<t>
2491   The rules below are defined in other parts:
2492</t>
2493<figure><artwork type="abnf2616">
2494  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &http-date;&gt;
2495</artwork></figure>
2496</section>
2497
2498<?BEGININC p6-cache.abnf-appendix ?>
2499<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
2500<t>
2501  In the collected ABNF below, list rules are expanded as per <xref target="Part1" x:rel="#notation"/>.
2502</t><figure>
2503<artwork type="abnf" name="p6-cache.parsed-abnf">
2504<x:ref>Age</x:ref> = delta-seconds
2505
2506<x:ref>Cache-Control</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
2507 cache-directive ] )
2508
2509<x:ref>Expires</x:ref> = HTTP-date
2510
2511<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 7.1.1.1&gt;
2512
2513<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.3&gt;
2514
2515<x:ref>Pragma</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2516 pragma-directive ] )
2517
2518<x:ref>Warning</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2519 )
2520
2521<x:ref>cache-directive</x:ref> = token [ "=" ( token / quoted-string ) ]
2522
2523<x:ref>delta-seconds</x:ref> = 1*DIGIT
2524
2525<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
2526
2527<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 3.2&gt;
2528
2529<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.7&gt;
2530<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
2531<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 5.7.1&gt;
2532
2533<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.6&gt;
2534
2535<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.6&gt;
2536
2537<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.7&gt;
2538
2539<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2540<x:ref>warn-code</x:ref> = 3DIGIT
2541<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2542<x:ref>warn-text</x:ref> = quoted-string
2543<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
2544 ]
2545</artwork>
2546</figure>
2547</section>
2548<?ENDINC p6-cache.abnf-appendix ?>
2549
2550<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
2551<t>
2552  Changes up to the first Working Group Last Call draft are summarized
2553  in <eref target="http://trac.tools.ietf.org/html/draft-ietf-httpbis-p6-cache-19#appendix-C"/>.
2554</t>
2555
2556<section title="Since draft-ietf-httpbis-p6-cache-19" anchor="changes.since.19">
2557<t>
2558  Closed issues:
2559  <list style="symbols">
2560    <t>
2561      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/307"/>:
2562      "untangle Cache-Control ABNF"
2563    </t>
2564    <t>
2565      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/353"/>:
2566      "Multiple values in Cache-Control header fields"
2567    </t>
2568    <t>
2569      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/355"/>:
2570      "Case sensitivity of header fields in CC values"
2571    </t>
2572    <t>
2573      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/356"/>:
2574      "Spurious 'MAYs'"
2575    </t>
2576    <t>
2577      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/360"/>:
2578      "enhance considerations for new cache control directives"
2579    </t>
2580    <t>
2581      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
2582      "ABNF requirements for recipients"
2583    </t>
2584    <t>
2585      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/368"/>:
2586      "note introduction of new IANA registries as normative changes"
2587    </t>
2588    <t>
2589      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/373"/>:
2590      "broken prose in description of 'Vary'"
2591    </t>
2592  </list>
2593</t>
2594</section>
2595
2596<section title="Since draft-ietf-httpbis-p6-cache-20" anchor="changes.since.20">
2597<t>
2598  Closed issues:
2599  <list style="symbols">
2600    <t>
2601      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/375"/>:
2602      "'Most Conservative'"
2603    </t>
2604  </list>
2605</t>
2606<t>
2607  Other changes:
2608  <list style="symbols">
2609    <t>
2610      Conformance criteria and considerations regarding error handling are
2611      now defined in Part 1.
2612    </t>
2613    <t>
2614      Move definition of "Vary" header field into Part 2.
2615    </t>
2616    <t>
2617      Add security considerations with respect to cache poisoning and
2618      the "Set-Cookie" header field.
2619    </t>
2620  </list>
2621</t>
2622</section>
2623
2624<section title="Since draft-ietf-httpbis-p6-cache-21" anchor="changes.since.21">
2625<t>
2626  Closed issues:
2627  <list style="symbols">
2628    <t>
2629      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/223"/>:
2630      "Allowing heuristic caching for new status codes"
2631    </t>
2632    <t>
2633      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/406"/>:
2634      "304 without validator"
2635    </t>
2636    <t>
2637      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/418"/>:
2638      "No-Transform"
2639    </t>
2640    <t>
2641      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/430"/>:
2642      "Revert prior change to the meaning of the public cache response
2643       directive.
2644    </t>
2645  </list>
2646</t>
2647</section>
2648
2649<section title="Since draft-ietf-httpbis-p6-cache-22" anchor="changes.since.22">
2650<t>
2651  Closed issues:
2652  <list style="symbols">
2653    <t>
2654      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/436"/>:
2655      "explain list expansion in ABNF appendices"
2656    </t>
2657    <t>
2658      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/453"/>:
2659      "Returning the freshest response"
2660    </t>
2661    <t>
2662      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/464"/>:
2663      "placement of extension point considerations"
2664    </t>
2665    <t>
2666      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/469"/>:
2667      "Editorial notes for p6"
2668    </t>
2669    <t>
2670      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/471"/>:
2671      "Vary and future requests"
2672    </t>
2673  </list>
2674</t>
2675</section>
2676
2677<section title="Since draft-ietf-httpbis-p6-cache-23" anchor="changes.since.23">
2678<t>
2679   None yet.
2680</t>
2681</section>
2682</section>
2683  </back>
2684</rfc>
Note: See TracBrowser for help on using the repository browser.