source: draft-ietf-httpbis/17/draft-ietf-httpbis-p6-cache-17.xml @ 1500

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

fix mime types

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