source: draft-ietf-httpbis/18/draft-ietf-httpbis-p6-cache-18.xml @ 1499

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

prepare for publication of -18 on Jan 04.

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