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

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

Remove misleading language about Vary and future requests, and account for case where some stored responses don't have Vary; see #471

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