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

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

make editorial notes consistent, regen HTML after P1 TOC change

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