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

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

remove mnot affiliation

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