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

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

fix issue list link in boilerplate

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