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

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

Collected ABNF section: explain ABNF list expansion (see #436)

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