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

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

Update change logs

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