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

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

Update mnot affiliation

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