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

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

Move considerations for new cache control extensions into IANA considerations; addresses #464.

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