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

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

remove note calling for hop-by-hop headers, non-modifyable headers to be moved to p1 (see #60)

  • Property svn:eol-style set to native
File size: 99.4 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">
[764]15  <!ENTITY ID-MONTH "March">
[741]16  <!ENTITY ID-YEAR "2010">
[424]17  <!ENTITY notation                    "<xref target='Part1' x:rel='#notation' xmlns:x=''/>">
[205]18  <!ENTITY basic-rules                 "<xref target='Part1' x:rel='#basic.rules' xmlns:x=''/>">
[538]19  <!ENTITY uri                         "<xref target='Part1' x:rel='#uri' xmlns:x=''/>">
[31]20  <!ENTITY messaging                   "<xref target='Part1' xmlns:x=''/>">
[779]21  <!ENTITY clockless                   "<xref target='Part1' x:rel='#clockless.origin.server.operation' xmlns:x=''/>">
[183]22  <!ENTITY conditional                 "<xref target='Part4' xmlns:x=''/>">
[538]23  <!ENTITY partial                     "<xref target='Part5' xmlns:x=''/>">
[31]24  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x=''/>">
[580]25  <!ENTITY full-date                   "<xref target='Part1' x:rel='' xmlns:x=''/>">
[31]26  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x=''/>">
27  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x=''/>">
28  <!ENTITY header-date                 "<xref target='Part1' x:rel='' xmlns:x=''/>">
[205]29  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x=''/>">
[538]30  <!ENTITY header-last-modified        "<xref target='Part4' x:rel='#header.last-modified' xmlns:x=''/>">
[697]31  <!ENTITY header-fields               "<xref target='Part1' x:rel='#header.fields' xmlns:x=''/>">
[31]32  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
33  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
[607]34  <!ENTITY weak-and-strong             "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
36<?rfc toc="yes" ?>
[29]37<?rfc symrefs="yes" ?>
38<?rfc sortrefs="yes" ?>
[8]39<?rfc compact="yes"?>
40<?rfc subcompact="no" ?>
41<?rfc linkmailto="no" ?>
42<?rfc editing="no" ?>
[203]43<?rfc comments="yes"?>
44<?rfc inline="yes"?>
[8]45<?rfc-ext allow-markup-in-artwork="yes" ?>
46<?rfc-ext include-references-in-index="yes" ?>
[538]47<rfc category="std" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;" ipr="pre5378Trust200902"
48  obsoletes="2616" x:maturity-level="draft" xmlns:x="">
[547]51  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
[547]53  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
54    <organization abbrev="Day Software">Day Software</organization>
55    <address>
[8]56      <postal>
[29]57        <street>23 Corporate Plaza DR, Suite 280</street>
58        <city>Newport Beach</city>
[8]59        <region>CA</region>
[29]60        <code>92660</code>
61        <country>USA</country>
[8]62      </postal>
[29]63      <phone>+1-949-706-5300</phone>
64      <facsimile>+1-949-706-5305</facsimile>
65      <email></email>
66      <uri></uri>
[8]67    </address>
[547]68  </author>
[547]70  <author fullname="Jim Gettys" initials="J." surname="Gettys">
71    <organization>One Laptop per Child</organization>
72    <address>
[8]73      <postal>
[29]74        <street>21 Oak Knoll Road</street>
75        <city>Carlisle</city>
[8]76        <region>MA</region>
[29]77        <code>01741</code>
78        <country>USA</country>
[8]79      </postal>
[29]80      <email></email>
81      <uri></uri>
[8]82    </address>
[547]83  </author>
[547]85  <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
86    <organization abbrev="HP">Hewlett-Packard Company</organization>
87    <address>
[8]88      <postal>
[29]89        <street>HP Labs, Large Scale Systems Group</street>
90        <street>1501 Page Mill Road, MS 1177</street>
[8]91        <city>Palo Alto</city>
92        <region>CA</region>
[29]93        <code>94304</code>
94        <country>USA</country>
[8]95      </postal>
[29]96      <email></email>
[8]97    </address>
[547]98  </author>
[547]100  <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
101    <organization abbrev="Microsoft">Microsoft Corporation</organization>
102    <address>
[8]103      <postal>
[29]104        <street>1 Microsoft Way</street>
105        <city>Redmond</city>
106        <region>WA</region>
107        <code>98052</code>
108        <country>USA</country>
[8]109      </postal>
[29]110      <email></email>
[8]111    </address>
[547]112  </author>
[547]114  <author fullname="Larry Masinter" initials="L." surname="Masinter">
115    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
116    <address>
[8]117      <postal>
[29]118        <street>345 Park Ave</street>
119        <city>San Jose</city>
[8]120        <region>CA</region>
[29]121        <code>95110</code>
122        <country>USA</country>
[8]123      </postal>
[29]124      <email></email>
125      <uri></uri>
[8]126    </address>
[547]127  </author>
[547]129  <author fullname="Paul J. Leach" initials="P." surname="Leach">
130    <organization abbrev="Microsoft">Microsoft Corporation</organization>
131    <address>
[8]132      <postal>
133        <street>1 Microsoft Way</street>
134        <city>Redmond</city>
135        <region>WA</region>
136        <code>98052</code>
137      </postal>
138      <email></email>
139    </address>
[547]140  </author>
[547]142  <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
143    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
144    <address>
[8]145      <postal>
[34]146        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
147        <street>The Stata Center, Building 32</street>
148        <street>32 Vassar Street</street>
[8]149        <city>Cambridge</city>
150        <region>MA</region>
151        <code>02139</code>
[29]152        <country>USA</country>
[8]153      </postal>
154      <email></email>
[34]155      <uri></uri>
[8]156    </address>
[547]157  </author>
[547]159  <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
160    <organization abbrev="W3C">World Wide Web Consortium</organization>
161    <address>
[93]162      <postal>
163        <street>W3C / ERCIM</street>
164        <street>2004, rte des Lucioles</street>
165        <city>Sophia-Antipolis</city>
166        <region>AM</region>
167        <code>06902</code>
168        <country>France</country>
169      </postal>
170      <email></email>
171      <uri></uri>
172    </address>
[547]173  </author>
[601]175  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
[607]176    <address>
177      <email></email>
178      <uri></uri>
[601]179    </address>
180  </author>
[547]182  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
183    <organization abbrev="greenbytes">greenbytes GmbH</organization>
184    <address>
[95]185      <postal>
186        <street>Hafenweg 16</street>
187        <city>Muenster</city><region>NW</region><code>48155</code>
188        <country>Germany</country>
189      </postal>
[607]190      <phone>+49 251 2807760</phone>
191      <facsimile>+49 251 2807761</facsimile>
192      <email></email>
193      <uri></uri>
[95]194    </address>
[547]195  </author>
[547]197  <date month="&ID-MONTH;" year="&ID-YEAR;" />
198  <workgroup>HTTPbis Working Group</workgroup>
202  The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,
203  collaborative, hypermedia information systems. This document is Part 6 of the seven-part
204  specification that defines the protocol referred to as "HTTP/1.1" and, taken together,
205  obsoletes RFC 2616. Part 6 defines requirements on HTTP caches and the associated header
206  fields that control cache behavior or indicate cacheable response messages.
[540]210<note title="Editorial Note (To be removed by RFC Editor)">
212  Discussion of this draft should take place on the HTTPBIS working group mailing list
213  ( The current issues list is at <eref
214  target="" /> and related documents
215  (including fancy diffs) can be found at <eref target="" />.
[773]218  The changes in this draft are summarized in <xref target="changes.since.09"/>.
[538]222  </front>
223  <middle>
[540]225<section anchor="caching" title="Introduction">
227  HTTP is typically used for distributed information systems, where performance can be
228  improved by the use of response caches. This document defines aspects of HTTP/1.1 related to
229  caching and reusing response messages.
[540]232<section anchor="intro.purpose" title="Purpose">
233<iref item="cache" />
235  An HTTP <x:dfn>cache</x:dfn> is a local store of response messages and the subsystem that
236  controls its message storage, retrieval, and deletion. A cache stores cacheable responses
237  in order to reduce the response time and network bandwidth consumption on future,
238  equivalent requests. Any client or server may include a cache, though a cache cannot be
239  used by a server that is acting as a tunnel.
242  Caching would be useless if it did not significantly improve performance. The goal of
243  caching in HTTP/1.1 is to reuse a prior response message to satisfy a current request. In
244  some cases, a stored response can be reused without the need for a network request,
245  reducing latency and network round-trips; a "freshness" mechanism is used for this purpose
246  (see <xref target="expiration.model" />). Even when a new request is required, it is often
247  possible to reuse all or parts of the payload of a prior response to satisfy the request,
248  thereby reducing network bandwidth usage; a "validation" mechanism is used for this
249  purpose (see <xref target="validation.model" />).
[540]253<section anchor="intro.terminology" title="Terminology">
255  This specification uses a number of terms to refer to the roles played by participants
[540]256  in, and objects of, HTTP caching.
259  <iref item="cacheable" />
260  <x:dfn>cacheable</x:dfn>
261  <list>
262    <t>A response is cacheable if a cache is allowed to store a copy of the response message
263      for use in answering subsequent requests. Even when a response is cacheable, there may
264      be additional constraints on whether a cache can use the cached copy to satisfy a
265      particular request.</t>
266  </list>
269  <iref item="explicit expiration time" />
270  <x:dfn>explicit expiration time</x:dfn>
271  <list>
272    <t>The time at which the origin server intends that an entity should no longer be
273      returned by a cache without further validation.</t>
274  </list>
277  <iref item="heuristic expiration time" />
278  <x:dfn>heuristic expiration time</x:dfn>
279  <list>
280    <t>An expiration time assigned by a cache when no explicit expiration time is
281    available.</t>
282  </list>
285  <iref item="age" />
286  <x:dfn>age</x:dfn>
287  <list>
288    <t>The age of a response is the time since it was sent by, or successfully validated
289      with, the origin server.</t>
290  </list>
293  <iref item="first-hand" />
294  <x:dfn>first-hand</x:dfn>
295  <list>
296    <t>A response is first-hand if the freshness model is not in use; i.e., its age is
297    0.</t>
298  </list>
301  <iref item="freshness lifetime" />
302  <x:dfn>freshness lifetime</x:dfn>
303  <list>
304    <t>The length of time between the generation of a response and its expiration time. </t>
305  </list>
308  <iref item="fresh" />
309  <x:dfn>fresh</x:dfn>
310  <list>
311    <t>A response is fresh if its age has not yet exceeded its freshness lifetime.</t>
312  </list>
315  <iref item="stale" />
316  <x:dfn>stale</x:dfn>
317  <list>
318    <t>A response is stale if its age has passed its freshness lifetime (either explicit or heuristic).</t>
319  </list>
322  <iref item="validator" />
323  <x:dfn>validator</x:dfn>
324  <list>
325    <t>A protocol element (e.g., an entity tag or a Last-Modified time) that is used to find
326      out whether a stored response is an equivalent copy of an entity.</t>
327  </list>
329<t anchor="shared.and.non-shared.caches">
330  <iref item="validator" />
331  <x:dfn>shared cache</x:dfn>
332  <list>
333    <t>A cache that is accessible to more than one user. A non-shared cache is
334      dedicated to a single user.</t>
335  </list>
[540]339<section anchor="intro.requirements" title="Requirements">
341  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD
342  NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as
343  described in <xref target="RFC2119" />.
346  An implementation is not compliant if it fails to satisfy one or more of the &MUST;
347  or &REQUIRED; level requirements for the protocols it implements. An implementation
348  that satisfies all the &MUST; or &REQUIRED; level and all the &SHOULD; level
349  requirements for its protocols is said to be "unconditionally compliant"; one that
350  satisfies all the &MUST; level requirements but not all the &SHOULD; level
351  requirements for its protocols is said to be "conditionally compliant."
[424]355<section title="Syntax Notation" anchor="notation">
[425]356  <x:anchor-alias value="ALPHA"/>
357  <x:anchor-alias value="CR"/>
358  <x:anchor-alias value="DIGIT"/>
359  <x:anchor-alias value="DQUOTE"/>
360  <x:anchor-alias value="LF"/>
361  <x:anchor-alias value="OCTET"/>
362  <x:anchor-alias value="SP"/>
363  <x:anchor-alias value="VCHAR"/>
364  <x:anchor-alias value="WSP"/>
[543]366  This specification uses the ABNF syntax defined in &notation; (which
367  extends the syntax defined in <xref target="RFC5234"/> with a list rule).
368  <xref target="collected.abnf"/> shows the collected ABNF, with the list
369  rule expanded.
[425]372  The following core rules are included by
373  reference, as defined in <xref target="RFC5234" x:fmt="," x:sec="B.1"/>:
374  ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls),
375  DIGIT (decimal 0-9), DQUOTE (double quote),
376  HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed),
377  OCTET (any 8-bit sequence of data), SP (space),
378  VCHAR (any visible USASCII character),
379  and WSP (whitespace).
[424]382<section title="Core Rules" anchor="core.rules">
[229]383  <x:anchor-alias value="quoted-string"/>
384  <x:anchor-alias value="token"/>
[364]385  <x:anchor-alias value="OWS"/>
[424]387  The core rules below are defined in &basic-rules;:
389<figure><artwork type="abnf2616">
[229]390  <x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in &basic-rules;&gt;
391  <x:ref>token</x:ref>         = &lt;token, defined in &basic-rules;&gt;
[364]392  <x:ref>OWS</x:ref>           = &lt;OWS, defined in &basic-rules;&gt;
396<section title="ABNF Rules defined in other Parts of the Specification" anchor="abnf.dependencies">
[229]397  <x:anchor-alias value="field-name"/>
398  <x:anchor-alias value="HTTP-date"/>
399  <x:anchor-alias value="port"/>
400  <x:anchor-alias value="pseudonym"/>
401  <x:anchor-alias value="uri-host"/>
[205]403  The ABNF rules below are defined in other parts:
[207]405<figure><!--Part1--><artwork type="abnf2616">
[647]406  <x:ref>field-name</x:ref>    = &lt;field-name, defined in &header-fields;&gt;
[229]407  <x:ref>HTTP-date</x:ref>     = &lt;HTTP-date, defined in &full-date;&gt;
[374]408  <x:ref>port</x:ref>          = &lt;port, defined in &uri;&gt;
[229]409  <x:ref>pseudonym</x:ref>     = &lt;pseudonym, defined in &header-via;&gt; 
[374]410  <x:ref>uri-host</x:ref>      = &lt;uri-host, defined in &uri;&gt;
[540]417<section anchor="caching.overview" title="Cache Operation">
[540]419<section anchor="response.cacheability" title="Response Cacheability">
421  A cache &MUST-NOT; store a response to any request, unless:
422  <list style="symbols">
[721]423    <t>The request method is understood by the cache and defined as being cacheable, and</t>
[737]424    <t>the response status code is understood by the cache, and</t>
[540]425    <t>the "no-store" cache directive (see <xref target="header.cache-control" />) does not
426       appear in request or response headers, and</t>
[737]427    <t>the "private" cache response directive (see <xref target="cache-response-directive" />
[540]428       does not appear in the response, if the cache is shared, and</t>
429    <t>the "Authorization" header (see &header-authorization;) does not appear in the request, if
430       the cache is shared (unless the "public" directive is present; see <xref
[737]431       target="header.cache-control" />), and</t>
432    <t>the response either:
433      <list style="symbols">
434        <t>contains an Expires header (see <xref target="header.expires" />), or</t>
435        <t>contains a max-age response cache directive (see <xref target="cache-response-directive" />), or</t>
436        <t>contains a s-maxage response cache directive and the cache is shared, or</t>
437        <t>contains a Cache Control Extension (see <xref target="cache.control.extensions" />) that allows it to be cached, or</t>
438        <t>has a status code that can be served with heuristic freshness (see <xref
439           target="heuristic.freshness" />).</t>
440      </list>
441    </t>
[540]442  </list>
[737]445  In this context, a cache has "understood" a request method or a response status
446  code if it recognises it and implements any cache-specific behaviour. In
447  particular, 206 Partial Content responses cannot be cached by an
448  implementation that does not handle partial content
449  (see <xref target="errors.or.incomplete.response.cache.behavior" />).
[540]452  Note that in normal operation, most caches will not store a response that has neither a
453  cache validator nor an explicit expiration time, as such responses are not usually
454  useful to store. However, caches are not prohibited from storing such responses.
[540]457<section anchor="errors.or.incomplete.response.cache.behavior" title="Storing Partial and Incomplete Responses">
459  A cache that receives an incomplete response (for example, with fewer bytes of data
460  than specified in a Content-Length header) can store the response, but &MUST; 
461  treat it as a partial response &partial;. Partial responses
462  can be combined as described in &combining-byte-ranges;; the result might be a
463  full response or might still be partial. A cache &MUST-NOT; return a partial
464  response to a client without explicitly marking it as such using the 206 (Partial
465  Content) status code.
468  A cache that does not support the Range and Content-Range headers &MUST-NOT; store
469  incomplete or partial responses.
[540]476<section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches">
[575]478  For a presented request, a cache &MUST-NOT; return a stored response, unless:
[540]479  <list style="symbols">
[561]480    <t>The presented Request-URI and that of the stored response match
481      (<cref anchor="TODO-Request-URI">Need to find a new term for this, as Part
482      1 doesn't define Request-URI anymore; the new term request-target does not
[694]483      work for this. (see <eref target="" />)</cref>), and</t>
[540]484    <t>the request method associated with the stored response allows it to be
485      used for the presented request, and</t>
486    <t>selecting request-headers nominated by the stored response (if any) match those presented (see <xref
487      target="caching.negotiated.responses" />), and</t>
488    <t>the presented request and stored response are free from directives that would prevent
489      its use (see <xref target="header.cache-control" /> and <xref target="header.pragma"/>),
490      and</t>
491    <t>the stored response is either:
492      <list style="symbols">
493        <t>fresh (see <xref target="expiration.model" />), or</t>
494        <t>allowed to be served stale (see <xref target="serving.stale.responses" />), or</t>
495        <t>successfully validated (see <xref target="validation.model" />).</t>
496      </list>
497    </t>
498  </list>
[562]501  <cref anchor="TODO-method-cacheability">define method cacheability for GET, HEAD and POST in p2-semantics.</cref>
504  When a stored response is used to satisfy a request, caches &MUST; include a
[594]505  single Age header field (<xref target="header.age" />) in the response with a value equal to the stored response's
[540]506  current_age; see <xref target="age.calculations" />.
[767]507  <cref anchor="DISCUSS-includes-validated">this currently includes successfully validated responses.</cref>
510  Requests with methods that are unsafe (&safe-methods;) &MUST; be written through the cache to
[732]511  the origin server; i.e., a cache must not reply to such a request before having forwarded the request and having received a
[540]512  corresponding response.
515  Also, note that unsafe requests might invalidate already stored responses; see
516  <xref target="invalidation.after.updates.or.deletions" />.
519  Caches &MUST; use the most recent response (as determined by the Date header) when
520  more than one suitable response is stored. They can also forward a request with
521  "Cache-Control: max-age=0" or "Cache-Control: no-cache" to disambiguate which response to
522  use.
[540]526<section anchor="expiration.model" title="Freshness Model">
528  When a response is "fresh" in the cache, it can be used to satisfy subsequent
529  requests without contacting the origin server, thereby improving efficiency.
532  The primary mechanism for determining freshness is for an origin server to provide an
533  explicit expiration time in the future, using either the Expires header (<xref
534  target="header.expires" />) or the max-age response cache directive (<xref
535  target="cache-response-directive" />). Generally, origin servers will assign future
536  explicit expiration times to responses in the belief that the entity is not likely to
537  change in a semantically significant way before the expiration time is reached.
540  If an origin server wishes to force a cache to validate every request, it can
541  assign an explicit expiration time in the past. This means that the response is always
542  stale, so that caches should validate it before using it for subsequent requests.
[767]543  <cref anchor="TODO-response-stale">This wording may cause confusion, because the response may still be served stale.</cref>
546  Since origin servers do not always provide explicit expiration times, HTTP caches may
547  also assign heuristic expiration times when they are not specified, employing algorithms that
548  use other header values (such as the Last-Modified time) to estimate a plausible
549  expiration time. The HTTP/1.1 specification does not provide specific algorithms, but does
550  impose worst-case constraints on their results.
[575]554  The calculation to determine if a response is fresh is:
556<artwork type="code">
[538]557   response_is_fresh = (freshness_lifetime &gt; current_age)
561  The freshness_lifetime is defined in <xref target="calculating.freshness.lifetime" />;
562  the current_age is defined in <xref target="age.calculations" />.
565  Additionally, clients may need to influence freshness calculation. They can do this using
566  several request cache directives, with the effect of either increasing or loosening
567  constraints on freshness. See <xref target="cache-request-directive" />.
[767]570  <cref anchor="ISSUE-no-req-for-directives">there are not requirements directly applying to cache-request-directives and
[540]571  freshness.</cref>
574  Note that freshness applies only to cache operation; it cannot be used to force a user agent
575  to refresh its display or reload a resource. See <xref target="history.lists" /> for an explanation of
576  the difference between caches and history mechanisms.
[540]579<section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime">
581  A cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a
582  response by using the first match of:
583  <list style="symbols">
584    <t>If the cache is shared and the s-maxage response cache directive (<xref
585      target="cache-response-directive" />) is present, use its value, or</t>
586    <t>If the max-age response cache directive (<xref target="cache-response-directive"
587      />) is present, use its value, or</t>
588    <t>If the Expires response header (<xref target="header.expires" />) is present, use
589      its value minus the value of the Date response header, or</t>
590    <t>Otherwise, no explicit expiration time is present in the response, but a heuristic
591      may be used; see <xref target="heuristic.freshness" />.</t>
592  </list>
595  Note that this calculation is not vulnerable to clock skew, since all of the
596  information comes from the origin server.
[540]599<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
601  If no explicit expiration time is present in a stored response that has a status code
602  of 200, 203, 206, 300, 301 or 410, a heuristic expiration time can be
603  calculated. Heuristics &MUST-NOT; be used for other response status codes.
606  When a heuristic is used to calculate freshness lifetime, the cache &SHOULD;
607  attach a Warning header with a 113 warn-code to the response if its current_age is
608  more than 24 hours and such a warning is not already present.
611  Also, if the response has a Last-Modified header (&header-last-modified;), the
612  heuristic expiration value &SHOULD; be no more than some fraction of the interval
613  since that time. A typical setting of this fraction might be 10%.
[767]616  <cref anchor="REVIEW-query-string-heuristics">took away HTTP/1.0 query string heuristic uncacheability.</cref>
[540]621<section anchor="age.calculations" title="Calculating Age">
623  HTTP/1.1 uses the Age response-header to convey the estimated age of the response
624  message when obtained from a cache. The Age field value is the cache's estimate of the
625  amount of time since the response was generated or validated by the origin server. In
626  essence, the Age value is the sum of the time that the response has been resident in
627  each of the caches along the path from the origin server, plus the amount of time it has
628  been in transit along network paths.
[779]631  The following data is used for the age calculation:
[779]634  <x:dfn>age_value</x:dfn>
635  <list>
636    <t>
637      The term "age_value" denotes the value of the Age header, in a form
638      appropriate for arithmetic operation; or 0, if not available.
639    </t>
640  </list>
[779]643  <x:dfn>date_value</x:dfn>
644  <list>
645    <t>
646      HTTP/1.1 requires origin servers to send a Date header, if possible,
647      with every response, giving the time at which the response was generated
648      (see &header-date;). The term "date_value" denotes the value of the Date
649      header, in a form appropriate for arithmetic operations. See
650      &clockless; for requirements regarding responses without a Date
651      response header.<cref source="jre" anchor="TODO-checkref">correct reference?</cref>
652    </t>
653  </list>
[779]656  <x:dfn>now</x:dfn>
657  <list>
658    <t>
659      The term "now" means "the current value of the clock at the host
660      performing the calculation". Hosts that use HTTP, but especially hosts
661      running origin servers and caches, &SHOULD; use NTP
662      (<xref target="RFC1305"/>) or some similar protocol to synchronize their
663      clocks to a globally accurate time standard.
664    </t>
665  </list>
668  <x:dfn>request_time</x:dfn>
669  <list>
670    <t>
671      The current value of the clock at the host at the time the request
672      resulting in the stored response was made.
673    </t>
674  </list>
677  <x:dfn>response_time</x:dfn>
678  <list>
679    <t>
680      The current value of the clock at the host at the time the response was
681      received.
682    </t>
683  </list>
[575]686  A response's age can be calculated in two entirely independent ways:
[540]687  <list style="numbers">
688    <t>now minus date_value, if the local clock is reasonably well synchronized to the
689      origin server's clock. If the result is negative, the result is replaced by zero.</t>
690    <t>age_value, if all of the caches along the response path implement HTTP/1.1.</t>
691  </list>
694<preamble>These are combined as</preamble>
695<artwork type="code">
[778]696  corrected_received_age = max(now - date_value, age_value)
699  When an Age value is received, it &MUST; be interpreted relative to the time the
700  request was initiated, not the time that the response was received.
702<figure><artwork type="code">
[778]703  corrected_initial_age = corrected_received_age
704                          + (now - request_time)
707  where "request_time" is the time (according to the local clock) when the request that
708  elicited this response was sent.
711  The current_age of a stored response can then be calculated by adding the amount of
712  time (in seconds) since the stored response was last validated by the origin server to
713  the corrected_initial_age.
716<preamble>With these definitions, the current_age can be calculated as per:</preamble>
717<artwork type="code">
[540]718  apparent_age = max(0, response_time - date_value);
719  corrected_received_age = max(apparent_age, age_value);
720  response_delay = response_time - request_time;
721  corrected_initial_age = corrected_received_age + response_delay;
722  resident_time = now - response_time;
723  current_age   = corrected_initial_age + resident_time;
[540]727<section anchor="serving.stale.responses" title="Serving Stale Responses">
729  A "stale" response is one that either has explicit expiry information, or is allowed to
730  have heuristic expiry calculated, but is not fresh according to the calculations in
731  <xref target="expiration.model" />.
734  Caches &MUST-NOT; return a stale response if it is prohibited by an explicit
735  in-protocol directive (e.g., by a "no-store" or "no-cache" cache directive, a
736  "must-revalidate" cache-response-directive, or an applicable "s-maxage" or
737  "proxy-revalidate" cache-response-directive; see <xref target="cache-response-directive"/>).
740  Caches &SHOULD-NOT; return stale responses unless they are
741  disconnected (i.e., it cannot contact the origin server or otherwise find a forward path)
742  or otherwise explicitly allowed (e.g., the max-stale request directive; see <xref target="cache-request-directive" />).
745  Stale responses &SHOULD; have a Warning header with the 110 warn-code (see <xref
746  target="header.warning" />). Likewise, the 112 warn-code &SHOULD; be sent on stale responses if
747  the cache is disconnected.
750  If a cache receives a first-hand response (either an entire response, or a 304 (Not
751  Modified) response) that it would normally forward to the requesting client, and the
752  received response is no longer fresh, the cache &SHOULD; forward it to the
753  requesting client without adding a new Warning (but without removing any existing
754  Warning headers). A cache &SHOULD-NOT; attempt to validate a response simply because
755  that response became stale in transit.
[540]760<section anchor="validation.model" title="Validation Model">
[607]762  When a cache has one or more stored responses for a requested URI, but cannot 
763  serve any of them (e.g., because they are not fresh, or one cannot be selected;
764  see <xref target="caching.negotiated.responses"/>),
765  it can use the conditional request mechanism &conditional; in the forwarded
766  request to give the origin server an opportunity to both select a valid stored
767  response to be used, and to update it. This process is known as "validating"
768  or "revalidating" the stored response.
[607]771  When sending such a conditional request, the cache &SHOULD; add an If-Modified-Since
772  header whose value is that of the Last-Modified header from the selected
773  (see <xref target="caching.negotiated.responses"/>) stored response, if available.
[607]776  Additionally, the cache &SHOULD; add an If-None-Match header whose value 
777  is that of the ETag header(s) from all responses stored for the requested URI,
778  if present. However, if any of the stored responses contains only partial
779  content, its entity-tag &SHOULD-NOT; be included in the If-None-Match header
780  field unless the request is for a range that would be fully satisfied by
781  that stored response.
[540]784  A 304 (Not Modified) response status code indicates that the stored
785  response can be updated and reused; see <xref target="combining.headers"/>.
[607]788  A full response (i.e., one with a response body) indicates that none 
789  of the stored responses nominated in the conditional request is
790  suitable. Instead, the full response is used both to satisfy the
[767]791  request and replace the stored response. <cref anchor="TODO-req-missing">Should there be a requirement here?</cref>
794  If a cache receives a 5xx response while attempting to validate a response, it &MAY;
795  either forward this response to the requesting client, or act as if the server failed to
[607]796  respond. In the latter case, it &MAY; return a previously stored response (see <xref
[540]797  target="serving.stale.responses" />).
[540]801<section anchor="invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">
803  Because unsafe methods (&safe-methods;) have the potential for changing state on the
804  origin server, intervening caches can use them to keep their contents
805  up-to-date.
808  The following HTTP methods &MUST; cause a cache to invalidate the Request-URI as well
[589]809  as the URI(s) in the Location and Content-Location headers (if present):
[540]810  <list style="symbols">
811    <t>PUT</t>
812    <t>DELETE</t>
813    <t>POST</t>
814  </list>
[589]817  An invalidation based on a URI from a Location or Content-Location header &MUST-NOT;
[540]818  be performed if the host part of that URI differs from the host part in the Request-URI.
819  This helps prevent denial of service attacks.
[767]822  <cref anchor="TODO-def-host-part">"host part" needs to be specified better.</cref>
825  A cache that passes through requests for methods it does not understand &SHOULD;
826  invalidate the Request-URI.
829  Here, "invalidate" means that the cache will either remove all stored responses related
830  to the Request-URI, or will mark these as "invalid" and in need of a mandatory validation
831  before they can be returned in response to a subsequent request.
834  Note that this does not guarantee that all appropriate responses are invalidated. For
835  example, the request that caused the change at the origin server might not have gone
836  through the cache where a response is stored.
[767]839  <cref anchor="TODO-spec-success-invalidate">specify that only successful (2xx, 3xx?) responses invalidate.</cref>
[540]843<section anchor="caching.negotiated.responses" title="Caching Negotiated Responses">
845  When a cache receives a request that can be satisfied by a stored response
[607]846  that has a Vary header field (<xref target="header.vary"/>), it &MUST-NOT; use that
847  response unless all of the selecting request-headers nominated by the Vary header match
848  in both the original request (i.e., that associated with the stored response),
849  and the presented request.
[771]852  The selecting request-headers from two requests are defined to match
853  if and only if those in the first request can be transformed to those in the
854  second request by applying any of the following:
855  <list style="symbols">
856    <t>
857      adding or removing whitespace, where allowed in the header's syntax
858    </t>
859    <t>
860      combining multiple message-header fields with the same field name (see
861      &header-fields;)
862    </t>
863    <t>
864      normalizing both header values in a way that is known to have identical
865      semantics, according to the header's specification (e.g., re-ordering field values
866      when order is not significant; case-normalization, where values are defined to be
867      case-insensitive)   
868    </t>
869  </list>
[771]872  If (after any normalisation that may take place) a header field is absent
873  from a request, it can only match another request if it is also absent there.
[540]876  A Vary header field-value of "*" always fails to match, and subsequent requests to that
877  resource can only be properly interpreted by the origin server.
[607]880  The stored response with matching selecting request-headers is known as the
881  selected response.
[607]884  If no selected response is available, the cache &MAY; forward the presented
885  request to the origin server in a conditional request; see <xref target="validation.model"/>.
[540]889<section anchor="combining.headers" title="Combining Responses">
[607]891  When a cache receives a 304 (Not Modified) response or a 206 (Partial Content) response
892  (in this section, the "new" response"), it needs to created an updated response by combining
893  the stored response with the new one, so that the updated response can be used to satisfy the request.
[607]896  If the new response contains an ETag, it identifies the stored 
[767]897  response to use. <cref anchor="TODO-mention-CL">may need language about Content-Location 
898  here</cref><cref anchor="TODO-inm-mult-etags">cover case where INM with multiple etags was sent</cref>
[607]901  If the status code is 206 (partial content), both the stored and new 
[615]902  responses &MUST; have validators, and those validators &MUST; match using the strong 
[607]903  comparison function (see &weak-and-strong;). Otherwise, the 
904  responses &MUST-NOT; be combined.
907  The stored response headers are used as those of the updated response, except that
[540]908  <list style="symbols">
909    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning" />)
[607]910      &MUST; be deleted from the stored response and the updated response.</t>
[540]911    <t>any stored Warning headers with warn-code 2xx &MUST; be retained in the stored
[607]912      response and the updated response.</t>
913    <t>any headers provided in the new response &MUST; replace the corresponding
[540]914      headers from the stored response.</t>
915  </list>
[607]918  If a header field-name in the new response matches more than one 
919  header in the stored response, all such stored headers &MUST; be replaced.
[767]922  The updated response can <cref anchor="TODO-is-req">requirement?</cref> be used to replace the 
[607]923  stored response in cache. In the case of a 206 response, the combined 
924  entity-body &MAY; be stored.
[767]927  <cref anchor="ISSUE-how-head">discuss how to handle HEAD updates</cref>
[540]933<section anchor="header.fields" title="Header Field Definitions">
935  This section defines the syntax and semantics of HTTP/1.1 header fields
936  related to caching.
939  For entity-header fields, both sender and recipient refer to either the client or the
940  server, depending on who sends and who receives the entity.
[540]943<section anchor="header.age" title="Age">
944  <iref item="Age header" primary="true" x:for-anchor="" />
945  <iref item="Headers" primary="true" subitem="Age" x:for-anchor="" />
946  <x:anchor-alias value="Age"/>
947  <x:anchor-alias value="Age-v"/>
948  <x:anchor-alias value="age-value"/>
[698]950  The "Age" response-header field conveys the sender's estimate of the amount
951  of time since the response was generated or successfully validated at the
952  origin server. Age values are calculated as specified in
953  <xref target="age.calculations" />.
[364]955<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="Age-v"/>
[366]956  <x:ref>Age</x:ref>   = "Age" ":" <x:ref>OWS</x:ref> <x:ref>Age-v</x:ref>
[364]957  <x:ref>Age-v</x:ref> = <x:ref>delta-seconds</x:ref>
[540]959<t anchor="">
960  <x:anchor-alias value="delta-seconds" />
[576]961  Age field-values are non-negative integers, representing time in seconds.
963<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="delta-seconds" />
[229]964  <x:ref>delta-seconds</x:ref>  = 1*<x:ref>DIGIT</x:ref>
967  If a cache receives a value larger than the largest positive integer it can represent, or
968  if any of its age calculations overflows, it &MUST; transmit an Age header with a
969  field-value of 2147483648 (2<x:sup>31</x:sup>). Caches &SHOULD; use an arithmetic type
970  of at least 31 bits of range.
973  The presence of an Age header field in a response implies that a response is not
974  first-hand. However, the converse is not true, since HTTP/1.0 caches may not implement the
975  Age header field.
[540]979<section anchor="header.cache-control" title="Cache-Control">
980  <iref item="Cache-Control header" primary="true" x:for-anchor="" />
981  <iref item="Headers" primary="true" subitem="Cache-Control" x:for-anchor="" />
982  <x:anchor-alias value="Cache-Control"/>
983  <x:anchor-alias value="Cache-Control-v"/>
984  <x:anchor-alias value="cache-directive"/>
985  <x:anchor-alias value="cache-extension"/>
986  <x:anchor-alias value="cache-request-directive"/>
987  <x:anchor-alias value="cache-response-directive"/>
[698]989  The "Cache-Control" general-header field is used to specify directives that
990  &MUST; be obeyed by all caches along the request/response chain. Such cache
991  directives are unidirectional in that the presence of a directive in a
992  request does not imply that the same directive is to be given in the
993  response.
[575]996  <t>
997    Note that HTTP/1.0 caches might not implement Cache-Control and might only implement
998    Pragma: no-cache (see <xref target="header.pragma" />).
999  </t>
1002  Cache directives &MUST; be passed through by a proxy or gateway application,
1003  regardless of their significance to that application, since the directives might be
1004  applicable to all recipients along the request/response chain. It is not possible to
1005  target a directive to a specific cache.
[538]1007<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="Cache-Control-v"/><iref primary="true" item="Grammar" subitem="cache-extension"/>
[366]1008  <x:ref>Cache-Control</x:ref>   = "Cache-Control" ":" <x:ref>OWS</x:ref> <x:ref>Cache-Control-v</x:ref>
[364]1009  <x:ref>Cache-Control-v</x:ref> = 1#<x:ref>cache-directive</x:ref>
[229]1011  <x:ref>cache-directive</x:ref> = <x:ref>cache-request-directive</x:ref>
[334]1012     / <x:ref>cache-response-directive</x:ref>
[334]1014  <x:ref>cache-extension</x:ref> = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
[540]1017<section anchor="cache-request-directive" title="Request Cache-Control Directives">
1018  <x:anchor-alias value="cache-request-directive" />
[540]1020<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="cache-request-directive" />
[538]1021  <x:ref>cache-request-directive</x:ref> =
1022       "no-cache"
1023     / "no-store"
1024     / "max-age" "=" <x:ref>delta-seconds</x:ref>
1025     / "max-stale" [ "=" <x:ref>delta-seconds</x:ref> ]
1026     / "min-fresh" "=" <x:ref>delta-seconds</x:ref>
1027     / "no-transform"
1028     / "only-if-cached"
1029     / <x:ref>cache-extension</x:ref>
1033  <iref item="Cache Directives" primary="true" subitem="no-cache" />
1034  <iref item="no-cache" primary="true" subitem="Cache Directive" />
1035  no-cache
1036  <list>
1037    <t>The no-cache request directive indicates that a stored response &MUST-NOT; be
1038      used to satisfy the request without successful validation on the origin server.</t>
1039  </list>
1042  <iref item="Cache Directives" primary="true" subitem="no-store" />
1043  <iref item="no-store" primary="true" subitem="Cache Directive" />
1044  no-store
1045  <list>
1046    <t>The no-store request directive indicates that a cache &MUST-NOT; store any part
1047      of either this request or any response to it. This directive applies to both
1048      non-shared and shared caches. "&MUST-NOT; store" in this context means that the
1049      cache &MUST-NOT; intentionally store the information in non-volatile storage,
1050      and &MUST; make a best-effort attempt to remove the information from volatile
1051      storage as promptly as possible after forwarding it.</t>
1052    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
1053      particular, malicious or compromised caches might not recognize or obey this
1054      directive, and communications networks may be vulnerable to eavesdropping.</t>
1055  </list>
1058  <iref item="Cache Directives" primary="true" subitem="max-age" />
1059  <iref item="max-age" primary="true" subitem="Cache Directive" />
1060  max-age
1061  <list>
1062    <t>The max-age request directive indicates that the client is willing to accept a
1063      response whose age is no greater than the specified time in seconds. Unless
1064      max-stale directive is also included, the client is not willing to accept a stale
1065      response.</t>
1066  </list>
1069  <iref item="Cache Directives" primary="true" subitem="max-stale" />
1070  <iref item="max-stale" primary="true" subitem="Cache Directive" />
1071  max-stale
1072  <list>
1073    <t>The max-stale request directive indicates that the client is willing to accept a
1074      response that has exceeded its expiration time. If max-stale is assigned a value,
1075      then the client is willing to accept a response that has exceeded its expiration
1076      time by no more than the specified number of seconds. If no value is assigned to
[767]1077      max-stale, then the client is willing to accept a stale response of any age. <cref anchor="TODO-staleness" source="mnot">of any staleness?</cref></t>
[540]1078  </list>
1081  <iref item="Cache Directives" primary="true" subitem="min-fresh" />
1082  <iref item="min-fresh" primary="true" subitem="Cache Directive" />
1083  min-fresh
1084  <list>
1085    <t>The min-fresh request directive indicates that the client is willing to accept a
1086      response whose freshness lifetime is no less than its current age plus the specified
1087      time in seconds. That is, the client wants a response that will still be fresh for
1088      at least the specified number of seconds.</t>
1089  </list>
1092  <iref item="Cache Directives" primary="true" subitem="no-transform" />
1093  <iref item="no-transform" primary="true" subitem="Cache Directive" />
1094  no-transform
1095  <list>
1096    <t>The no-transform request directive indicates that an intermediate cache or proxy
1097      &MUST-NOT; change the Content-Encoding, Content-Range or Content-Type request
1098      headers, nor the request entity-body.</t>
1099  </list>
1102  <iref item="Cache Directives" primary="true" subitem="only-if-cached" />
1103  <iref item="only-if-cached" primary="true" subitem="Cache Directive" />
1104  only-if-cached
1105  <list>
1106    <t>The only-if-cached request directive indicates that the client only wishes to
1107      return a stored response. If it receives this directive, a cache &SHOULD; either
1108      respond using a stored response that is consistent with the other constraints of the
1109      request, or respond with a 504 (Gateway Timeout) status. If a group of caches is
1110      being operated as a unified system with good internal connectivity, such a request
1111      &MAY; be forwarded within that group of caches.</t>
1112  </list>
[540]1116<section anchor="cache-response-directive" title="Response Cache-Control Directives">
1117  <x:anchor-alias value="cache-response-directive" />
[540]1119<figure><artwork type="abnf2616"><iref item="Grammar" primary="true" subitem="cache-response-directive" />
[538]1120  <x:ref>cache-response-directive</x:ref> =
1121       "public"
1122     / "private" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1123     / "no-cache" [ "=" <x:ref>DQUOTE</x:ref> 1#<x:ref>field-name</x:ref> <x:ref>DQUOTE</x:ref> ]
1124     / "no-store"
1125     / "no-transform"
1126     / "must-revalidate"
1127     / "proxy-revalidate"
1128     / "max-age" "=" <x:ref>delta-seconds</x:ref>
1129     / "s-maxage" "=" <x:ref>delta-seconds</x:ref>
1130     / <x:ref>cache-extension</x:ref>
1134  <iref item="Cache Directives" primary="true" subitem="public" />
1135  <iref item="public" primary="true" subitem="Cache Directive" />
1136  public
1137  <list>
1138    <t>The public response directive indicates that the response &MAY; be cached, even
1139      if it would normally be non-cacheable or cacheable only within a non-shared cache.
1140      (See also Authorization, &header-authorization;, for additional details.) </t>
1141  </list>
1144  <iref item="Cache Directives" primary="true" subitem="private" />
1145  <iref item="private" primary="true" subitem="Cache Directive" />
1146  private
1147  <list>
1148    <t>The private response directive indicates that the response message is intended for
1149      a single user and &MUST-NOT; be stored by a shared cache. A private (non-shared)
1150      cache &MAY; store the response.</t>
1151    <t>If the private response directive specifies one or more field-names, this
1152      requirement is limited to the field-values associated with the listed response
1153      headers. That is, the specified field-names(s) &MUST-NOT; be stored by a shared
1154      cache, whereas the remainder of the response message &MAY; be.</t>
1155    <t>
1156      <x:h>Note:</x:h> This usage of the word private only controls where the response may
[710]1157      be stored, and cannot ensure the privacy of the message content.
1158      Also, private response directives with field-names are often handled by
[732]1159      implementations as if an unqualified private directive was received; i.e.,
[710]1160      the special handling for the qualified form is not widely implemented.
[540]1162  </list>
1165  <iref item="Cache Directives" primary="true" subitem="no-cache" />
1166  <iref item="no-cache" primary="true" subitem="Cache Directive" />
1167  no-cache
1168  <list>
1169    <t>The no-cache response directive indicates that the response &MUST-NOT; be used to
1170      satisfy a subsequent request without successful validation on the origin server.
1171      This allows an origin server to prevent caching even by caches that have been
1172      configured to return stale responses.</t>
1173    <t>If the no-cache response directive specifies one or more field-names, this
[555]1174      requirement is limited to the field-values associated with the listed response
[540]1175      headers. That is, the specified field-name(s) &MUST-NOT; be sent in the response
1176      to a subsequent request without successful validation on the origin server. This
1177      allows an origin server to prevent the re-use of certain header fields in a
1178      response, while still allowing caching of the rest of the response.</t>
1179    <t>
1180      <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this directive.
[710]1181      Also, no-cache response directives with field-names are often handled by
[736]1182      implementations as if an unqualified no-cache directive was received; i.e.,
[710]1183      the special handling for the qualified form is not widely implemented.
[540]1184    </t>
1185  </list>
1189  <iref item="Cache Directives" primary="true" subitem="no-store" />
1190  <iref item="no-store" primary="true" subitem="Cache Directive" />
1191  no-store
1192  <list>
1193    <t>The no-store response directive indicates that a cache &MUST-NOT; store any
1194      part of either the immediate request or response. This directive applies to both
1195      non-shared and shared caches. "&MUST-NOT; store" in this context means that the
1196      cache &MUST-NOT; intentionally store the information in non-volatile storage,
1197      and &MUST; make a best-effort attempt to remove the information from volatile
1198      storage as promptly as possible after forwarding it.</t>
1199    <t>This directive is NOT a reliable or sufficient mechanism for ensuring privacy. In
1200      particular, malicious or compromised caches might not recognize or obey this
1201      directive, and communications networks may be vulnerable to eavesdropping.</t>
1202  </list>
1205  <iref item="Cache Directives" primary="true" subitem="must-revalidate" />
1206  <iref item="must-revalidate" primary="true" subitem="Cache Directive" />
1207  must-revalidate
1208  <list>
1209    <t>The must-revalidate response directive indicates that once it has become stale, the response &MUST-NOT; be
1210     used to satisfy subsequent requests without successful validation on the origin server.</t>
1211    <t>The must-revalidate directive is necessary to support reliable operation for
1212      certain protocol features. In all circumstances an HTTP/1.1 cache &MUST; obey
1213      the must-revalidate directive; in particular, if the cache cannot reach the origin
1214      server for any reason, it &MUST; generate a 504 (Gateway Timeout) response.</t>
1215    <t>Servers &SHOULD; send the must-revalidate directive if and only if failure to
1216      validate a request on the entity could result in incorrect operation, such as a
1217      silently unexecuted financial transaction.</t>
1218  </list>
1221  <iref item="Cache Directives" primary="true" subitem="proxy-revalidate" />
1222  <iref item="proxy-revalidate" primary="true" subitem="Cache Directive" />
1223  proxy-revalidate
1224  <list>
1225    <t>The proxy-revalidate response directive has the same meaning as the must-revalidate
1226      response directive, except that it does not apply to non-shared caches.</t>
1227  </list>
1230  <iref item="Cache Directives" primary="true" subitem="max-age" />
1231  <iref item="max-age" primary="true" subitem="Cache Directive" />
1232  max-age
1233  <list>
1234    <t>The max-age response directive indicates that response is to be considered stale
1235      after its age is greater than the specified number of seconds.</t>
1236  </list>
1239  <iref item="Cache Directives" primary="true" subitem="s-maxage" />
1240  <iref item="s-maxage" primary="true" subitem="Cache Directive" />
1241  s-maxage
1242  <list>
1243    <t>The s-maxage response directive indicates that, in shared caches, the maximum age
1244      specified by this directive overrides the maximum age specified by either the
1245      max-age directive or the Expires header. The s-maxage directive also implies the
1246      semantics of the proxy-revalidate response directive.</t>
1247  </list>
1250  <iref item="Cache Directives" primary="true" subitem="no-transform" />
1251  <iref item="no-transform" primary="true" subitem="Cache Directive" />
1252  no-transform
1253  <list>
1254    <t>The no-transform response directive indicates that an intermediate cache or proxy
1255      &MUST-NOT; change the Content-Encoding, Content-Range or Content-Type response
1256      headers, nor the response entity-body.</t>
1257  </list>
[540]1262<section anchor="cache.control.extensions" title="Cache Control Extensions">
1264  The Cache-Control header field can be extended through the use of one or more
1265  cache-extension tokens, each with an optional value. Informational extensions (those
1266  that do not require a change in cache behavior) can be added without changing the
1267  semantics of other directives. Behavioral extensions are designed to work by acting as
1268  modifiers to the existing base of cache directives. Both the new directive and the
1269  standard directive are supplied, such that applications that do not understand the new
1270  directive will default to the behavior specified by the standard directive, and those
1271  that understand the new directive will recognize it as modifying the requirements
1272  associated with the standard directive. In this way, extensions to the cache-control
1273  directives can be made without requiring changes to the base protocol.
1276  This extension mechanism depends on an HTTP cache obeying all of the cache-control
1277  directives defined for its native HTTP-version, obeying certain extensions, and ignoring
1278  all directives that it does not understand.
1281  For example, consider a hypothetical new response directive called "community" that
1282  acts as a modifier to the private directive. We define this new directive to mean that,
1283  in addition to any non-shared cache, any cache that is shared only by members of the
1284  community named within its value may cache the response. An origin server wishing to
1285  allow the UCI community to use an otherwise private response in their shared cache(s)
1286  could do so by including
1288<figure><artwork type="example">
[458]1289  Cache-Control: private, community="UCI"
1292  A cache seeing this header field will act correctly even if the cache does not
1293  understand the community cache-extension, since it will also see and understand the
1294  private directive and thus default to the safe behavior.
1297  Unrecognized cache directives &MUST; be ignored; it is assumed that any cache
1298  directive likely to be unrecognized by an HTTP/1.1 cache will be combined with standard
1299  directives (or the response's default cacheability) such that the cache behavior will
1300  remain minimally correct even if the cache does not understand the extension(s).
[540]1306<section anchor="header.expires" title="Expires">
1307  <iref item="Expires header" primary="true" x:for-anchor="" />
1308  <iref item="Headers" primary="true" subitem="Expires" x:for-anchor="" />
1309  <x:anchor-alias value="Expires"/>
1310  <x:anchor-alias value="Expires-v"/>
[697]1312  The "Expires" entity-header field gives the date/time after which the response is
[540]1313  considered stale. See <xref target="expiration.model" /> for further discussion of the
1314  freshness model.
1317  The presence of an Expires field does not imply that the original resource will change or
1318  cease to exist at, before, or after that time.
1321  The field-value is an absolute date and time as defined by HTTP-date in &full-date;;
1322  it &MUST; be sent in rfc1123-date format.
[364]1324<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/><iref primary="true" item="Grammar" subitem="Expires-v"/>
[366]1325  <x:ref>Expires</x:ref>   = "Expires" ":" <x:ref>OWS</x:ref> <x:ref>Expires-v</x:ref>
[364]1326  <x:ref>Expires-v</x:ref> = <x:ref>HTTP-date</x:ref>
1329  <preamble>For example</preamble>
1330<artwork type="example">
[364]1331  Expires: Thu, 01 Dec 1994 16:00:00 GMT
[575]1334  <t>
[756]1335    <x:h>Note:</x:h> If a response includes a Cache-Control field with the max-age
[575]1336    directive (see <xref target="cache-response-directive" />), that directive overrides
1337    the Expires field. Likewise, the s-maxage directive overrides Expires in shared caches.
1338  </t>
1341  HTTP/1.1 servers &SHOULD-NOT; send Expires dates more than one year in the future.
1344  HTTP/1.1 clients and caches &MUST; treat other invalid date formats, especially
1345  including the value "0", as in the past (i.e., "already expired").
[540]1349<section anchor="header.pragma" title="Pragma">
1350  <iref item="Pragma header" primary="true" x:for-anchor="" />
1351  <iref item="Headers" primary="true" subitem="Pragma" x:for-anchor="" />
1352  <x:anchor-alias value="extension-pragma"/>
1353  <x:anchor-alias value="Pragma"/>
1354  <x:anchor-alias value="Pragma-v"/>
1355  <x:anchor-alias value="pragma-directive"/>
[697]1357  The "Pragma" general-header field is used to include implementation-specific directives
[540]1358  that might apply to any recipient along the request/response chain. All pragma directives
1359  specify optional behavior from the viewpoint of the protocol; however, some systems
1360  &MAY; require that behavior be consistent with the directives.
[364]1362<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="Pragma-v"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
[366]1363  <x:ref>Pragma</x:ref>            = "Pragma" ":" <x:ref>OWS</x:ref> <x:ref>Pragma-v</x:ref>
[364]1364  <x:ref>Pragma-v</x:ref>          = 1#<x:ref>pragma-directive</x:ref>
[334]1365  <x:ref>pragma-directive</x:ref>  = "no-cache" / <x:ref>extension-pragma</x:ref>
1366  <x:ref>extension-pragma</x:ref>  = <x:ref>token</x:ref> [ "=" ( <x:ref>token</x:ref> / <x:ref>quoted-string</x:ref> ) ]
1369  When the no-cache directive is present in a request message, an application &SHOULD;
1370  forward the request toward the origin server even if it has a cached copy of what is being
1371  requested. This pragma directive has the same semantics as the no-cache response directive
1372  (see <xref target="cache-response-directive" />) and is defined here for backward
1373  compatibility with HTTP/1.0. Clients &SHOULD; include both header fields when a
1374  no-cache request is sent to a server not known to be HTTP/1.1 compliant. HTTP/1.1 caches
1375  &SHOULD; treat "Pragma: no-cache" as if the client had sent "Cache-Control: no-cache".
1378  <t>
[756]1379    <x:h>Note:</x:h> Because the meaning of "Pragma: no-cache" as a response-header field
[540]1380    is not actually specified, it does not provide a reliable replacement for
[575]1381    "Cache-Control: no-cache" in a response.
1382  </t>
1385  This mechanism is deprecated; no new Pragma directives will be defined in HTTP.
[540]1389<section anchor="header.vary" title="Vary">
1390  <iref item="Vary header" primary="true" x:for-anchor="" />
1391  <iref item="Headers" primary="true" subitem="Vary" x:for-anchor="" />
1392  <x:anchor-alias value="Vary"/>
1393  <x:anchor-alias value="Vary-v"/>
[698]1395  The "Vary" response-header field conveys the set of request-header fields
1396  that were used to select the representation.
1399  Caches use this information, in part, to determine whether a stored response
[732]1400  can be used to satisfy a given request; see
[698]1401  <xref target="caching.negotiated.responses" />.
[540]1402  determines, while the response is fresh, whether a cache is permitted to use the
1403  response to reply to a subsequent request without validation; see <xref 
1404  target="caching.negotiated.responses" />.
1407  In uncacheable or stale responses, the Vary field value advises the user agent about
1408  the criteria that were used to select the representation.
[364]1410<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/><iref primary="true" item="Grammar" subitem="Vary-v"/>
[366]1411  <x:ref>Vary</x:ref>   = "Vary" ":" <x:ref>OWS</x:ref> <x:ref>Vary-v</x:ref>
[364]1412  <x:ref>Vary-v</x:ref> = "*" / 1#<x:ref>field-name</x:ref>
1415  The set of header fields named by the Vary field value is known as the selecting
1416  request-headers.
1419  Servers &SHOULD; include a Vary header field with any cacheable response that is
1420  subject to server-driven negotiation. Doing so allows a cache to properly interpret future
1421  requests on that resource and informs the user agent about the presence of negotiation on
1422  that resource. A server &MAY; include a Vary header field with a non-cacheable
1423  response that is subject to server-driven negotiation, since this might provide the user
1424  agent with useful information about the dimensions over which the response varies at the
1425  time of the response.
1428  A Vary field value of "*" signals that unspecified parameters not limited to the
1429  request-headers (e.g., the network address of the client), play a role in the selection of
1430  the response representation; therefore, a cache cannot determine whether this response is
1431  appropriate. The "*" value &MUST-NOT; be generated by a proxy server;
1432  it may only be generated by an origin server.
1435  The field-names given are not limited to the set of standard request-header fields
1436  defined by this specification. Field names are case-insensitive.
[540]1440<section anchor="header.warning" title="Warning">
1441  <iref item="Warning header" primary="true" x:for-anchor="" />
1442  <iref item="Headers" primary="true" subitem="Warning" x:for-anchor="" />
1443  <x:anchor-alias value="Warning"/>
1444  <x:anchor-alias value="Warning-v"/>
1445  <x:anchor-alias value="warning-value"/>
1446  <x:anchor-alias value="warn-agent"/>
1447  <x:anchor-alias value="warn-code"/>
1448  <x:anchor-alias value="warn-date"/>
1449  <x:anchor-alias value="warn-text"/>
[697]1451  The "Warning" general-header field is used to carry additional information about the status
[540]1452  or transformation of a message that might not be reflected in the message. This
1453  information is typically used to warn about possible incorrectness introduced by caching
1454  operations or transformations applied to the entity body of the message.
1457  Warnings can be used for other purposes, both cache-related and otherwise. The use of a
[732]1458  warning, rather than an error status code, distinguishes these responses from true failures.
1461  Warning headers can in general be applied to any message, however some warn-codes are
1462  specific to caches and can only be applied to response messages.
[364]1464<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="Warning-v"/><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"/>
[366]1465  <x:ref>Warning</x:ref>    = "Warning" ":" <x:ref>OWS</x:ref> <x:ref>Warning-v</x:ref>
[364]1466  <x:ref>Warning-v</x:ref>  = 1#<x:ref>warning-value</x:ref>
[229]1468  <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>
1469                                        [<x:ref>SP</x:ref> <x:ref>warn-date</x:ref>]
[229]1471  <x:ref>warn-code</x:ref>  = 3<x:ref>DIGIT</x:ref>
[334]1472  <x:ref>warn-agent</x:ref> = ( <x:ref>uri-host</x:ref> [ ":" <x:ref>port</x:ref> ] ) / <x:ref>pseudonym</x:ref>
[135]1473                  ; the name or pseudonym of the server adding
1474                  ; the Warning header, for use in debugging
[229]1475  <x:ref>warn-text</x:ref>  = <x:ref>quoted-string</x:ref>
1476  <x:ref>warn-date</x:ref>  = <x:ref>DQUOTE</x:ref> <x:ref>HTTP-date</x:ref> <x:ref>DQUOTE</x:ref>
1479  Multiple warnings can be attached to a response (either by the origin server or by
[669]1480  a cache), including multiple warnings with the same code number, only differing
1481  in warn-text.
1484  When this occurs, the user agent &SHOULD; inform the user of as many of them as
[669]1485  possible, in the order that they appear in the response.
1488  Systems that generate multiple Warning headers &SHOULD; order them with this user
1489  agent behavior in mind. New Warning headers &SHOULD; be added after any existing
1490  Warning headers.
1493  Warnings are assigned three digit warn-codes. The first digit indicates whether the
1494  Warning is required to be deleted from a stored response after validation:
1495  <list style="symbols">
[709]1496    <t>1xx Warnings describe the freshness or validation status of the response, and so
1497      &MUST; be deleted by caches after validation. They can only be generated by a cache
1498      when validating a cached entry, and &MUST-NOT; be generated in any other situation.</t>
1499    <t>2xx Warnings describe some aspect of the entity body or entity headers that is
[540]1500      not rectified by a validation (for example, a lossy compression of the entity bodies)
1501      and &MUST-NOT; be deleted by caches after validation, unless a full response is
1502      returned, in which case they &MUST; be.</t>
1503  </list>
1506  If an implementation sends a message with one or more Warning headers to a receiver whose
1507  version is HTTP/1.0 or lower, then the sender &MUST; include in each warning-value a
1508  warn-date that matches the Date header in the message.
1511  If an implementation receives a message with a warning-value that includes a warn-date,
1512  and that warn-date is different from the Date value in the response, then that
1513  warning-value &MUST; be deleted from the message before storing, forwarding, or using
1514  it. (preventing the consequences of naive caching of Warning header fields.) If all of the
1515  warning-values are deleted for this reason, the Warning header &MUST; be deleted as
1516  well.
1519  The following warn-codes are defined by this specification, each with a recommended
1520  warn-text in English, and a description of its meaning.
[541]1522<t><?rfc needLines="4"?>
[540]1523  110 Response is stale
1524  <list>
1525    <t>&SHOULD; be included whenever the returned response is stale.</t>
1526  </list>
[541]1528<t><?rfc needLines="4"?>
[540]1529  111 Revalidation failed
1530  <list>
1531    <t>&SHOULD; be included if a cache returns a stale response because an attempt to
1532      validate the response failed, due to an inability to reach the server.</t>
1533  </list>
[541]1535<t><?rfc needLines="4"?>
[540]1536  112 Disconnected operation
1537  <list>
1538    <t>&SHOULD; be included if the cache is intentionally disconnected from the rest of
1539      the network for a period of time.</t>
1540  </list>
[541]1542<t><?rfc needLines="4"?>
[540]1543  113 Heuristic expiration
1544  <list>
1545    <t>&SHOULD; be included if the cache heuristically chose a freshness lifetime
1546      greater than 24 hours and the response's age is greater than 24 hours.</t>
1547  </list>
[541]1549<t><?rfc needLines="4"?>
[540]1550  199 Miscellaneous warning
1551  <list>
1552    <t>The warning text can include arbitrary information to be presented to a human
1553      user, or logged. A system receiving this warning &MUST-NOT; take any automated
1554      action, besides presenting the warning to the user.</t>
1555  </list>
[541]1557<t><?rfc needLines="4"?>
[540]1558  214 Transformation applied
1559  <list>
1560    <t>&MUST; be added by an intermediate cache or proxy if it applies any
1561      transformation changing the content-coding (as specified in the Content-Encoding
1562      header) or media-type (as specified in the Content-Type header) of the response, or
1563      the entity-body of the response, unless this Warning code already appears in the
1564      response.</t>
1565  </list>
[541]1567<t><?rfc needLines="4"?>
[540]1568  299 Miscellaneous persistent warning
1569  <list>
1570    <t>The warning text can include arbitrary information to be presented to a human
1571      user, or logged. A system receiving this warning &MUST-NOT; take any automated
1572      action.</t>
1573  </list>
[540]1579<section anchor="history.lists" title="History Lists">
1581  User agents often have history mechanisms, such as "Back" buttons and history lists, that
1582  can be used to redisplay an entity retrieved earlier in a session.
[766]1585  The freshness model (<xref target="expiration.model"/>) does not necessarily apply to history mechanisms. I.e.,
1586  a history mechanism can display a previous representation even if it has expired.
1588  <t>
[766]1589  This does not prohibit the history mechanism from telling the user that a
1590  view might be stale, or from honoring cache directives (e.g., Cache-Control: no-store).
[575]1591  </t>
[540]1595<section anchor="IANA.considerations" title="IANA Considerations">
[540]1597<section anchor="message.header.registration" title="Message Header Registration">
1599  The Message Header Registry located at <eref
1600  target="" />
1601  should be updated with the permanent registrations below (see <xref target="RFC3864" />):
[680]1603<?BEGININC p6-cache.iana-headers ?>
[540]1604<!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually-->
[680]1605<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1606   <ttcol>Header Field Name</ttcol>
1607   <ttcol>Protocol</ttcol>
1608   <ttcol>Status</ttcol>
1609   <ttcol>Reference</ttcol>
[680]1611   <c>Age</c>
1612   <c>http</c>
1613   <c>standard</c>
1614   <c>
1615      <xref target="header.age"/>
1616   </c>
1617   <c>Cache-Control</c>
1618   <c>http</c>
1619   <c>standard</c>
1620   <c>
1621      <xref target="header.cache-control"/>
1622   </c>
1623   <c>Expires</c>
1624   <c>http</c>
1625   <c>standard</c>
1626   <c>
1627      <xref target="header.expires"/>
1628   </c>
1629   <c>Pragma</c>
1630   <c>http</c>
1631   <c>standard</c>
1632   <c>
1633      <xref target="header.pragma"/>
1634   </c>
1635   <c>Vary</c>
1636   <c>http</c>
1637   <c>standard</c>
1638   <c>
1639      <xref target="header.vary"/>
1640   </c>
1641   <c>Warning</c>
1642   <c>http</c>
1643   <c>standard</c>
1644   <c>
1645      <xref target="header.warning"/>
1646   </c>
[680]1649<?ENDINC p6-cache.iana-headers ?>
1651  The change controller is: "IETF ( - Internet Engineering Task Force".
[540]1657<section anchor="security.considerations" title="Security Considerations">
1659  Caches expose additional potential vulnerabilities, since the contents of the cache
1660  represent an attractive target for malicious exploitation. Because cache contents persist
1661  after an HTTP request is complete, an attack on the cache can reveal information long after
1662  a user believes that the information has been removed from the network. Therefore, cache
1663  contents should be protected as sensitive information.
[540]1667<section anchor="ack" title="Acknowledgments">
1669  Much of the content and presentation of the caching design is due to suggestions and
1670  comments from individuals including: Shel Kaphan, Paul Leach, Koen Holtman, David Morris,
1671  and Larry Masinter.
1678<references title="Normative References">
[540]1680  <reference anchor="Part1">
1681    <front>
1682      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
1683      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1684        <organization abbrev="Day Software">Day Software</organization>
1685        <address><email></email></address>
1686      </author>
1687      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1688        <organization>One Laptop per Child</organization>
1689        <address><email></email></address>
1690      </author>
1691      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1692        <organization abbrev="HP">Hewlett-Packard Company</organization>
1693        <address><email></email></address>
1694      </author>
1695      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1696        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1697        <address><email></email></address>
1698      </author>
1699      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1700        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1701        <address><email></email></address>
1702      </author>
1703      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1704        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1705        <address><email></email></address>
1706      </author>
1707      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1708        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1709        <address><email></email></address>
1710      </author>
1711      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1712        <organization abbrev="W3C">World Wide Web Consortium</organization>
1713        <address><email></email></address>
1714      </author>
1715      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1716        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1717        <address><email></email></address>
1718      </author>
1719      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1720    </front>
1721    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;" />
1722    <x:source basename="p1-messaging" href="p1-messaging.xml" />
1723  </reference>
[540]1725  <reference anchor="Part2">
1726    <front>
1727      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
1728      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1729        <organization abbrev="Day Software">Day Software</organization>
1730        <address><email></email></address>
1731      </author>
1732      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1733        <organization>One Laptop per Child</organization>
1734        <address><email></email></address>
1735      </author>
1736      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1737        <organization abbrev="HP">Hewlett-Packard Company</organization>
1738        <address><email></email></address>
1739      </author>
1740      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1741        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1742        <address><email></email></address>
1743      </author>
1744      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1745        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1746        <address><email></email></address>
1747      </author>
1748      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1749        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1750        <address><email></email></address>
1751      </author>
1752      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1753        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1754        <address><email></email></address>
1755      </author>
1756      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1757        <organization abbrev="W3C">World Wide Web Consortium</organization>
1758        <address><email></email></address>
1759      </author>
1760      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1761        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1762        <address><email></email></address>
1763      </author>
1764      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1765    </front>
1766    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;" />
1767    <x:source basename="p2-semantics" href="p2-semantics.xml" />
1768  </reference>
[540]1770  <reference anchor="Part4">
1771    <front>
1772      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
1773      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1774        <organization abbrev="Day Software">Day Software</organization>
1775        <address><email></email></address>
1776      </author>
1777      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1778        <organization>One Laptop per Child</organization>
1779        <address><email></email></address>
1780      </author>
1781      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1782        <organization abbrev="HP">Hewlett-Packard Company</organization>
1783        <address><email></email></address>
1784      </author>
1785      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1786        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1787        <address><email></email></address>
1788      </author>
1789      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1790        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1791        <address><email></email></address>
1792      </author>
1793      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1794        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1795        <address><email></email></address>
1796      </author>
1797      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1798        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1799        <address><email></email></address>
1800      </author>
1801      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1802        <organization abbrev="W3C">World Wide Web Consortium</organization>
1803        <address><email></email></address>
1804      </author>
1805      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1806        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1807        <address><email></email></address>
1808      </author>
1809      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1810    </front>
1811    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;" />
1812    <x:source basename="p4-conditional" href="p4-conditional.xml" />
1813  </reference>
[540]1815  <reference anchor="Part5">
1816    <front>
1817      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
1818      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1819        <organization abbrev="Day Software">Day Software</organization>
1820        <address><email></email></address>
1821      </author>
1822      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1823        <organization>One Laptop per Child</organization>
1824        <address><email></email></address>
1825      </author>
1826      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1827        <organization abbrev="HP">Hewlett-Packard Company</organization>
1828        <address><email></email></address>
1829      </author>
1830      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1831        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1832        <address><email></email></address>
1833      </author>
1834      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1835        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1836        <address><email></email></address>
1837      </author>
1838      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1839        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1840        <address><email></email></address>
1841      </author>
1842      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1843        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1844        <address><email></email></address>
1845      </author>
1846      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1847        <organization abbrev="W3C">World Wide Web Consortium</organization>
1848        <address><email></email></address>
1849      </author>
1850      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1851        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1852        <address><email></email></address>
1853      </author>
1854      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1855    </front>
1856    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;" />
1857    <x:source basename="p5-range" href="p5-range.xml" />
1858  </reference>
[540]1860  <reference anchor="Part7">
1861    <front>
1862      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
1863      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
1864        <organization abbrev="Day Software">Day Software</organization>
1865        <address><email></email></address>
1866      </author>
1867      <author fullname="Jim Gettys" initials="J." surname="Gettys">
1868        <organization>One Laptop per Child</organization>
1869        <address><email></email></address>
1870      </author>
1871      <author fullname="Jeffrey C. Mogul" initials="J." surname="Mogul">
1872        <organization abbrev="HP">Hewlett-Packard Company</organization>
1873        <address><email></email></address>
1874      </author>
1875      <author fullname="Henrik Frystyk Nielsen" initials="H." surname="Frystyk">
1876        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1877        <address><email></email></address>
1878      </author>
1879      <author fullname="Larry Masinter" initials="L." surname="Masinter">
1880        <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
1881        <address><email></email></address>
1882      </author>
1883      <author fullname="Paul J. Leach" initials="P." surname="Leach">
1884        <organization abbrev="Microsoft">Microsoft Corporation</organization>
1885        <address><email></email></address>
1886      </author>
1887      <author fullname="Tim Berners-Lee" initials="T." surname="Berners-Lee">
1888        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
1889        <address><email></email></address>
1890      </author>
1891      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
1892        <organization abbrev="W3C">World Wide Web Consortium</organization>
1893        <address><email></email></address>
1894      </author>
1895      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
1896        <organization abbrev="greenbytes">greenbytes GmbH</organization>
1897        <address><email></email></address>
1898      </author>
1899      <date month="&ID-MONTH;" year="&ID-YEAR;" />
1900    </front>
1901    <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;" />
1902    <x:source basename="p7-auth" href="p7-auth.xml" />
1903  </reference>
[540]1905  <reference anchor="RFC2119">
1906    <front>
1907      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
1908      <author fullname="Scott Bradner" initials="S." surname="Bradner">
1909        <organization>Harvard University</organization>
1910        <address><email></email></address>
1911      </author>
1912      <date month="March" year="1997" />
1913    </front>
1914    <seriesInfo name="BCP" value="14" />
1915    <seriesInfo name="RFC" value="2119" />
1916  </reference>
[540]1918  <reference anchor="RFC5234">
1919    <front>
1920      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
1921      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
1922        <organization>Brandenburg InternetWorking</organization>
1923        <address>
[728]1924          <email></email>
1925        </address> 
[540]1926      </author>
1927      <author initials="P." surname="Overell" fullname="Paul Overell">
1928        <organization>THUS plc.</organization>
1929        <address>
[728]1930          <email></email>
1931        </address>
[540]1932      </author>
1933      <date month="January" year="2008"/>
1934    </front>
1935    <seriesInfo name="STD" value="68"/>
1936    <seriesInfo name="RFC" value="5234"/>
1937  </reference>
[540]1941<references title="Informative References">
[540]1943  <reference anchor="RFC1305">
1944    <front>
1945      <title>Network Time Protocol (Version 3) Specification, Implementation</title>
1946      <author fullname="David L. Mills" initials="D." surname="Mills">
1947        <organization>University of Delaware, Electrical Engineering Department</organization>
1948        <address><email></email></address>
1949      </author>
1950      <date month="March" year="1992" />
1951    </front>
1952    <seriesInfo name="RFC" value="1305" />
1953  </reference>
[540]1955  <reference anchor="RFC2616">
1956    <front>
1957      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
1958      <author fullname="R. Fielding" initials="R." surname="Fielding">
1959        <organization>University of California, Irvine</organization>
1960        <address><email></email></address>
1961      </author>
1962      <author fullname="J. Gettys" initials="J." surname="Gettys">
1963        <organization>W3C</organization>
1964        <address><email></email></address>
1965      </author>
1966      <author fullname="J. Mogul" initials="J." surname="Mogul">
1967        <organization>Compaq Computer Corporation</organization>
1968        <address><email></email></address>
1969      </author>
1970      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
1971        <organization>MIT Laboratory for Computer Science</organization>
1972        <address><email></email></address>
1973      </author>
1974      <author fullname="L. Masinter" initials="L." surname="Masinter">
1975        <organization>Xerox Corporation</organization>
1976        <address><email></email></address>
1977      </author>
1978      <author fullname="P. Leach" initials="P." surname="Leach">
1979        <organization>Microsoft Corporation</organization>
1980        <address><email></email></address>
1981      </author>
1982      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
1983        <organization>W3C</organization>
1984        <address><email></email></address>
1985      </author>
1986      <date month="June" year="1999" />
1987    </front>
1988    <seriesInfo name="RFC" value="2616" />
1989  </reference>
1991  <reference anchor="RFC3864">
1992    <front>
1993      <title>Registration Procedures for Message Header Fields</title>
1994      <author fullname="G. Klyne" initials="G." surname="Klyne">
1995        <organization>Nine by Nine</organization>
1996        <address><email></email></address>
1997      </author>
1998      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
1999        <organization>BEA Systems</organization>
2000        <address><email></email></address>
2001      </author>
2002      <author fullname="J. Mogul" initials="J." surname="Mogul">
2003        <organization>HP Labs</organization>
2004        <address><email></email></address>
2005      </author>
2006      <date month="September" year="2004" />
2007    </front>
2008    <seriesInfo name="BCP" value="90" />
2009    <seriesInfo name="RFC" value="3864" />
2010  </reference>
2014<section anchor="compatibility" title="Compatibility with Previous Versions">
2016<section anchor="changes.from.rfc.2068" title="Changes from RFC 2068">
2018  A case was missed in the Cache-Control model of HTTP/1.1; s-maxage was introduced to add
2019  this missing case.
2020  (Sections <xref format="counter" target="response.cacheability" />, <xref format="counter" target="header.cache-control" />).
[768]2023  Range request responses would become very verbose if all meta-data were always returned;
[540]2024  by allowing the server to only send needed headers in a 206 response, this problem can be
2025  avoided.
2026  (<xref target="combining.headers" />)
2029  The Cache-Control: max-age directive was not properly defined for responses.
2030  (<xref target="cache-response-directive"/>)
2033  Warnings could be cached incorrectly, or not updated appropriately. (Section <xref
2034    format="counter" target="expiration.model" />, <xref format="counter"
2035    target="combining.headers" />, <xref format="counter" target="header.cache-control" />,
2036  and <xref format="counter" target="header.warning" />) Warning also needed to be a general
2037  header, as PUT or other methods may have need for it in requests.
2041<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
[691]2043  Remove requirement to consider Content-Location in successful responses
2044  in order to determine the appropriate response to use.
2045  (<xref target="validation.model" />)
[540]2048  Clarify denial of service attack avoidance requirement.
2049  (<xref target="invalidation.after.updates.or.deletions" />)
2052  Do not mention RFC 2047 encoding and multiple languages in Warning headers
2053  anymore, as these aspects never were implemented.
2054  (<xref target="header.warning" />)
[538]2058    </section>
[680]2060<?BEGININC p6-cache.abnf-appendix ?>
[427]2061<section xmlns:x="" title="Collected ABNF" anchor="collected.abnf">
2063<artwork type="abnf" name="p6-cache.parsed-abnf">
2064<x:ref>Age</x:ref> = "Age:" OWS Age-v
2065<x:ref>Age-v</x:ref> = delta-seconds
2067<x:ref>Cache-Control</x:ref> = "Cache-Control:" OWS Cache-Control-v
2068<x:ref>Cache-Control-v</x:ref> = *( "," OWS ) cache-directive *( OWS "," [ OWS
[425]2069 cache-directive ] )
[427]2071<x:ref>Expires</x:ref> = "Expires:" OWS Expires-v
2072<x:ref>Expires-v</x:ref> = HTTP-date
[678]2074<x:ref>HTTP-date</x:ref> = &lt;HTTP-date, defined in [Part1], Section 6.1&gt;
2076<x:ref>OWS</x:ref> = &lt;OWS, defined in [Part1], Section 1.2.2&gt;
2078<x:ref>Pragma</x:ref> = "Pragma:" OWS Pragma-v
2079<x:ref>Pragma-v</x:ref> = *( "," OWS ) pragma-directive *( OWS "," [ OWS
[425]2080 pragma-directive ] )
[427]2082<x:ref>Vary</x:ref> = "Vary:" OWS Vary-v
2083<x:ref>Vary-v</x:ref> = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name
[425]2084 ] ) )
[427]2086<x:ref>Warning</x:ref> = "Warning:" OWS Warning-v
2087<x:ref>Warning-v</x:ref> = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value
[425]2088 ] )
[427]2090<x:ref>cache-directive</x:ref> = cache-request-directive / cache-response-directive
2091<x:ref>cache-extension</x:ref> = token [ "=" ( token / quoted-string ) ]
2092<x:ref>cache-request-directive</x:ref> = "no-cache" / "no-store" / ( "max-age="
[425]2093 delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / (
2094 "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" /
2095 cache-extension
[427]2096<x:ref>cache-response-directive</x:ref> = "public" / ( "private" [ "=" DQUOTE *( ","
[425]2097 OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / (
2098 "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS
2099 field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" /
2100 "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds
2101 ) / ( "s-maxage=" delta-seconds ) / cache-extension
[427]2103<x:ref>delta-seconds</x:ref> = 1*DIGIT
2105<x:ref>extension-pragma</x:ref> = token [ "=" ( token / quoted-string ) ]
[678]2107<x:ref>field-name</x:ref> = &lt;field-name, defined in [Part1], Section 3.2&gt;
[648]2109<x:ref>port</x:ref> = &lt;port, defined in [Part1], Section 2.6&gt;
[427]2110<x:ref>pragma-directive</x:ref> = "no-cache" / extension-pragma
[678]2111<x:ref>pseudonym</x:ref> = &lt;pseudonym, defined in [Part1], Section 9.9&gt;
2113<x:ref>quoted-string</x:ref> = &lt;quoted-string, defined in [Part1], Section 1.2.2&gt;
2115<x:ref>token</x:ref> = &lt;token, defined in [Part1], Section 1.2.2&gt;
[648]2117<x:ref>uri-host</x:ref> = &lt;uri-host, defined in [Part1], Section 2.6&gt;
2119<x:ref>warn-agent</x:ref> = ( uri-host [ ":" port ] ) / pseudonym
2120<x:ref>warn-code</x:ref> = 3DIGIT
2121<x:ref>warn-date</x:ref> = DQUOTE HTTP-date DQUOTE
2122<x:ref>warn-text</x:ref> = quoted-string
2123<x:ref>warning-value</x:ref> = warn-code SP warn-agent SP warn-text [ SP warn-date
[425]2124 ]
[532]2127<figure><preamble>ABNF diagnostics:</preamble><artwork type="inline">
2128; Age defined but not used
[425]2129; Cache-Control defined but not used
2130; Expires defined but not used
2131; Pragma defined but not used
2132; Vary defined but not used
2133; Warning defined but not used
[680]2135<?ENDINC p6-cache.abnf-appendix ?>
[540]2137<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
[540]2139<section title="Since RFC2616">
2140  <t>Extracted relevant partitions from <xref target="RFC2616" />.</t>
[540]2143<section title="Since draft-ietf-httpbis-p6-cache-00">
2145  Closed issues:
2146  <list style="symbols">
2147    <t>
[542]2148      <eref target="" />: "Trailer" (<eref target="" />)</t>
[540]2149    <t>
2150      <eref target="" />: "Invalidation after Update or Delete" (<eref target="" />)</t>
2151    <t>
2152      <eref target="" />: "Normative and Informative references"</t>
2153    <t>
2154      <eref target="" />: "Date reference typo"</t>
2155    <t>
2156      <eref target="" />: "Connection header text"</t>
2157    <t>
2158      <eref target="" />: "Informative references"</t>
2159    <t>
2160      <eref target="" />: "ISO-8859-1 Reference"</t>
2161    <t>
2162      <eref target="" />: "Normative up-to-date references"</t>
2163    <t>
2164      <eref target="" />: "typo in 13.2.2"</t>
2165  </list>
2168  Other changes:
2169  <list style="symbols">
2170    <t>Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref
2171        target="" />)</t>
2172  </list>
[540]2176<section title="Since draft-ietf-httpbis-p6-cache-01">
2178  Closed issues:
2179  <list style="symbols">
2180    <t>
2181      <eref target="" />: "rel_path not used"</t>
2182  </list>
2185  Other changes:
2186  <list style="symbols">
2187    <t>Get rid of duplicate BNF rule names ("host" -&gt; "uri-host") (work in progress
2188      on <eref target="" />)</t>
2189    <t>Add explicit references to BNF syntax and rules imported from other parts of the
2190      specification.</t>
2191  </list>
[540]2195<section anchor="changes.since.02" title="Since draft-ietf-httpbis-p6-cache-02">
2197  Ongoing work on IANA Message Header Registration (<eref target="" />):
2198  <list style="symbols">
2199    <t>Reference RFC 3984, and update header registrations for headers defined in this
2200      document.</t>
2201  </list>
[540]2205<section anchor="changes.since.03" title="Since draft-ietf-httpbis-p6-cache-03">
2207  Closed issues:
2208  <list style="symbols">
2209    <t>
2210      <eref target="" />: "Vary header classification"</t>
2211  </list>
[540]2215<section anchor="changes.since.04" title="Since draft-ietf-httpbis-p6-cache-04">
2217  Ongoing work on ABNF conversion (<eref target=""/>):
2218  <list style="symbols"> 
2219    <t>
2220      Use "/" instead of "|" for alternatives.
2221    </t>
2222    <t>
2223      Introduce new ABNF rules for "bad" whitespace ("BWS"), optional
2224      whitespace ("OWS") and required whitespace ("RWS").
2225    </t>
2226    <t>
2227      Rewrite ABNFs to spell out whitespace rules, factor out
2228      header value format definitions.
2229    </t>
2230  </list>
[540]2234<section anchor="changes.since.05" title="Since draft-ietf-httpbis-p6-cache-05">
2236  This is a total rewrite of this part of the specification.
2239  Affected issues:
2240  <list style="symbols">
2241    <t>
2242      <eref target="" />: "Definition of 1xx Warn-Codes"</t>
2243    <t>
2244      <eref target="" />: "Placement of 13.5.1 and 13.5.2"</t>
2245    <t>
2246      <eref target="" />: "The role of Warning and Semantic Transparency in Caching"</t>
2247    <t>
2248      <eref target="" />: "Methods and Caching"</t>
2249  </list>
[543]2252  In addition: Final work on ABNF conversion (<eref target=""/>):
[542]2253  <list style="symbols"> 
2254    <t>
2255      Add appendix containing collected and expanded ABNF, reorganize ABNF introduction.
2256    </t>
2257  </list>
[547]2261<section anchor="changes.since.06" title="Since draft-ietf-httpbis-p6-cache-06">
[576]2263  Closed issues:
2264  <list style="symbols"> 
2265    <t>
2266      <eref target=""/>:
2267      "base for numeric protocol elements"
2268    </t>
2269  </list>
2272  Affected issues:
2273  <list style="symbols">
2274    <t>
2275      <eref target=""/>:
2276      Vary and non-existant headers
2277    </t>
2278  </list>
[604]2282<section anchor="changes.since.07" title="Since draft-ietf-httpbis-p6-cache-07">
[669]2284  Closed issues:
2285  <list style="symbols"> 
2286    <t>
[711]2287      <eref target="" />:
2288      "Definition of 1xx Warn-Codes"
2289    </t>
2290    <t>
[691]2291      <eref target=""/>:
2292      "Content-Location on 304 responses"
2293    </t>
2294    <t>
[711]2295      <eref target="" />:
2296      "private and no-cache CC directives with headers"
2297    </t>
2298    <t>
[669]2299      <eref target=""/>:
2300      "RFC2047 and warn-text"
2301    </t>
2302  </list>
[720]2306<section anchor="changes.since.08" title="Since draft-ietf-httpbis-p6-cache-08">
[766]2308  Closed issues:
2309  <list style="symbols"> 
2310    <t>
[771]2311      <eref target="" />:
2312      "serving negotiated responses from cache: header-specific canonicalization"
2313    </t>
2314    <t>
[766]2315      <eref target="" />:
2316      "Effect of CC directives on history lists"
2317    </t>
2318  </list>
[722]2321  Affected issues:
2322  <list style="symbols">
2323    <t>
2324      <eref target=""/>:
2325      Status codes and caching
2326    </t>
2327  </list>
2330  Partly resolved issues:
2331  <list style="symbols"> 
2332    <t>
2333      <eref target=""/>:
2334      "Placement of 13.5.1 and 13.5.2"
2335    </t>
2336  </list>
[773]2340<section title="Since draft-ietf-httpbis-p6-cache-09" anchor="changes.since.09">
[778]2342  No significant changes.
[538]2347  </back>
Note: See TracBrowser for help on using the repository browser.