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

Last change on this file since 1667 was 1667, checked in by julian.reschke@…, 8 years ago

bump up document dates, update to latest version of rfc2629.xslt

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