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

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

Remove "Changes from RFC 2068" sections (see #220)

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