source: draft-ietf-httpbis/24/draft-ietf-httpbis-p6-cache-24.xml @ 2521

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

Prepare release of -24 on Sept 25

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