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

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

(editorial) that vs which

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