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

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

Note change in [943] relating to issue 235 (see #235)

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