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

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

align sbatracts and put a paragraph break inside for readability

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