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

Last change on this file since 1110 was 1110, checked in by mnot@…, 9 years ago

Clarify the effect of no-store in requests upon cached responses #249

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