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

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

add note about heuristic caching when query component is present (point out the history of it) (see #211)

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