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

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

Make delta-seconds a subsection of Syntax Notation

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