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

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

Addresses #109: Clarify entity / representation / variant terminology

Replaced entity with representation.

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