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

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

make "Note" formatting more consistent

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