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

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

Bump up document dates, update to latest versions of rfc2629.xslt and xml2rfc.tcl

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