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

Last change on this file since 2371 was 2371, checked in by fielding@…, 8 years ago

(editorial) move the discussion of secondary keys next to primary keys before moving p4 cache requirements; fix typo

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