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

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

clarify that when a response isn't selected, nothing is updated

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 103.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 "November">
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]>
47<?rfc toc="yes" ?>
48<?rfc symrefs="yes" ?>
49<?rfc sortrefs="yes" ?>
50<?rfc compact="yes"?>
51<?rfc subcompact="no" ?>
52<?rfc linkmailto="no" ?>
53<?rfc editing="no" ?>
54<?rfc comments="yes"?>
55<?rfc inline="yes"?>
56<?rfc rfcedstyle="yes"?>
57<?rfc-ext allow-markup-in-artwork="yes" ?>
58<?rfc-ext include-references-in-index="yes" ?>
59<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
60  obsoletes="2616" x:maturity-level="proposed" xmlns:x="http://purl.org/net/xml2rfc/ext">
61<x:link rel="prev" basename="p5-range"/>
62<x:link rel="next" basename="p7-auth"/>
63<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
64<front>
65
66  <title abbrev="HTTP/1.1 Caching">Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
67
68  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
69    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
70    <address>
71      <postal>
72        <street>345 Park Ave</street>
73        <city>San Jose</city>
74        <region>CA</region>
75        <code>95110</code>
76        <country>USA</country>
77      </postal>
78      <email>fielding@gbiv.com</email>
79      <uri>http://roy.gbiv.com/</uri>
80    </address>
81  </author>
82
83  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
84    <organization>Akamai</organization>
85    <address>
86      <email>mnot@mnot.net</email>
87      <uri>http://www.mnot.net/</uri>
88    </address>
89  </author>
90
91  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
92    <organization abbrev="greenbytes">greenbytes GmbH</organization>
93    <address>
94      <postal>
95        <street>Hafenweg 16</street>
96        <city>Muenster</city><region>NW</region><code>48155</code>
97        <country>Germany</country>
98      </postal>
99      <email>julian.reschke@greenbytes.de</email>
100      <uri>http://greenbytes.de/tech/webdav/</uri>
101    </address>
102  </author>
103
104  <date month="&ID-MONTH;" year="&ID-YEAR;" />
105  <workgroup>HTTPbis Working Group</workgroup>
106
107<abstract>
108<t>
109   The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
110   distributed, collaborative, hypertext information systems. This document
111   defines requirements on HTTP caches and the associated header fields
112   that control cache behavior or indicate cacheable response messages.
113</t>
114</abstract>
115
116<note title="Editorial Note (To be removed by RFC Editor)">
117  <t>
118    Discussion of this draft takes place on the HTTPBIS working group
119    mailing list (ietf-http-wg@w3.org), which is archived at
120    <eref target="http://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
121  </t>
122  <t>
123    The current issues list is at
124    <eref target="http://tools.ietf.org/wg/httpbis/trac/report/3"/> and related
125    documents (including fancy diffs) can be found at
126    <eref target="http://tools.ietf.org/wg/httpbis/"/>.
127  </t>
128  <t>
129    The changes in this draft are summarized in <xref target="changes.since.21"/>.
130  </t>
131</note>
132
133   </front>
134   <middle>
135
136<section anchor="caching" title="Introduction">
137<t>
138   HTTP is typically used for distributed information systems, where
139   performance can be improved by the use of response caches. This document
140   defines aspects of HTTP/1.1 related to caching and reusing response
141   messages.
142</t>
143
144<section anchor="intro.purpose" title="Purpose">
145<iref item="cache" />
146<t>
147   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the
148   subsystem that controls its message storage, retrieval, and deletion. A
149   cache stores cacheable responses in order to reduce the response time and
150   network bandwidth consumption on future, equivalent requests. Any client or
151   server &MAY; employ a cache, though a cache cannot be used by a server that
152   is acting as a tunnel.
153</t>
154<t>
155   The goal of caching in HTTP/1.1 is to significantly improve performance
156   by reusing a prior response message to satisfy a current request.
157   A stored response is considered "fresh", as defined in
158   <xref target="expiration.model" />, if the response can be reused without
159   "validation" (checking with the origin server to see if the cached response
160   remains valid for this request).  A fresh cache response can therefore
161   reduce both latency and network transfers each time it is reused.
162   When a cached response is not fresh, it might still be reusable if it can
163   be freshened by validation (<xref target="validation.model" />) or if the
164   origin is unavailable.
165</t>
166</section>
167
168<section anchor="intro.terminology" title="Terminology">
169<t>
170   This specification uses a number of terms to refer to the roles played by
171   participants in, and objects of, HTTP caching.
172</t>
173<t>
174   <iref item="cache" />
175   <x:dfn>cache</x:dfn>
176   <list>
177      <t>A conformant implementation of a HTTP cache. Note that this implies
178        an HTTP/1.1 cache; this specification does not define conformance
179        for HTTP/1.0 caches.</t>
180   </list>
181</t>
182<t anchor="shared.and.non-shared.caches">
183   <iref item="shared cache" />
184   <x:dfn>shared cache</x:dfn>
185   <list>
186      <t>A cache that stores responses to be reused by more than one user;
187         usually (but not always) deployed as part of an intermediary.</t>
188   </list>
189</t>
190<t>
191   <iref item="private cache" />
192   <x:dfn>private cache</x:dfn>
193   <list>
194      <t>A cache that is dedicated to a single user.</t>
195   </list>
196</t>
197<t>
198   <iref item="cacheable" />
199   <x:dfn>cacheable</x:dfn>
200   <list>
201      <t>A response is cacheable if a cache is allowed to store a copy of the
202      response message for use in answering subsequent requests. Even when a
203      response is cacheable, there might be additional constraints on whether
204      a cache can use the stored copy to satisfy a particular request.</t>
205   </list>
206</t>
207<t>
208   <iref item="explicit expiration time" />
209   <x:dfn>explicit expiration time</x:dfn>
210   <list>
211      <t>The time at which the origin server intends that a representation
212      no longer be returned by a cache without further validation.</t>
213   </list>
214</t>
215<t>
216   <iref item="heuristic expiration time" />
217   <x:dfn>heuristic expiration time</x:dfn>
218   <list>
219      <t>An expiration time assigned by a cache when no explicit expiration
220      time is available.</t>
221   </list>
222</t>
223<t>
224   <iref item="age" />
225   <x:dfn>age</x:dfn>
226   <list>
227      <t>The age of a response is the time since it was sent by, or
228      successfully validated with, the origin server.</t>
229   </list>
230</t>
231<t>
232   <iref item="first-hand" />
233   <x:dfn>first-hand</x:dfn>
234   <list>
235      <t>A response is first-hand if the freshness model is not in use; i.e.,
236      its age is 0.</t>
237   </list>
238</t>
239<t>
240   <iref item="freshness lifetime" />
241   <x:dfn>freshness lifetime</x:dfn>
242   <list>
243      <t>The length of time between the generation of a response and its
244      expiration time.</t>
245   </list>
246</t>
247<t>
248   <iref item="fresh" />
249   <x:dfn>fresh</x:dfn>
250   <list>
251      <t>A response is fresh if its age has not yet exceeded its freshness
252      lifetime.</t>
253   </list>
254</t>
255<t>
256   <iref item="stale" />
257   <x:dfn>stale</x:dfn>
258   <list>
259      <t>A response is stale if its age has passed its freshness lifetime
260      (either explicit or heuristic).</t>
261   </list>
262</t>
263<t>
264   <iref item="validator" />
265   <x:dfn>validator</x:dfn>
266   <list>
267      <t>A protocol element (e.g., an entity-tag or a <x:ref>Last-Modified</x:ref>
268      time) that is used to find out whether a stored response is an equivalent
269      copy of a representation. See &weak-and-strong;.</t>
270   </list>
271</t>
272<t>
273   <iref item="strong validator" />
274   <iref item="validator" subitem="strong" />
275   <x:dfn>strong validator</x:dfn>
276   <list>
277      <t>A validator that is defined by the origin server such that its
278         current value will change if the representation data changes; i.e.,
279         an entity-tag that is not marked as weak (&entity-tags;) or,
280         if no entity-tag is provided, a <x:ref>Last-Modified</x:ref> value
281         that is strong in the sense defined by &lastmod-comparison;.</t>
282   </list>
283</t>
284</section>
285
286<section title="Conformance and Error Handling" anchor="conformance">
287<t>
288   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
289   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
290   document are to be interpreted as described in <xref target="RFC2119"/>.
291</t>
292<t>
293   Conformance criteria and considerations regarding error handling
294   are defined in &conformance;.
295</t>
296</section>
297
298<section title="Syntax Notation" anchor="notation">
299<t>
300   This specification uses the Augmented Backus-Naur Form (ABNF) notation
301   of <xref target="RFC5234"/> with the list rule extension defined in
302   &notation;. <xref target="imported.abnf"/> describes rules imported from
303   other documents. <xref target="collected.abnf"/> shows the collected ABNF
304   with the list rule expanded.
305</t>
306
307<section title="Delta Seconds" anchor="delta-seconds">
308<t>
309   The delta-seconds rule specifies a non-negative integer, representing time
310   in seconds.
311</t>
312<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
313  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
314</artwork></figure>
315<t>
316   If an implementation receives a delta-seconds value larger than the largest
317   positive integer it can represent, or if any of its subsequent calculations
318   overflows, it &MUST; consider the value to be 2147483648
319   (2<x:sup>31</x:sup>). Recipients parsing a delta-seconds value &MUST; use
320   an arithmetic type of at least 31 bits of range, and senders &MUST-NOT;
321   send delta-seconds with a value greater than 2147483648.
322</t>
323</section>
324
325</section>
326</section>
327
328<section anchor="caching.overview" title="Overview of Cache Operation">
329<iref item="cache entry" />
330<iref item="cache key" />
331<t>
332   Proper cache operation preserves the semantics of HTTP transfers
333   (&semantics;) while eliminating the transfer of information already held
334   in the cache.  Although caching is an entirely &OPTIONAL; feature of HTTP,
335   we assume that reusing the cached response is desirable and that such
336   reuse is the default behavior when no requirement or locally-desired
337   configuration prevents it.  Therefore, HTTP cache requirements are focused
338   on preventing a cache from either storing a non-reusable response or
339   reusing a stored response inappropriately.
340</t>
341<t>
342   Each <x:dfn>cache entry</x:dfn> consists of a cache key and one or more
343   HTTP responses corresponding to prior requests that used the same key. The
344   most common form of cache entry is a successful result of a retrieval
345   request: i.e., a <x:ref>200 (OK)</x:ref> response containing a
346   representation of the resource identified by the request target. However,
347   it is also possible to cache negative results (e.g., <x:ref>404 (Not
348   Found)</x:ref>, incomplete results (e.g., <x:ref>206 (Partial
349   Content)</x:ref>), and responses to methods other than GET if the method's
350   definition allows such caching and defines something suitable for use as a
351   cache key.
352</t>
353<t>
354   The default <x:dfn>cache key</x:dfn> consists of the request method and
355   target URI.  However, since HTTP caches in common use today are typically
356   limited to caching responses to GET, many implementations simply decline
357   other methods and use only the URI as the key.
358</t>
359<t>
360   If a request target is subject to content negotiation, its cache entry
361   might consist of multiple stored responses, each differentiated by a
362   secondary key for the values of the original request's selecting header
363   fields (<xref target="caching.negotiated.responses"/>).
364</t>
365</section>
366
367<section anchor="response.cacheability" title="Storing Responses in Caches">
368<t>
369   A cache &MUST-NOT; store a response to any request, unless:
370   <list style="symbols">
371      <t>The request method is understood by the cache and defined as being
372      cacheable, and</t>
373      <t>the response status code is understood by the cache, and</t>
374      <t>the "no-store" cache directive (see <xref
375      target="header.cache-control" />) does not appear in request or response
376      header fields, and</t>
377      <t>the "private" cache response directive (see <xref
378      target="cache-response-directive.private" />) does not appear in the
379      response, if the cache is shared, and</t>
380      <t>the <x:ref>Authorization</x:ref> header field (see
381      &header-authorization;) does not appear in the request, if the cache is
382      shared, unless the response explicitly allows it (see <xref
383      target="caching.authenticated.responses" />), and</t>
384      <t>the response either:
385         <list style="symbols">
386            <t>contains an <x:ref>Expires</x:ref> header field (see
387            <xref target="header.expires"/>), or</t>
388            <t>contains a max-age response cache directive (see <xref
389            target="cache-response-directive.max-age" />), or</t>
390            <t>contains a s-maxage response cache directive and the cache is
391            shared, or</t>
392            <t>contains a Cache Control Extension (see <xref
393            target="cache.control.extensions" />) that allows it to be cached,
394            or</t>
395            <t>has a status code that can be served with heuristic freshness
396            (see <xref target="heuristic.freshness" />).</t>
397         </list>
398      </t>
399   </list>
400</t>
401<t>
402   Note that any of the requirements listed above can be overridden by a
403   cache-control extension; see <xref target="cache.control.extensions" />.
404</t>
405<t>
406   In this context, a cache has "understood" a request method or a response
407   status code if it recognizes it and implements any cache-specific
408   behavior.
409</t>
410<t>
411   Note that, in normal operation, many caches will not store a response that
412   has neither a cache validator nor an explicit expiration time, as such
413   responses are not usually useful to store. However, caches are not
414   prohibited from storing such responses.
415</t>
416
417<section anchor="incomplete.responses" title="Storing Incomplete Responses">
418<t>
419   A response message is considered complete when all of the octets indicated
420   by the message framing (&messaging;) are received prior to the connection
421   being closed. If the request is GET, the response status is <x:ref>200
422   (OK)</x:ref>, and the entire response header block has been received, a
423   cache &MAY; store an incomplete response message body if the cache entry is
424   recorded as incomplete. Likewise, a <x:ref>206 (Partial Content)</x:ref>
425   response &MAY; be stored as if it were an incomplete <x:ref>200
426   (OK)</x:ref> cache entry. However, a cache &MUST-NOT; store incomplete or
427   partial content responses if it does not support the <x:ref>Range</x:ref>
428   and <x:ref>Content-Range</x:ref> header fields or if it does not understand
429   the range units used in those fields.
430</t>
431<t>
432   A cache &MAY; complete a stored incomplete response by making a subsequent
433   range request (&partial;) and combining the successful response with the
434   stored entry, as defined in <xref target="combining.responses"/>. A cache
435   &MUST-NOT; use an incomplete response to answer requests unless the
436   response has been made complete or the request is partial and specifies a
437   range that is wholly within the incomplete response. A cache &MUST-NOT;
438   send a partial response to a client without explicitly marking it as such
439   using the <x:ref>206 (Partial Content)</x:ref> status code.
440</t>
441</section>
442
443
444<section anchor="caching.authenticated.responses" 
445   title="Storing Responses to Authenticated Requests">
446<t>
447   A shared cache &MUST-NOT; use a cached response to a request with an
448   <x:ref>Authorization</x:ref> header field (&header-authorization;) to
449   satisfy any subsequent request unless a cache directive that allows such
450   responses to be stored is present in the response.
451</t>
452<t>
453   In this specification, the following <x:ref>Cache-Control</x:ref> response
454   directives (<xref target="cache-response-directive"/>) have such an effect:
455   must-revalidate, public, s-maxage.
456</t>
457<t>
458   Note that cached responses that contain the "must-revalidate" and/or
459   "s-maxage" response directives are not allowed to be served stale (<xref
460   target="serving.stale.responses"/>) by shared caches. In particular, a
461   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
462   used to satisfy a subsequent request without revalidating it on the origin
463   server.
464</t>
465</section>
466</section>
467
468
469<section anchor="constructing.responses.from.caches" 
470   title="Constructing Responses from Caches">
471<t>
472   For a presented request, a cache &MUST-NOT; return a stored response,
473   unless:
474   <list style="symbols">
475      <t>The presented effective request URI (&effective-request-uri;) and
476      that of the stored response match, and</t>
477      <t>the request method associated with the stored response allows it to
478      be used for the presented request, and</t>
479      <t>selecting header fields nominated by the stored response (if any)
480      match those presented (see <xref target="caching.negotiated.responses"
481      />), and</t>
482      <t>the presented request does not contain the no-cache pragma (<xref
483      target="header.pragma"/>), nor the no-cache cache directive (<xref
484      target="cache-request-directive"/>), unless the stored response is
485      successfully validated (<xref target="validation.model"/>), and</t>
486      <t>the stored response does not contain the no-cache cache directive
487      (<xref target="cache-response-directive.no-cache"/>), unless it is
488      successfully validated (<xref target="validation.model"/>), and</t>
489      <t>the stored response is either:
490         <list style="symbols">
491            <t>fresh (see <xref target="expiration.model" />), or</t>
492            <t>allowed to be served stale (see <xref
493            target="serving.stale.responses" />), or</t>
494            <t>successfully validated (see <xref target="validation.model"
495            />).</t>
496         </list>
497      </t>
498  </list>
499</t>
500<t>
501   Note that any of the requirements listed above can be overridden by a
502   cache-control extension; see <xref target="cache.control.extensions" />.
503</t>
504<t>
505   When a stored response is used to satisfy a request without validation,
506   a cache &MUST; include a single <x:ref>Age</x:ref> header field
507   (<xref target="header.age"/>) in the response with a value equal to the
508   stored response's current_age; see <xref target="age.calculations" />.
509</t>
510<t>
511   A cache &MUST; write through requests with methods that are unsafe
512   (&safe-methods;) to the origin server; i.e., a cache is not allowed to
513   generate a reply to such a request before having forwarded the request and
514   having received a corresponding response.
515</t>
516<t>
517   Also, note that unsafe requests might invalidate already stored responses;
518   see <xref target="invalidation.after.updates.or.deletions" />.
519</t>
520<t>
521   When more than one suitable response is stored, a cache &MUST; use the
522   most recent response (as determined by the <x:ref>Date</x:ref> header
523   field). It can also forward a request with "Cache-Control: max-age=0" or
524   "Cache-Control: no-cache" to disambiguate which response to use.
525</t>
526<t>
527   A cache that does not have a clock available &MUST-NOT; use stored
528   responses without revalidating them on every use. A cache, especially a
529   shared cache, &SHOULD; use a mechanism, such as NTP <xref
530   target="RFC1305"/>, to synchronize its clock with a reliable external
531   standard.
532</t>
533
534
535<section anchor="expiration.model" title="Freshness Model">
536<t>
537   When a response is "fresh" in the cache, it can be used to satisfy
538   subsequent requests without contacting the origin server, thereby improving
539   efficiency.
540</t>
541<t>
542   The primary mechanism for determining freshness is for an origin server to
543   provide an explicit expiration time in the future, using either the
544   <x:ref>Expires</x:ref> header field (<xref target="header.expires" />) or
545   the max-age response cache directive (<xref
546   target="cache-response-directive.max-age" />). Generally, origin servers will
547   assign future explicit expiration times to responses in the belief that the
548   representation is not likely to change in a semantically significant way
549   before the expiration time is reached.
550</t>
551<t>
552   If an origin server wishes to force a cache to validate every request, it
553   can assign an explicit expiration time in the past to indicate that the
554   response is already stale. Compliant caches will normally validate a stale
555   cached response before reusing it for subsequent requests (see <xref
556   target="serving.stale.responses" />).
557</t>
558<t>
559   Since origin servers do not always provide explicit expiration times, a
560   cache &MAY; assign a heuristic expiration time when an explicit time is not
561   specified, employing algorithms that use other header field values (such as
562   the <x:ref>Last-Modified</x:ref> time) to estimate a plausible expiration
563   time. This specification does not provide specific algorithms, but does
564   impose worst-case constraints on their results.
565</t>
566<figure>
567<preamble>
568  The calculation to determine if a response is fresh is:
569</preamble>
570<artwork type="code">
571   response_is_fresh = (freshness_lifetime &gt; current_age)
572</artwork>
573</figure>
574<t>
575   The freshness_lifetime is defined in <xref
576   target="calculating.freshness.lifetime" />; the current_age is defined in
577   <xref target="age.calculations" />.
578</t>
579<t>
580   Additionally, clients can influence freshness calculation &mdash; either
581   constraining or it relaxing it &mdash; by using the max-age and min-fresh
582   request cache directives. See <xref target="cache-request-directive" /> 
583   for details.
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        which appears 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; return 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; return 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 return 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 returned 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; change the
1277   <x:ref>Content-Encoding</x:ref>, <x:ref>Content-Range</x:ref> or
1278   <x:ref>Content-Type</x:ref> request header fields, nor the request
1279   representation.
1280</t>
1281</section>
1282
1283<section title="only-if-cached" anchor="cache-request-directive.only-if-cached">
1284   <iref item="only-if-cached (cache directive)" primary="true" />
1285<t>
1286   The "only-if-cached" request directive indicates that the client only wishes
1287   to obtain a stored response. If it receives this directive, a cache &SHOULD;
1288   either respond using a stored response that is consistent with the other
1289   constraints of the request, or respond with a <x:ref>504 (Gateway
1290   Timeout)</x:ref> status code. If a group of caches is being operated as a
1291   unified system with good internal connectivity, a member cache &MAY;
1292   forward such a request within that group of caches.
1293</t>
1294</section>
1295</section>
1296
1297<section anchor="cache-response-directive" 
1298   title="Response Cache-Control Directives">
1299   <x:anchor-alias value="cache-response-directive" />
1300
1301<section title="public" anchor="cache-response-directive.only-if-cached">
1302   <iref item="public (cache directive)" primary="true" />
1303<t>
1304   The "public" response directive indicates that a response whose
1305   associated request contains an 'Authentication' header &MAY; be
1306   stored (see <xref target="caching.authenticated.responses" />).
1307</t>
1308</section>
1309
1310<section title="private" anchor="cache-response-directive.private">
1311   <iref item="private (cache directive)" primary="true" />
1312<t>
1313   Argument syntax:
1314   <list>
1315      <t>
1316        #<x:ref>field-name</x:ref>
1317      </t>
1318   </list>
1319</t>
1320<t>
1321   The "private" response directive indicates that the response message is
1322   intended for a single user and &MUST-NOT; be stored by a shared cache. A
1323   private cache &MAY; store the response.
1324</t>
1325<t>
1326   If the private response directive specifies one or more field-names,
1327   this requirement is limited to the field-values associated with the
1328   listed response header fields. That is, a shared cache &MUST-NOT; store
1329   the specified field-names(s), whereas it &MAY; store the remainder of the
1330   response message.
1331</t>
1332<t>
1333   The field-names given are not limited to the set of standard header
1334   fields defined by this specification. Field names are case-insensitive.
1335</t>
1336<t>
1337   &Note; This usage of the word "private" only controls
1338   where the response can be stored; it cannot ensure the privacy of the
1339   message content. Also, private response directives with field-names are
1340   often handled by implementations as if an unqualified private directive
1341   was received; i.e., the special handling for the qualified form is not
1342   widely implemented.
1343</t>
1344<t>
1345   &Note; This directive uses the quoted-string form of the argument syntax.
1346   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1347   needed for single-entry lists).
1348</t>
1349</section>
1350
1351<section title="no-cache" anchor="cache-response-directive.no-cache">
1352   <iref item="no-cache (cache directive)" primary="true" />
1353<t>
1354   Argument syntax:
1355   <list>
1356      <t>
1357        #<x:ref>field-name</x:ref>
1358      </t>
1359   </list>
1360</t>
1361<t>
1362   The "no-cache" response directive indicates that the response &MUST-NOT;
1363   be used to satisfy a subsequent request without successful validation on
1364   the origin server. This allows an origin server to prevent a cache from
1365   using it to satisfy a request without contacting it, even by caches that
1366   have been configured to return stale responses.
1367</t>
1368<t>
1369   If the no-cache response directive specifies one or more field-names,
1370   then a cache &MAY; use the response to satisfy a subsequent request,
1371   subject to any other restrictions on caching. However, any header fields
1372   in the response that have the field-name(s) listed &MUST-NOT; be sent
1373   in the response to a subsequent request without successful revalidation
1374   with the origin server. This allows an origin server to prevent the
1375   re-use of certain header fields in a response, while still allowing
1376   caching of the rest of the response.
1377</t> 
1378<t>
1379   The field-names given are not limited to the set of standard header
1380   fields defined by this specification. Field names are case-insensitive.
1381</t>
1382<t>
1383   &Note; Many HTTP/1.0 caches will not recognize or obey
1384   this directive. Also, no-cache response directives with field-names are
1385   often handled by implementations as if an unqualified no-cache directive
1386   was received; i.e., the special handling for the qualified form is not
1387   widely implemented.
1388</t>
1389<t>
1390   &Note; This directive uses the quoted-string form of the argument syntax.
1391   Senders &SHOULD-NOT; use the token form (even if quoting appears not to be
1392   needed for single-entry lists).
1393</t>
1394</section>
1395
1396<section title="no-store" anchor="cache-response-directive.no-store">
1397   <iref item="no-store (cache directive)" primary="true" />
1398<t>
1399   The "no-store" response directive indicates that a cache &MUST-NOT;
1400   store any part of either the immediate request or response. This
1401   directive applies to both private and shared caches. "&MUST-NOT;
1402   store" in this context means that the cache &MUST-NOT; intentionally
1403   store the information in non-volatile storage, and &MUST; make a
1404   best-effort attempt to remove the information from volatile storage as
1405   promptly as possible after forwarding it.
1406</t>
1407<t>
1408   This directive is NOT a reliable or sufficient mechanism for ensuring
1409   privacy. In particular, malicious or compromised caches might not
1410   recognize or obey this directive, and communications networks might be
1411   vulnerable to eavesdropping.
1412</t>
1413</section>
1414
1415<section title="must-revalidate" anchor="cache-response-directive.must-revalidate">
1416   <iref item="must-revalidate (cache directive)" primary="true" />
1417<t>
1418   The "must-revalidate" response directive indicates that once it has
1419   become stale, a cache &MUST-NOT; use the response to satisfy subsequent
1420   requests without successful validation on the origin server.
1421</t>
1422<t>
1423   The must-revalidate directive is necessary to support reliable
1424   operation for certain protocol features. In all circumstances a
1425   cache &MUST; obey the must-revalidate directive; in particular,
1426   if a cache cannot reach the origin server for any reason, it &MUST;
1427   generate a <x:ref>504 (Gateway Timeout)</x:ref> response.
1428</t>
1429<t>
1430   The must-revalidate directive ought to be used by servers if and only
1431   if failure to validate a request on the representation could result in
1432   incorrect operation, such as a silently unexecuted financial
1433   transaction.
1434</t>
1435</section>
1436
1437<section title="proxy-revalidate" anchor="cache-response-directive.proxy-revalidate">
1438   <iref item="proxy-revalidate (cache directive)" primary="true" />
1439<t>
1440   The "proxy-revalidate" response directive has the same meaning as the
1441   must-revalidate response directive, except that it does not apply to
1442   private caches.
1443</t>
1444</section>
1445
1446<section title="max-age" anchor="cache-response-directive.max-age">
1447   <iref item="max-age (cache directive)" primary="true" />
1448<t>
1449   Argument syntax:
1450   <list>
1451      <t>
1452        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1453      </t>
1454   </list>
1455</t>
1456<t>
1457   The "max-age" response directive indicates that the response is to be
1458   considered stale after its age is greater than the specified number of
1459   seconds.
1460</t>
1461<t>
1462   &Note; This directive uses the token form of the argument syntax;
1463   e.g., 'max-age=5', not 'max-age="5"'. Senders &SHOULD-NOT; use the
1464   quoted-string form.
1465</t>
1466</section>     
1467
1468<section title="s-maxage" anchor="cache-response-directive.s-maxage">
1469   <iref item="s-maxage (cache directive)" primary="true" />
1470<t>
1471   Argument syntax:
1472   <list>
1473      <t>
1474        <x:ref>delta-seconds</x:ref> (see <xref target="delta-seconds"/>)
1475      </t>
1476   </list>
1477</t>
1478<t>
1479   The "s-maxage" response directive indicates that, in shared caches, the
1480   maximum age specified by this directive overrides the maximum age
1481   specified by either the max-age directive or the <x:ref>Expires</x:ref>
1482   header field. The s-maxage directive also implies the semantics of the
1483   proxy-revalidate response directive.
1484</t>
1485<t>
1486   &Note; This directive uses the token form of the argument syntax;
1487   e.g., 's-maxage=10', not 's-maxage="10"'. Senders &SHOULD-NOT; use the
1488   quoted-string form.
1489</t>
1490</section>
1491
1492<section title="no-transform" anchor="cache-response-directive.no-transform">
1493   <iref item="no-transform (cache directive)" primary="true" />
1494<t>
1495   The "no-transform" response directive indicates that an intermediary
1496   (regardless of whether it implements a cache) &MUST-NOT; change the
1497   <x:ref>Content-Encoding</x:ref>, <x:ref>Content-Range</x:ref> or
1498   <x:ref>Content-Type</x:ref> response header fields, nor the response
1499   representation.
1500</t>
1501</section>
1502
1503</section>
1504
1505<section anchor="cache.control.extensions" title="Cache Control Extensions">
1506<t>
1507   The Cache-Control header field can be extended through the use of one or
1508   more cache-extension tokens, each with an optional value. Informational
1509   extensions (those that do not require a change in cache behavior) can be
1510   added without changing the semantics of other directives. Behavioral
1511   extensions are designed to work by acting as modifiers to the existing base
1512   of cache directives. Both the new directive and the standard directive are
1513   supplied, such that applications that do not understand the new directive
1514   will default to the behavior specified by the standard directive, and those
1515   that understand the new directive will recognize it as modifying the
1516   requirements associated with the standard directive. In this way,
1517   extensions to the cache-control directives can be made without requiring
1518   changes to the base protocol.
1519</t>
1520<t>
1521   This extension mechanism depends on an HTTP cache obeying all of the
1522   cache-control directives defined for its native HTTP-version, obeying
1523   certain extensions, and ignoring all directives that it does not
1524   understand.
1525</t>
1526<t>
1527   For example, consider a hypothetical new response directive called
1528   "community" that acts as a modifier to the private directive. We define
1529   this new directive to mean that, in addition to any private cache, any
1530   cache that is shared only by members of the community named within its
1531   value is allowed to cache the response. An origin server wishing to allow
1532   the UCI community to use an otherwise private response in their shared
1533   cache(s) could do so by including
1534</t>
1535<figure><artwork type="example">
1536  Cache-Control: private, community="UCI"
1537</artwork></figure>
1538<t>
1539   A cache seeing this header field will act correctly even if the cache does
1540   not understand the community cache-extension, since it will also see and
1541   understand the private directive and thus default to the safe behavior.
1542</t>
1543<t>
1544   A cache &MUST; ignore unrecognized cache directives; it is assumed that any
1545   cache directive likely to be unrecognized by an HTTP/1.1 cache will be
1546   combined with standard directives (or the response's default cacheability)
1547   such that the cache behavior will remain minimally correct even if the
1548   cache does not understand the extension(s).
1549</t>
1550<t>
1551   New extension directives ought to consider defining:
1552</t>
1553<t>
1554   <list style="symbols">
1555      <t>What it means for a directive to be specified multiple times,</t>
1556      <t>When the directive does not take an argument, what it means when an
1557      argument is present,</t>
1558      <t>When the directive requires an argument, what it means when it is
1559      missing.</t>
1560   </list>
1561</t>
1562<t>
1563   The HTTP Cache Directive Registry defines the name space for the cache
1564   directives.
1565</t>
1566<t>
1567   A registration &MUST; include the following fields:
1568   <list style="symbols">
1569      <t>Cache Directive Name</t>
1570      <t>Pointer to specification text</t>
1571   </list>
1572</t>
1573<t>
1574   Values to be added to this name space require IETF Review (see <xref
1575   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1576</t>
1577<t>
1578   The registry itself is maintained at <eref
1579   target="http://www.iana.org/assignments/http-cache-directives"/>.
1580</t>
1581</section>
1582
1583</section>
1584
1585<section anchor="header.expires" title="Expires">
1586   <iref item="Expires header field" primary="true" x:for-anchor="" />
1587   <x:anchor-alias value="Expires"/>
1588<t>
1589   The "Expires" header field gives the date/time after which the
1590   response is considered stale. See <xref target="expiration.model" /> for
1591   further discussion of the freshness model.
1592</t>
1593<t>
1594   The presence of an Expires field does not imply that the original resource
1595   will change or cease to exist at, before, or after that time.
1596</t>
1597<t>
1598   The field-value is an absolute date and time as defined by HTTP-date in
1599   &http-date;; a sender &MUST; use the rfc1123-date format.
1600</t>
1601<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
1602  <x:ref>Expires</x:ref> = <x:ref>HTTP-date</x:ref>
1603</artwork></figure>
1604<figure>
1605  <preamble>For example</preamble>
1606<artwork type="example">
1607  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1608</artwork></figure>
1609<t>
1610   A cache &MUST; treat other invalid date formats,
1611   especially including the value "0", as in the past (i.e., "already
1612   expired").
1613</t>
1614<x:note>
1615   <t>
1616       &Note; If a response includes a <x:ref>Cache-Control</x:ref> field with
1617       the max-age directive (see <xref target="cache-response-directive.max-age" />),
1618       that directive overrides the Expires field. Likewise, the s-maxage
1619       directive (<xref target="cache-response-directive.s-maxage" />) overrides
1620       the <x:ref>Expires</x:ref> header field in shared caches.
1621   </t>
1622</x:note>
1623<t>
1624   Historically, HTTP required the Expires field-value to be no more than a
1625   year in the future. While longer freshness lifetimes are no longer
1626   prohibited, extremely large values have been demonstrated to cause
1627   problems (e.g., clock overflows due to use of 32-bit integers for
1628   time values), and many caches will evict a response far sooner than
1629   that. Therefore, senders ought not produce them.
1630</t>
1631<t>
1632   An origin server without a clock &MUST-NOT; assign Expires
1633   values to a response unless these values were associated
1634   with the resource by a system or user with a reliable clock. It &MAY;
1635   assign an Expires value that is known, at or before server
1636   configuration time, to be in the past (this allows "pre-expiration"
1637   of responses without storing separate Expires values for each
1638   resource).
1639</t>
1640</section>
1641
1642<section anchor="header.pragma" title="Pragma">
1643   <iref item="Pragma header field" primary="true" x:for-anchor="" />
1644   <x:anchor-alias value="extension-pragma"/>
1645   <x:anchor-alias value="Pragma"/>
1646   <x:anchor-alias value="pragma-directive"/>
1647<t>
1648   The "Pragma" header field allows backwards compatibility with HTTP/1.0
1649   caches, so that clients can specify a "no-cache" request that they will
1650   understand (as <x:ref>Cache-Control</x:ref> was not defined until HTTP/1.1).
1651   When the Cache-Control header field is also present and understood in a
1652   request, Pragma is ignored.
1653</t>
1654<t>
1655   In HTTP/1.0, Pragma was defined as an extensible field for
1656   implementation-specified directives for recipients. This specification
1657   deprecates such extensions to improve interoperability.
1658</t>
1659<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"/>
1660  <x:ref>Pragma</x:ref>           = 1#<x:ref>pragma-directive</x:ref>
1661  <x:ref>pragma-directive</x:ref> = "no-cache" / <x:ref>extension-pragma</x:ref>
1662  <x:ref>extension-pragma</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1663</artwork></figure>
1664<t>
1665   When the <x:ref>Cache-Control</x:ref> header field is not present in a
1666   request, the no-cache request pragma-directive &MUST; have the same effect
1667   on caches as if "Cache-Control: no-cache" were present (see <xref
1668   target="cache-request-directive" />).
1669</t>
1670<t>
1671   When sending a no-cache request, a client ought to include both the pragma
1672   and cache-control directives, unless Cache-Control: no-cache is
1673   purposefully omitted to target other <x:ref>Cache-Control</x:ref> response
1674   directives at HTTP/1.1 caches. For example:
1675</t>
1676<figure>
1677<artwork type="message/http; msgtype=&#34;response&#34;" x:indent-with="  ">
1678GET / HTTP/1.1
1679Host: www.example.com
1680Cache-Control: max-age=30
1681Pragma: no-cache
1682
1683</artwork>
1684</figure>
1685<t>
1686   will constrain HTTP/1.1 caches to serve a response no older than 30
1687   seconds, while precluding implementations that do not understand
1688   <x:ref>Cache-Control</x:ref> from serving a cached response.
1689</t>
1690<x:note>
1691   <t>
1692      &Note; Because the meaning of "Pragma: no-cache" in responses is not
1693      specified, it does not provide a reliable replacement for
1694      "Cache-Control: no-cache" in them.
1695   </t>
1696</x:note>
1697</section>
1698
1699<section anchor="header.warning" title="Warning">
1700   <iref item="Warning header field" primary="true" x:for-anchor="" />
1701   <x:anchor-alias value="Warning"/>
1702   <x:anchor-alias value="warning-value"/>
1703   <x:anchor-alias value="warn-agent"/>
1704   <x:anchor-alias value="warn-code"/>
1705   <x:anchor-alias value="warn-date"/>
1706   <x:anchor-alias value="warn-text"/>
1707<t>
1708   The "Warning" header field is used to carry additional information
1709   about the status or transformation of a message that might not be reflected
1710   in the message. This information is typically used to warn about possible
1711   incorrectness introduced by caching operations or transformations applied
1712   to the payload of the message.
1713</t>
1714<t>
1715   Warnings can be used for other purposes, both cache-related and otherwise.
1716   The use of a warning, rather than an error status code, distinguishes these
1717   responses from true failures.
1718</t>
1719<t>
1720   Warning header fields can in general be applied to any message, however some
1721   warn-codes are specific to caches and can only be applied to response
1722   messages.
1723</t>
1724<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"/>
1725  <x:ref>Warning</x:ref>       = 1#<x:ref>warning-value</x:ref>
1726 
1727  <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>
1728                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
1729 
1730  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
1731  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
1732                  ; the name or pseudonym of the server adding
1733                  ; the Warning header field, for use in debugging
1734  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1735  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
1736</artwork></figure>
1737<t>
1738   Multiple warnings can be attached to a response (either by the origin
1739   server or by a cache), including multiple warnings with the same code
1740   number, only differing in warn-text.
1741</t>
1742<t>
1743   When this occurs, the user agent &SHOULD; inform the user of as many of
1744   them as possible, in the order that they appear in the response.
1745</t>
1746<t>
1747   Systems that generate multiple Warning header fields are encouraged to
1748   order them with this user agent behavior in mind. New Warning header fields
1749   are added after any existing Warning header fields.
1750</t>
1751<t>
1752   Warnings are assigned three digit warn-codes. The first digit indicates
1753   whether the Warning is required to be deleted from a stored response after
1754   validation:
1755   <list style="symbols">
1756      <t>1xx Warnings describe the freshness or validation status of the
1757      response, and so &MUST; be deleted by a cache after validation. They can
1758      only be generated by a cache when validating a cached entry, and
1759      &MUST-NOT; be generated in any other situation.</t>
1760      <t>2xx Warnings describe some aspect of the representation that is not
1761      rectified by a validation (for example, a lossy compression of the
1762      representation) and &MUST-NOT; be deleted by a cache after validation,
1763      unless a full response is returned, in which case they &MUST; be.</t>
1764   </list>
1765</t>
1766<t>
1767   If an implementation sends a message with one or more Warning header fields
1768   to a receiver whose version is HTTP/1.0 or lower, then the sender &MUST;
1769   include in each warning-value a warn-date that matches the
1770   <x:ref>Date</x:ref> header field in the message.
1771</t>
1772<t>
1773   If a system receives a message with a warning-value that includes a
1774   warn-date, and that warn-date is different from the <x:ref>Date</x:ref>
1775   value in the response, then that warning-value &MUST; be deleted from the
1776   message before storing, forwarding, or using it. (preventing the
1777   consequences of naive caching of Warning header fields.) If all of the
1778   warning-values are deleted for this reason, the Warning header field &MUST;
1779   be deleted as well.
1780</t>
1781<t>
1782   The following warn-codes are defined by this specification, each with a
1783   recommended warn-text in English, and a description of its meaning.
1784</t>
1785
1786<section title="110 Response is Stale" anchor="warn.110">
1787  <iref primary="true" item="110 Response is Stale (warn code)" x:for-anchor=""/>
1788<t>
1789   A cache &SHOULD; include this whenever the returned response is stale.
1790</t>
1791</section>
1792
1793<section title="111 Revalidation Failed" anchor="warn.111">
1794  <iref primary="true" item="111 Revalidation Failed (warn code)" x:for-anchor=""/>
1795<t>
1796   A cache &SHOULD; include this when returning a stale response because an
1797   attempt to validate the response failed, due to an inability to reach
1798   the server.
1799</t>
1800</section>
1801
1802<section title="112 Disconnected Operation" anchor="warn.112">
1803  <iref primary="true" item="112 Disconnected Operation (warn code)" x:for-anchor=""/>
1804<t>
1805   A cache &SHOULD; include this if it is intentionally disconnected from
1806   the rest of the network for a period of time.
1807</t>
1808</section>
1809
1810<section title="113 Heuristic Expiration" anchor="warn.113">
1811  <iref primary="true" item="113 Heuristic Expiration (warn code)" x:for-anchor=""/>
1812<t>
1813   A cache &SHOULD; include this if it heuristically chose a freshness
1814   lifetime greater than 24 hours and the response's age is greater than 24
1815   hours.
1816</t>
1817</section>
1818
1819<section title="199 Miscellaneous Warning" anchor="warn.199">
1820  <iref primary="true" item="199 Miscellaneous Warning (warn code)" x:for-anchor=""/>
1821<t>
1822   The warning text can include arbitrary information to be presented to
1823   a human user, or logged. A system receiving this warning &MUST-NOT; take
1824   any automated action, besides presenting the warning to the user.
1825</t>
1826</section>
1827
1828<section title="214 Transformation Applied" anchor="warn.214">
1829  <iref primary="true" item="214 Transformation Applied (warn code)" x:for-anchor=""/>
1830<t>
1831   &MUST; be added by a proxy if it applies any transformation to the
1832   representation, such as changing the content-coding, media-type, or
1833   modifying the representation data, unless this Warning code already appears
1834   in the response.
1835</t>
1836</section>
1837
1838<section title="299 Miscellaneous Persistent Warning" anchor="warn.299">
1839  <iref primary="true" item="299 Miscellaneous Persistent Warning (warn code)" x:for-anchor=""/>
1840<t>
1841   The warning text can include arbitrary information to be presented to
1842   a human user, or logged. A system receiving this warning &MUST-NOT; take
1843   any automated action.
1844</t>
1845</section>
1846
1847<section title="Warn Code Extensions" anchor="warn.code.extensions">
1848<t>
1849   The HTTP Warn Code Registry defines the name space for warn codes.
1850</t>
1851<t>
1852   A registration &MUST; include the following fields:
1853   <list style="symbols">
1854      <t>Warn Code (3 digits)</t>
1855      <t>Short Description</t>
1856      <t>Pointer to specification text</t>
1857   </list>
1858</t>
1859<t>
1860   Values to be added to this name space require IETF Review (see <xref
1861   target="RFC5226" x:fmt="," x:sec="4.1"/>).
1862</t>
1863<t>
1864   The registry itself is maintained at <eref
1865   target="http://www.iana.org/assignments/http-warn-codes"/>.
1866</t>
1867</section>
1868</section>
1869</section>
1870
1871<section anchor="history.lists" title="History Lists">
1872<t>
1873   User agents often have history mechanisms, such as "Back" buttons and
1874   history lists, that can be used to redisplay a representation retrieved
1875   earlier in a session.
1876</t>
1877<t>
1878   The freshness model (<xref target="expiration.model"/>) does not
1879   necessarily apply to history mechanisms. I.e., a history mechanism can
1880   display a previous representation even if it has expired.
1881</t>
1882<t>
1883   This does not prohibit the history mechanism from telling the user that a
1884   view might be stale, or from honoring cache directives (e.g.,
1885   Cache-Control: no-store).
1886</t>
1887</section>
1888
1889
1890<section anchor="IANA.considerations" title="IANA Considerations">
1891
1892<section title="Cache Directive Registry" 
1893   anchor="cache.directive.registration">
1894<t>
1895   The registration procedure for HTTP Cache Directives is defined by <xref
1896   target="cache.control.extensions"/> of this document.
1897</t>
1898<t>
1899   The HTTP Cache Directive Registry shall be created at <eref
1900   target="http://www.iana.org/assignments/http-cache-directives"/> and be
1901   populated with the registrations below:
1902</t>
1903<?BEGININC p6-cache.cache-directives ?>
1904<!--AUTOGENERATED FROM extract-cache-directives-defs.xslt, do not edit manually-->
1905<texttable xmlns:my="#my" align="left" suppress-title="true"
1906           anchor="iana.cache.directive.registration.table">
1907   <ttcol>Cache Directive</ttcol>
1908   <ttcol>Reference</ttcol>
1909
1910   <c>max-age</c>
1911   <c>
1912      <xref target="cache-request-directive.max-age"/>, <xref target="cache-response-directive.max-age"/>
1913   </c>
1914   <c>max-stale</c>
1915   <c>
1916      <xref target="cache-request-directive.max-stale"/>
1917   </c>
1918   <c>min-fresh</c>
1919   <c>
1920      <xref target="cache-request-directive.min-fresh"/>
1921   </c>
1922   <c>must-revalidate</c>
1923   <c>
1924      <xref target="cache-response-directive.must-revalidate"/>
1925   </c>
1926   <c>no-cache</c>
1927   <c>
1928      <xref target="cache-request-directive.no-cache"/>, <xref target="cache-response-directive.no-cache"/>
1929   </c>
1930   <c>no-store</c>
1931   <c>
1932      <xref target="cache-request-directive.no-store"/>, <xref target="cache-response-directive.no-store"/>
1933   </c>
1934   <c>no-transform</c>
1935   <c>
1936      <xref target="cache-request-directive.no-transform"/>, <xref target="cache-response-directive.no-transform"/>
1937   </c>
1938   <c>only-if-cached</c>
1939   <c>
1940      <xref target="cache-request-directive.only-if-cached"/>
1941   </c>
1942   <c>private</c>
1943   <c>
1944      <xref target="cache-response-directive.private"/>
1945   </c>
1946   <c>proxy-revalidate</c>
1947   <c>
1948      <xref target="cache-response-directive.proxy-revalidate"/>
1949   </c>
1950   <c>public</c>
1951   <c>
1952      <xref target="cache-response-directive.only-if-cached"/>
1953   </c>
1954   <c>s-maxage</c>
1955   <c>
1956      <xref target="cache-response-directive.s-maxage"/>
1957   </c>
1958   <c>stale-if-error</c>
1959   <c>
1960      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="4"/>
1961   </c>
1962   <c>stale-while-revalidate</c>
1963   <c>
1964      <xref xmlns:x="http://purl.org/net/xml2rfc/ext" target="RFC5861" x:fmt="," x:sec="3"/>
1965   </c>
1966</texttable>
1967<!--(END)-->
1968<?ENDINC p6-cache.cache-directives ?>
1969</section>
1970
1971<section title="Warn Code Registry" 
1972   anchor="warn.code.registration">
1973<t>
1974   The registration procedure for HTTP Warn Codes is defined by <xref
1975   target="warn.code.extensions"/> of this document.
1976</t>
1977<t>
1978   The HTTP Warn Code Registry shall be created at <eref
1979   target="http://www.iana.org/assignments/http-cache-directives"/> and be
1980   populated with the registrations below:
1981</t>
1982<?BEGININC p6-cache.iana-warn-codes ?>
1983<!--AUTOGENERATED FROM extract-warn-code-defs.xslt, do not edit manually-->
1984<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
1985   <ttcol>Warn Code</ttcol>
1986   <ttcol>Short Description</ttcol>
1987   <ttcol>Reference</ttcol>
1988   <c>110</c>
1989   <c>Response is Stale</c>
1990   <c>
1991      <xref target="warn.110"/>
1992   </c>
1993   <c>111</c>
1994   <c>Revalidation Failed</c>
1995   <c>
1996      <xref target="warn.111"/>
1997   </c>
1998   <c>112</c>
1999   <c>Disconnected Operation</c>
2000   <c>
2001      <xref target="warn.112"/>
2002   </c>
2003   <c>113</c>
2004   <c>Heuristic Expiration</c>
2005   <c>
2006      <xref target="warn.113"/>
2007   </c>
2008   <c>199</c>
2009   <c>Miscellaneous Warning</c>
2010   <c>
2011      <xref target="warn.199"/>
2012   </c>
2013   <c>214</c>
2014   <c>Transformation Applied</c>
2015   <c>
2016      <xref target="warn.214"/>
2017   </c>
2018   <c>299</c>
2019   <c>Miscellaneous Persistent Warning</c>
2020   <c>
2021      <xref target="warn.299"/>
2022   </c>
2023</texttable>
2024<!--(END)-->
2025<?ENDINC p6-cache.iana-warn-codes ?>
2026</section>
2027
2028<section title="Header Field Registration" anchor="header.field.registration">
2029<t>
2030  The Message Header Field Registry located at <eref 
2031  target="http://www.iana.org/assignments/message-headers/message-header-index.html" />
2032  shall be updated with the permanent registrations below (see <xref target="RFC3864" />):
2033</t>
2034<?BEGININC p6-cache.iana-headers ?>
2035<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
2036<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
2037   <ttcol>Header Field Name</ttcol>
2038   <ttcol>Protocol</ttcol>
2039   <ttcol>Status</ttcol>
2040   <ttcol>Reference</ttcol>
2041
2042   <c>Age</c>
2043   <c>http</c>
2044   <c>standard</c>
2045   <c>
2046      <xref target="header.age"/>
2047   </c>
2048   <c>Cache-Control</c>
2049   <c>http</c>
2050   <c>standard</c>
2051   <c>
2052      <xref target="header.cache-control"/>
2053   </c>
2054   <c>Expires</c>
2055   <c>http</c>
2056   <c>standard</c>
2057   <c>
2058      <xref target="header.expires"/>
2059   </c>
2060   <c>Pragma</c>
2061   <c>http</c>
2062   <c>standard</c>
2063   <c>
2064      <xref target="header.pragma"/>
2065   </c>
2066   <c>Warning</c>
2067   <c>http</c>
2068   <c>standard</c>
2069   <c>
2070      <xref target="header.warning"/>
2071   </c>
2072</texttable>
2073<!--(END)-->
2074<?ENDINC p6-cache.iana-headers ?>
2075<t>
2076   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task
2077   Force".
2078</t>
2079</section>
2080</section>
2081
2082<section anchor="security.considerations" title="Security Considerations">
2083<t>
2084   Caches expose additional potential vulnerabilities, since the contents of
2085   the cache represent an attractive target for malicious exploitation.
2086   Because cache contents persist after an HTTP request is complete, an attack
2087   on the cache can reveal information long after a user believes that the
2088   information has been removed from the network. Therefore, cache contents
2089   need to be protected as sensitive information.
2090</t>
2091<t>
2092   Furthermore, the very use of a cache can bring about privacy concerns. For
2093   example, if two users share a cache, and the first one browses to a site,
2094   the second may be able to detect that the other has been to that site,
2095   because the resources from it load more quickly, thanks to the cache.
2096</t>
2097<t>
2098   Implementation flaws might allow attackers to insert content into a cache
2099   ("cache poisoning"), leading to compromise of clients that trust that
2100   content. Because of their nature, these attacks are difficult to mitigate.
2101</t>
2102<t>
2103   Likewise, implementation flaws (as well as misunderstanding of cache
2104   operation) might lead to caching of sensitive information (e.g.,
2105   authentication credentials) that is thought to be private, exposing it to
2106   unauthorized parties.
2107</t>
2108<t>
2109   Note that the Set-Cookie response header <xref target="RFC6265"/> does not
2110   inhibit caching; a cacheable response with a Set-Cookie header can be (and
2111   often is) used to satisfy subsequent requests to caches. Servers who wish
2112   to control caching of these responses are encouraged to emit appropriate
2113   Cache-Control response headers.
2114</t>
2115
2116</section>
2117
2118<section title="Acknowledgments" anchor="acks">
2119<t>
2120  See &acks;.
2121</t>
2122</section>
2123
2124</middle>
2125
2126<back>
2127<references title="Normative References">
2128
2129  <reference anchor="Part1">
2130    <front>
2131      <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
2132      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2133        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2134        <address><email>fielding@gbiv.com</email></address>
2135      </author>
2136      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2137        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2138        <address><email>julian.reschke@greenbytes.de</email></address>
2139      </author>
2140      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2141    </front>
2142    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
2143    <x:source basename="p1-messaging" href="p1-messaging.xml">
2144      <x:defines>Content-Length</x:defines>
2145      <x:defines>Via</x:defines>
2146    </x:source>
2147  </reference>
2148
2149  <reference anchor="Part2">
2150    <front>
2151      <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
2152      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2153        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2154        <address><email>fielding@gbiv.com</email></address>
2155      </author>
2156      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2157        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2158        <address><email>julian.reschke@greenbytes.de</email></address>
2159      </author>
2160      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2161    </front>
2162    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
2163    <x:source basename="p2-semantics" href="p2-semantics.xml">
2164      <x:defines>2xx (Successful)</x:defines>
2165      <x:defines>200 (OK)</x:defines>
2166      <x:defines>203 (Non-Authoritative Information)</x:defines>
2167      <x:defines>3xx (Redirection)</x:defines>
2168      <x:defines>300 (Multiple Choices)</x:defines>
2169      <x:defines>301 (Moved Permanently)</x:defines>
2170      <x:defines>404 (Not Found)</x:defines>
2171      <x:defines>410 (Gone)</x:defines>
2172      <x:defines>5xx (Server Error)</x:defines>
2173      <x:defines>504 (Gateway Timeout)</x:defines>
2174      <x:defines>Content-Encoding</x:defines>
2175      <x:defines>Content-Location</x:defines>
2176      <x:defines>Content-Type</x:defines>
2177      <x:defines>Date</x:defines>
2178      <x:defines>Location</x:defines>
2179      <x:defines>Vary</x:defines>
2180    </x:source>
2181  </reference>
2182
2183  <reference anchor="Part4">
2184    <front>
2185      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
2186      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2187        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2188        <address><email>fielding@gbiv.com</email></address>
2189      </author>
2190      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2191        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2192        <address><email>julian.reschke@greenbytes.de</email></address>
2193      </author>
2194      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2195    </front>
2196    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
2197    <x:source basename="p4-conditional" href="p4-conditional.xml">
2198      <x:defines>304</x:defines>
2199      <x:defines>304 (Not Modified)</x:defines>
2200      <x:defines>ETag</x:defines>
2201      <x:defines>If-Modified-Since</x:defines>
2202      <x:defines>If-None-Match</x:defines>
2203      <x:defines>Last-Modified</x:defines>
2204    </x:source>
2205  </reference>
2206
2207  <reference anchor="Part5">
2208    <front>
2209      <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
2210      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2211        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2212        <address><email>fielding@gbiv.com</email></address>
2213      </author>
2214      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2215        <organization abbrev="W3C">World Wide Web Consortium</organization>
2216        <address><email>ylafon@w3.org</email></address>
2217      </author>
2218      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2219        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2220        <address><email>julian.reschke@greenbytes.de</email></address>
2221      </author>
2222      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2223    </front>
2224    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
2225    <x:source basename="p5-range" href="p5-range.xml">
2226      <x:defines>206 (Partial Content)</x:defines>
2227      <x:defines>Content-Range</x:defines>
2228      <x:defines>Range</x:defines>
2229    </x:source>
2230  </reference>
2231
2232  <reference anchor="Part7">
2233    <front>
2234      <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
2235      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2236        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2237        <address><email>fielding@gbiv.com</email></address>
2238      </author>
2239      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2240        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2241        <address><email>julian.reschke@greenbytes.de</email></address>
2242      </author>
2243      <date month="&ID-MONTH;" year="&ID-YEAR;" />
2244    </front>
2245    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
2246    <x:source basename="p7-auth" href="p7-auth.xml">
2247      <x:defines>Authorization</x:defines>
2248    </x:source>
2249  </reference>
2250
2251  <reference anchor="RFC2119">
2252    <front>
2253      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2254      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2255        <organization>Harvard University</organization>
2256        <address><email>sob@harvard.edu</email></address>
2257      </author>
2258      <date month="March" year="1997" />
2259    </front>
2260    <seriesInfo name="BCP" value="14" />
2261    <seriesInfo name="RFC" value="2119" />
2262  </reference>
2263
2264  <reference anchor="RFC5234">
2265    <front>
2266      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2267      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2268        <organization>Brandenburg InternetWorking</organization>
2269        <address>
2270          <email>dcrocker@bbiw.net</email>
2271        </address> 
2272      </author>
2273      <author initials="P." surname="Overell" fullname="Paul Overell">
2274        <organization>THUS plc.</organization>
2275        <address>
2276          <email>paul.overell@thus.net</email>
2277        </address>
2278      </author>
2279      <date month="January" year="2008"/>
2280    </front>
2281    <seriesInfo name="STD" value="68"/>
2282    <seriesInfo name="RFC" value="5234"/>
2283  </reference>
2284 
2285</references>
2286
2287<references title="Informative References">
2288
2289  <reference anchor="RFC1305">
2290    <front>
2291      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2292      <author fullname="David L. Mills" initials="D." surname="Mills">
2293        <organization>University of Delaware, Electrical Engineering Department</organization>
2294        <address><email>mills@udel.edu</email></address>
2295      </author>
2296      <date month="March" year="1992" />
2297    </front>
2298    <seriesInfo name="RFC" value="1305" />
2299  </reference>
2300
2301  <reference anchor="RFC2616">
2302    <front>
2303      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2304      <author fullname="R. Fielding" initials="R." surname="Fielding">
2305        <organization>University of California, Irvine</organization>
2306        <address><email>fielding@ics.uci.edu</email></address>
2307      </author>
2308      <author fullname="J. Gettys" initials="J." surname="Gettys">
2309        <organization>W3C</organization>
2310        <address><email>jg@w3.org</email></address>
2311      </author>
2312      <author fullname="J. Mogul" initials="J." surname="Mogul">
2313        <organization>Compaq Computer Corporation</organization>
2314        <address><email>mogul@wrl.dec.com</email></address>
2315      </author>
2316      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2317        <organization>MIT Laboratory for Computer Science</organization>
2318        <address><email>frystyk@w3.org</email></address>
2319      </author>
2320      <author fullname="L. Masinter" initials="L." surname="Masinter">
2321        <organization>Xerox Corporation</organization>
2322        <address><email>masinter@parc.xerox.com</email></address>
2323      </author>
2324      <author fullname="P. Leach" initials="P." surname="Leach">
2325        <organization>Microsoft Corporation</organization>
2326        <address><email>paulle@microsoft.com</email></address>
2327      </author>
2328      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2329        <organization>W3C</organization>
2330        <address><email>timbl@w3.org</email></address>
2331      </author>
2332      <date month="June" year="1999" />
2333    </front>
2334    <seriesInfo name="RFC" value="2616" />
2335  </reference>
2336
2337  <reference anchor="RFC3864">
2338    <front>
2339      <title>Registration Procedures for Message Header Fields</title>
2340      <author fullname="G. Klyne" initials="G." surname="Klyne">
2341        <organization>Nine by Nine</organization>
2342        <address><email>GK-IETF@ninebynine.org</email></address>
2343      </author>
2344      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2345        <organization>BEA Systems</organization>
2346        <address><email>mnot@pobox.com</email></address>
2347      </author>
2348      <author fullname="J. Mogul" initials="J." surname="Mogul">
2349        <organization>HP Labs</organization>
2350        <address><email>JeffMogul@acm.org</email></address>
2351      </author>
2352      <date month="September" year="2004" />
2353    </front>
2354    <seriesInfo name="BCP" value="90" />
2355    <seriesInfo name="RFC" value="3864" />
2356  </reference>
2357
2358  <reference anchor='RFC5226'>
2359    <front>
2360      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2361      <author initials='T.' surname='Narten' fullname='T. Narten'>
2362        <organization>IBM</organization>
2363        <address><email>narten@us.ibm.com</email></address>
2364      </author>
2365      <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
2366        <organization>Google</organization>
2367        <address><email>Harald@Alvestrand.no</email></address>
2368      </author>
2369      <date year='2008' month='May' />
2370    </front>
2371    <seriesInfo name='BCP' value='26' />
2372    <seriesInfo name='RFC' value='5226' />
2373  </reference>
2374
2375  <reference anchor='RFC5861'>
2376    <front>
2377      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2378      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2379        <organization>Yahoo! Inc.</organization>
2380        <address><email>mnot@yahoo-inc.com</email></address>
2381      </author>
2382      <date month="April" year="2010"/>
2383    </front>
2384    <seriesInfo name='RFC' value='5861' />
2385  </reference>
2386
2387  <reference anchor="RFC6265">
2388    <front>
2389      <title>HTTP State Management Mechanism</title>
2390      <author initials="A." surname="Barth" fullname="Adam Barth">
2391        <organization abbrev="U.C. Berkeley">
2392          University of California, Berkeley
2393        </organization>
2394        <address><email>abarth@eecs.berkeley.edu</email></address>
2395      </author>
2396      <date year="2011" month="April" />
2397    </front>
2398    <seriesInfo name="RFC" value="6265"/>
2399  </reference>
2400
2401</references>
2402
2403<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2404<t>
2405  Make the specified age calculation algorithm less conservative.
2406  (<xref target="age.calculations"/>)
2407</t>
2408<t>
2409  Remove requirement to consider "<x:ref>Content-Location</x:ref>" in successful
2410  responses in order to determine the appropriate response to use.
2411  (<xref target="validation.model" />)
2412</t>
2413<t>
2414  Clarify denial of service attack avoidance requirement.
2415  (<xref target="invalidation.after.updates.or.deletions" />)
2416</t>
2417<t>
2418  Do not mention RFC 2047 encoding and multiple languages in "<x:ref>Warning</x:ref>"
2419  header fields anymore, as these aspects never were implemented.
2420  (<xref target="header.warning" />)
2421</t>
2422<t>
2423  Introduce Cache Directive and Warn Code Registries.
2424  (<xref target="cache.control.extensions"/> and <xref target="warn.code.extensions"/>)
2425</t>
2426</section>
2427
2428<section title="Imported ABNF" anchor="imported.abnf">
2429   <x:anchor-alias value="ALPHA"/>
2430   <x:anchor-alias value="CR"/>
2431   <x:anchor-alias value="DIGIT"/>
2432   <x:anchor-alias value="DQUOTE"/>
2433   <x:anchor-alias value="LF"/>
2434   <x:anchor-alias value="OCTET"/>
2435   <x:anchor-alias value="SP"/>
2436   <x:anchor-alias value="VCHAR"/>
2437   <x:anchor-alias value="quoted-string"/>
2438   <x:anchor-alias value="token"/>
2439   <x:anchor-alias value="OWS"/>
2440   <x:anchor-alias value="field-name"/>
2441   <x:anchor-alias value="HTTP-date"/>
2442   <x:anchor-alias value="port"/>
2443   <x:anchor-alias value="pseudonym"/>
2444   <x:anchor-alias value="uri-host"/>
2445<t>
2446   The following core rules are included by reference, as defined in <xref
2447   target="RFC5234" x:fmt="of" x:sec="B.1"/>: ALPHA (letters), CR (carriage
2448   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
2449   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
2450   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
2451</t>
2452<t>
2453   The rules below are defined in <xref target="Part1"/>:
2454</t>
2455<figure><artwork type="abnf2616">
2456  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &whitespace;&gt;
2457  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &header-fields;&gt;
2458  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &field-components;&gt;
2459  <x:ref>token</x:ref>         = &lt;token, defined in &field-components;&gt;
2460
2461  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
2462  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
2463  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
2464</artwork></figure>
2465<t>
2466   The rules below are defined in other parts:
2467</t>
2468<figure><artwork type="abnf2616">
2469  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &http-date;&gt;
2470</artwork></figure>
2471</section>
2472
2473<?BEGININC p6-cache.abnf-appendix ?>
2474<section xmlns:x="http://purl.org/net/xml2rfc/ext" title="Collected ABNF" anchor="collected.abnf">
2475<figure>
2476<artwork type="abnf" name="p6-cache.parsed-abnf">
2477<x:ref>Age</x:ref> = delta-seconds
2478
2479<x:ref>Cache-Control</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
2480 cache-directive ] )
2481
2482<x:ref>Expires</x:ref> = HTTP-date
2483
2484<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part2], Section 8.1.1.1&gt;
2485
2486<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 3.2.1&gt;
2487
2488<x:ref>Pragma</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2489 pragma-directive ] )
2490
2491<x:ref>Warning</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2492 )
2493
2494<x:ref>cache-directive</x:ref> = token [ "=" ( token / quoted-string ) ]
2495
2496<x:ref>delta-seconds</x:ref> = 1*DIGIT
2497
2498<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
2499
2500<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 3.2&gt;
2501
2502<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.7&gt;
2503<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
2504<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 5.7&gt;
2505
2506<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 3.2.4&gt;
2507
2508<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 3.2.4&gt;
2509
2510<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.7&gt;
2511
2512<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2513<x:ref>warn-code</x:ref> = 3DIGIT
2514<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2515<x:ref>warn-text</x:ref> = quoted-string
2516<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
2517 ]
2518</artwork>
2519</figure>
2520</section>
2521<?ENDINC p6-cache.abnf-appendix ?>
2522
2523<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
2524<t>
2525  Changes up to the first Working Group Last Call draft are summarized
2526  in <eref target="http://trac.tools.ietf.org/html/draft-ietf-httpbis-p6-cache-19#appendix-C"/>.
2527</t>
2528
2529<section title="Since draft-ietf-httpbis-p6-cache-19" anchor="changes.since.19">
2530<t>
2531  Closed issues:
2532  <list style="symbols">
2533    <t>
2534      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/307"/>:
2535      "untangle Cache-Control ABNF"
2536    </t>
2537    <t>
2538      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/353"/>:
2539      "Multiple values in Cache-Control header fields"
2540    </t>
2541    <t>
2542      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/355"/>:
2543      "Case sensitivity of header fields in CC values"
2544    </t>
2545    <t>
2546      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/356"/>:
2547      "Spurious 'MAYs'"
2548    </t>
2549    <t>
2550      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/360"/>:
2551      "enhance considerations for new cache control directives"
2552    </t>
2553    <t>
2554      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/361"/>:
2555      "ABNF requirements for recipients"
2556    </t>
2557    <t>
2558      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/368"/>:
2559      "note introduction of new IANA registries as normative changes"
2560    </t>
2561    <t>
2562      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/373"/>:
2563      "broken prose in description of 'Vary'"
2564    </t>
2565  </list>
2566</t>
2567</section>
2568
2569<section title="Since draft-ietf-httpbis-p6-cache-20" anchor="changes.since.20">
2570<t>
2571  Closed issues:
2572  <list style="symbols">
2573    <t>
2574      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/375"/>:
2575      "'Most Conservative'"
2576    </t>
2577  </list>
2578</t>
2579<t>
2580  Other changes:
2581  <list style="symbols">
2582    <t>
2583      Conformance criteria and considerations regarding error handling are
2584      now defined in Part 1.
2585    </t>
2586    <t>
2587      Move definition of "Vary" header field into Part 2.
2588    </t>
2589    <t>
2590      Add security considerations with respect to cache poisoning and
2591      the "Set-Cookie" header field.
2592    </t>
2593  </list>
2594</t>
2595</section>
2596
2597<section title="Since draft-ietf-httpbis-p6-cache-21" anchor="changes.since.21">
2598<t>
2599  None yet.
2600</t>
2601</section>
2602
2603</section>
2604  </back>
2605</rfc>
Note: See TracBrowser for help on using the repository browser.