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

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

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