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

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

Move "Combining Partial Responses" up into "Storing Responses in Caches"; revise title of "Freshening Responses with 304 Not Modified". See #469

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