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

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

tune contact information for Julian Reschke

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