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

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

Move definition of "delta-seconds" into Part1; relates to #36.

  • Property svn:eol-style set to native
File size: 127.1 KB
1<?xml version="1.0" encoding="utf-8"?>
2<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
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>">
14  <!ENTITY ID-VERSION "latest">
15  <!ENTITY ID-MONTH "February">
16  <!ENTITY ID-YEAR "2008">
17  <!ENTITY notation-abnf               "<xref target='Part1' x:rel='#notation.abnf' xmlns:x=''/>">
18  <!ENTITY basic-rules                 "<xref target='Part1' x:rel='#basic.rules' xmlns:x=''/>">
19  <!ENTITY general-syntax              "<xref target='Part1' x:rel='#general.syntax' xmlns:x=''/>">
20  <!ENTITY time-spans                  "<xref target='Part1' x:rel='#time.spans' xmlns:x=''/>">
21  <!ENTITY messaging                   "<xref target='Part1' xmlns:x=''/>">
22  <!ENTITY conditional                 "<xref target='Part4' xmlns:x=''/>">
23  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x=''/>">
24  <!ENTITY entity-length               "<xref target='Part3' x:rel='#entity.length' xmlns:x=''/>">
25  <!ENTITY full-date                   "<xref target='Part1' x:rel='' xmlns:x=''/>">
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=''/>">
29  <!ENTITY header-via                  "<xref target='Part1' x:rel='#header.via' xmlns:x=''/>">
30  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x=''/>">
31  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
32  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
33  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x=''/>">
35<?rfc toc="yes" ?>
36<?rfc symrefs="yes" ?>
37<?rfc sortrefs="yes" ?>
38<?rfc compact="yes"?>
39<?rfc subcompact="no" ?>
40<?rfc linkmailto="no" ?>
41<?rfc editing="no" ?>
42<?rfc comments="yes"?>
43<?rfc inline="yes"?>
44<?rfc-ext allow-markup-in-artwork="yes" ?>
45<?rfc-ext include-references-in-index="yes" ?>
46<rfc obsoletes="2616" category="std"
47     ipr="full3978" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;"
48     xmlns:x=''>
51  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
53  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
54    <organization abbrev="Day Software">Day Software</organization>
55    <address>
56      <postal>
57        <street>23 Corporate Plaza DR, Suite 280</street>
58        <city>Newport Beach</city>
59        <region>CA</region>
60        <code>92660</code>
61        <country>USA</country>
62      </postal>
63      <phone>+1-949-706-5300</phone>
64      <facsimile>+1-949-706-5305</facsimile>
65      <email></email>
66      <uri></uri>
67    </address>
68  </author>
70  <author initials="J." surname="Gettys" fullname="Jim Gettys">
71    <organization>One Laptop per Child</organization>
72    <address>
73      <postal>
74        <street>21 Oak Knoll Road</street>
75        <city>Carlisle</city>
76        <region>MA</region>
77        <code>01741</code>
78        <country>USA</country>
79      </postal>
80      <email></email>
81      <uri></uri>
82    </address>
83  </author>
85  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
86    <organization abbrev="HP">Hewlett-Packard Company</organization>
87    <address>
88      <postal>
89        <street>HP Labs, Large Scale Systems Group</street>
90        <street>1501 Page Mill Road, MS 1177</street>
91        <city>Palo Alto</city>
92        <region>CA</region>
93        <code>94304</code>
94        <country>USA</country>
95      </postal>
96      <email></email>
97    </address>
98  </author>
100  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
101    <organization abbrev="Microsoft">Microsoft Corporation</organization>
102    <address>
103      <postal>
104        <street>1 Microsoft Way</street>
105        <city>Redmond</city>
106        <region>WA</region>
107        <code>98052</code>
108        <country>USA</country>
109      </postal>
110      <email></email>
111    </address>
112  </author>
114  <author initials="L." surname="Masinter" fullname="Larry Masinter">
115    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
116    <address>
117      <postal>
118        <street>345 Park Ave</street>
119        <city>San Jose</city>
120        <region>CA</region>
121        <code>95110</code>
122        <country>USA</country>
123      </postal>
124      <email></email>
125      <uri></uri>
126    </address>
127  </author>
129  <author initials="P." surname="Leach" fullname="Paul J. Leach">
130    <organization abbrev="Microsoft">Microsoft Corporation</organization>
131    <address>
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>
140  </author>
142  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
143    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
144    <address>
145      <postal>
146        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
147        <street>The Stata Center, Building 32</street>
148        <street>32 Vassar Street</street>
149        <city>Cambridge</city>
150        <region>MA</region>
151        <code>02139</code>
152        <country>USA</country>
153      </postal>
154      <email></email>
155      <uri></uri>
156    </address>
157  </author>
159  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
160    <organization abbrev="W3C">World Wide Web Consortium</organization>
161    <address>
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>
173  </author>
175  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
176    <organization abbrev="greenbytes">greenbytes GmbH</organization>
177    <address>
178      <postal>
179        <street>Hafenweg 16</street>
180        <city>Muenster</city><region>NW</region><code>48155</code>
181        <country>Germany</country>
182      </postal>
183      <phone>+49 251 2807760</phone>   
184      <facsimile>+49 251 2807761</facsimile>   
185      <email></email>       
186      <uri></uri>     
187    </address>
188  </author>
190  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
194   The Hypertext Transfer Protocol (HTTP) is an application-level
195   protocol for distributed, collaborative, hypermedia information
196   systems. HTTP has been in use by the World Wide Web global information
197   initiative since 1990. This document is Part 6 of the seven-part specification
198   that defines the protocol referred to as "HTTP/1.1" and, taken together,
199   obsoletes RFC 2616.  Part 6 defines requirements on HTTP caches
200   and the associated header fields that control cache behavior or indicate
201   cacheable response messages.
205<note title="Editorial Note (To be removed by RFC Editor)">
206  <t>
207    Discussion of this draft should take place on the HTTPBIS working group
208    mailing list ( The current issues list is
209    at <eref target=""/>
210    and related documents (including fancy diffs) can be found at
211    <eref target=""/>.
212  </t>
213  <t>
214    This draft incorporates those issue resolutions that were either
215    collected in the original RFC2616 errata list (<eref target=""/>),
216    or which were agreed upon on the mailing list between October 2006 and
217    November 2007 (as published in "draft-lafon-rfc2616bis-03").
218  </t>
222<section title="Introduction" anchor="caching">
224   HTTP is typically used for distributed information systems, where
225   performance can be improved by the use of response caches, and includes
226   a number of elements intended to make caching work as well as possible.
227   Because these elements interact with each other, it is useful to describe
228   the caching design of HTTP separately.  This document defines aspects of
229   HTTP/1.1 related to caching and reusing response messages.
232<section title="Purpose" anchor="intro.purpose">
233<iref item="cache"/>
235   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages
236   and the subsystem that controls its message storage, retrieval, and
237   deletion. A cache stores cacheable responses in order to reduce the
238   response time and network bandwidth consumption on future, equivalent
239   requests. Any client or server may include a cache, though a cache
240   cannot be used by a server that is acting as a tunnel.
243   Caching would be useless if it did not significantly improve
244   performance. The goal of caching in HTTP/1.1 is to reuse a prior response
245   message to satisfy a current request.  In some cases, the existing response
246   can be reused without the need for a network request, reducing latency and
247   network round-trips; we use an "expiration" mechanism for this purpose
248   (see <xref target="expiration.model"/>).  Even when a new request is required,
249   it is often possible to reuse all or parts of the payload of a prior response
250   to satisfy the request, thereby reducing network bandwidth usage; we use a
251   "validation" mechanism for this purpose (see <xref target="validation.model"/>).
253<iref item="semantically transparent"/>
255   A cache behaves in a "<x:dfn>semantically transparent</x:dfn>" manner, with
256   respect to a particular response, when its use affects neither the
257   requesting client nor the origin server, except to improve
258   performance. When a cache is semantically transparent, the client
259   receives exactly the same response status and payload
260   that it would have received had its request been handled directly
261   by the origin server.
264   In an ideal world, all interactions with an HTTP cache would be
265   semantically transparent.  However, for some resources, semantic
266   transparency is not always necessary and can be effectively traded
267   for the sake of bandwidth scaling, disconnected operation, and
268   high availability.  HTTP/1.1 allows origin servers, caches,
269   and clients to explicitly reduce transparency when necessary.
270   However, because non-transparent operation may confuse non-expert
271   users and might be incompatible with certain server applications
272   (such as those for ordering merchandise), the protocol requires that
273   transparency be relaxed
274  <list style="symbols">
275     <t>only by an explicit protocol-level request when relaxed by
276        client or origin server</t>
278     <t>only with an explicit warning to the end user when relaxed by
279        cache or client</t>
280  </list>
283   Therefore, HTTP/1.1 provides these important elements:
284  <list style="numbers">
285      <t>Protocol features that provide full semantic transparency when
286         this is required by all parties.</t>
288      <t>Protocol features that allow an origin server or user agent to
289         explicitly request and control non-transparent operation.</t>
291      <t>Protocol features that allow a cache to attach warnings to
292         responses that do not preserve the requested approximation of
293         semantic transparency.</t>
294  </list>
297   A basic principle is that it must be possible for the clients to
298   detect any potential relaxation of semantic transparency.
299  <list><t>
300      <x:h>Note:</x:h> The server, cache, or client implementor might be faced with
301      design decisions not explicitly discussed in this specification.
302      If a decision might affect semantic transparency, the implementor
303      ought to err on the side of maintaining transparency unless a
304      careful and complete analysis shows significant benefits in
305      breaking transparency.
306    </t></list>
310<section title="Terminology" anchor="intro.terminology">
312   This specification uses a number of terms to refer to the roles
313   played by participants in, and objects of, HTTP caching.
316  <iref item="cacheable"/>
317  <x:dfn>cacheable</x:dfn>
318  <list>
319    <t>
320      A response is cacheable if a cache is allowed to store a copy of
321      the response message for use in answering subsequent requests.
322      Even when a response is cacheable, there may
323      be additional constraints on whether a cache can use the cached
324      copy for a particular request.
325    </t>
326  </list>
329  <iref item="first-hand"/>
330  <x:dfn>first-hand</x:dfn>
331  <list>
332    <t>
333      A response is first-hand if it comes directly and without
334      unnecessary delay from the origin server, perhaps via one or more
335      proxies. A response is also first-hand if its validity has just
336      been checked directly with the origin server.
337    </t>
338  </list>
341  <iref item="explicit expiration time"/>
342  <x:dfn>explicit expiration time</x:dfn>
343  <list>
344    <t>
345      The time at which the origin server intends that an entity should
346      no longer be returned by a cache without further validation.
347    </t>
348  </list>
351  <iref item="heuristic expiration time"/>
352  <x:dfn>heuristic expiration time</x:dfn>
353  <list>
354    <t>
355      An expiration time assigned by a cache when no explicit expiration
356      time is available.
357    </t>
358  </list>
361  <iref item="age"/>
362  <x:dfn>age</x:dfn>
363  <list>
364    <t>
365      The age of a response is the time since it was sent by, or
366      successfully validated with, the origin server.
367    </t>
368  </list>
371  <iref item="freshness lifetime"/>
372  <x:dfn>freshness lifetime</x:dfn>
373  <list>
374    <t>
375      The length of time between the generation of a response and its
376      expiration time.
377    </t>
378  </list>
381  <iref item="fresh"/>
382  <x:dfn>fresh</x:dfn>
383  <list>
384    <t>
385      A response is fresh if its age has not yet exceeded its freshness
386      lifetime.
387    </t>
388  </list>
391  <iref item="stale"/>
392  <x:dfn>stale</x:dfn>
393  <list>
394    <t>
395      A response is stale if its age has passed its freshness lifetime.
396    </t>
397  </list>
400  <iref item="validator"/>
401  <x:dfn>validator</x:dfn>
402  <list>
403    <t>
404      A protocol element (e.g., an entity tag or a Last-Modified time)
405      that is used to find out whether a cache entry is an equivalent
406      copy of an entity.
407    </t>
408  </list>
412<section title="Requirements" anchor="intro.requirements">
414   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
415   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
416   document are to be interpreted as described in <xref target="RFC2119"/>.
419   An implementation is not compliant if it fails to satisfy one or more
420   of the &MUST; or &REQUIRED; level requirements for the protocols it
421   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
422   level and all the &SHOULD; level requirements for its protocols is said
423   to be "unconditionally compliant"; one that satisfies all the &MUST;
424   level requirements but not all the &SHOULD; level requirements for its
425   protocols is said to be "conditionally compliant."
431<section title="Notational Conventions and Generic Grammar" anchor="notation">
433  This specification uses the ABNF syntax defined in &notation-abnf; and
434  the core rules defined in &basic-rules;:
435  <cref anchor="abnf.dep">ABNF syntax and basic rules will be adopted from RFC 5234, see
436  <eref target=""/>.</cref>
438<figure><artwork type="abnf2616">
439  DIGIT         = &lt;DIGIT, defined in &basic-rules;&gt;
440  DQUOTE        = &lt;DQUOTE, defined in &basic-rules;&gt;
441  SP            = &lt;SP, defined in &basic-rules;&gt;
443<figure><artwork type="abnf2616">
444  quoted-string = &lt;quoted-string, defined in &basic-rules;&gt;
445  token         = &lt;token, defined in &basic-rules;&gt;
447<t anchor="abnf.dependencies">
448  The ABNF rules below are defined in other parts:
450<figure><!--Part1--><artwork type="abnf2616">
451  delta-seconds = &lt;delta-seconds, defined in &time-spans;&gt;
452  field-name    = &lt;field-name, defined in &message-headers;&gt;
453  HTTP-date     = &lt;HTTP-date, defined in &full-date;&gt;
454  port          = &lt;port, defined in &general-syntax;&gt;
455  pseudonym     = &lt;pseudonym, defined in &header-via;&gt;
456  uri-host      = &lt;uri-host, defined in &general-syntax;&gt;
460<section title="Overview" anchor="caching.overview">
461<section title="Cache Correctness" anchor="cache.correctness">
463   A correct cache &MUST; respond to a request with the most up-to-date
464   response held by the cache that is appropriate to the request (see
465   Sections <xref target="disambiguating.expiration.values" format="counter"/>,
466   <xref target="disambiguating.multiple.responses" format="counter"/>,
467   and <xref target="cache.replacement" format="counter"/>) which meets one of the following
468   conditions:
469  <list style="numbers">
470      <t>It has been checked for equivalence with what the origin server
471         would have returned by revalidating the response with the
472         origin server (<xref target="validation.model"/>);</t>
474      <t>It is "fresh enough" (see <xref target="expiration.model"/>). In the default case,
475         this means it meets the least restrictive freshness requirement
476         of the client, origin server, and cache (see <xref target="header.cache-control"/>); if
477         the origin server so specifies, it is the freshness requirement
478         of the origin server alone.
480         If a stored response is not "fresh enough" by the most
481         restrictive freshness requirement of both the client and the
482         origin server, in carefully considered circumstances the cache
483         &MAY; still return the response with the appropriate Warning
484         header (see Sections <xref target="" format="counter"/>
485         and <xref target="header.warning" format="counter"/>), unless such a response
486         is prohibited (e.g., by a "no-store" cache-directive, or by a
487         "no-cache" cache-request-directive; see <xref target="header.cache-control"/>).</t>
489      <t>It is an appropriate 304 (Not Modified), 305 (Use Proxy),
490         or error (4xx or 5xx) response message.</t>
491  </list>
494   If the cache can not communicate with the origin server, then a
495   correct cache &SHOULD; respond as above if the response can be
496   correctly served from the cache; if not it &MUST; return an error or
497   warning indicating that there was a communication failure.
500   If a cache receives a response (either an entire response, or a 304
501   (Not Modified) response) that it would normally forward to the
502   requesting client, and the received response is no longer fresh, the
503   cache &SHOULD; forward it to the requesting client without adding a new
504   Warning (but without removing any existing Warning headers). A cache
505   &SHOULD-NOT;  attempt to revalidate a response simply because that
506   response became stale in transit; this might lead to an infinite
507   loop. A user agent that receives a stale response without a Warning
508   &MAY; display a warning indication to the user.
512<section title="Warnings" anchor="warnings">
514   Whenever a cache returns a response that is neither first-hand nor
515   "fresh enough" (in the sense of condition 2 in <xref target="cache.correctness"/>), it
516   &MUST; attach a warning to that effect, using a Warning general-header.
517   The Warning header and the currently defined warnings are described
518   in <xref target="header.warning"/>. The warning allows clients to take appropriate
519   action.
522   Warnings &MAY; be used for other purposes, both cache-related and
523   otherwise. The use of a warning, rather than an error status code,
524   distinguish these responses from true failures.
527   Warnings are assigned three digit warn-codes. The first digit
528   indicates whether the Warning &MUST; or &MUST-NOT; be deleted from a
529   stored cache entry after a successful revalidation:
532  <list style="hanging">
533    <t hangText="1xx">Warnings that describe the freshness or revalidation status of
534     the response, and so &MUST; be deleted after a successful
535     revalidation. 1xx warn-codes &MAY; be generated by a cache only when
536     validating a cached entry. It &MUST-NOT; be generated by clients.</t>
538    <t hangText="2xx">Warnings that describe some aspect of the entity body or entity
539     headers that is not rectified by a revalidation (for example, a
540     lossy compression of the entity bodies) and which &MUST-NOT; be
541     deleted after a successful revalidation.</t>
542    </list>
545   See <xref target="header.warning"/> for the definitions of the codes themselves.
548   HTTP/1.0 caches will cache all Warnings in responses, without
549   deleting the ones in the first category. Warnings in responses that
550   are passed to HTTP/1.0 caches carry an extra warning-date field,
551   which prevents a future HTTP/1.1 recipient from believing an
552   erroneously cached Warning.
555   Warnings also carry a warning text. The text &MAY; be in any
556   appropriate natural language (perhaps based on the client's Accept
557   headers), and include an &OPTIONAL; indication of what character set is
558   used.
561   Multiple warnings &MAY; be attached to a response (either by the origin
562   server or by a cache), including multiple warnings with the same code
563   number. For example, a server might provide the same warning with
564   texts in both English and Basque.
567   When multiple warnings are attached to a response, it might not be
568   practical or reasonable to display all of them to the user. This
569   version of HTTP does not specify strict priority rules for deciding
570   which warnings to display and in what order, but does suggest some
571   heuristics.
575<section title="Cache-control Mechanisms" anchor="cache-control.mechanisms">
577   The basic cache mechanisms in HTTP/1.1 (server-specified expiration
578   times and validators) are implicit directives to caches. In some
579   cases, a server or client might need to provide explicit directives
580   to the HTTP caches. We use the Cache-Control header for this purpose.
583   The Cache-Control header allows a client or server to transmit a
584   variety of directives in either requests or responses. These
585   directives typically override the default caching algorithms. As a
586   general rule, if there is any apparent conflict between header
587   values, the most restrictive interpretation is applied (that is, the
588   one that is most likely to preserve semantic transparency). However,
589   in some cases, cache-control directives are explicitly specified as
590   weakening the approximation of semantic transparency (for example,
591   "max-stale" or "public").
594   The cache-control directives are described in detail in <xref target="header.cache-control"/>.
598<section title="Explicit User Agent Warnings" anchor="">
600   Many user agents make it possible for users to override the basic
601   caching mechanisms. For example, the user agent might allow the user
602   to specify that cached entities (even explicitly stale ones) are
603   never validated. Or the user agent might habitually add "Cache-Control:
604   max-stale=3600" to every request. The user agent &SHOULD-NOT;
605   default to either non-transparent behavior, or behavior that results
606   in abnormally ineffective caching, but &MAY; be explicitly configured
607   to do so by an explicit action of the user.
610   If the user has overridden the basic caching mechanisms, the user
611   agent &SHOULD; explicitly indicate to the user whenever this results in
612   the display of information that might not meet the server's
613   transparency requirements (in particular, if the displayed entity is
614   known to be stale). Since the protocol normally allows the user agent
615   to determine if responses are stale or not, this indication need only
616   be displayed when this actually happens. The indication need not be a
617   dialog box; it could be an icon (for example, a picture of a rotting
618   fish) or some other indicator.
621   If the user has overridden the caching mechanisms in a way that would
622   abnormally reduce the effectiveness of caches, the user agent &SHOULD;
623   continually indicate this state to the user (for example, by a
624   display of a picture of currency in flames) so that the user does not
625   inadvertently consume excess resources or suffer from excessive
626   latency.
630<section title="Exceptions to the Rules and Warnings" anchor="">
632   In some cases, the operator of a cache &MAY; choose to configure it to
633   return stale responses even when not requested by clients. This
634   decision ought not be made lightly, but may be necessary for reasons
635   of availability or performance, especially when the cache is poorly
636   connected to the origin server. Whenever a cache returns a stale
637   response, it &MUST; mark it as such (using a Warning header) enabling
638   the client software to alert the user that there might be a potential
639   problem.
642   It also allows the user agent to take steps to obtain a first-hand or
643   fresh response. For this reason, a cache &SHOULD-NOT;  return a stale
644   response if the client explicitly requests a first-hand or fresh one,
645   unless it is impossible to comply for technical or policy reasons.
649<section title="Client-controlled Behavior" anchor="client-controlled.behavior">
651   While the origin server (and to a lesser extent, intermediate caches,
652   by their contribution to the age of a response) are the primary
653   source of expiration information, in some cases the client might need
654   to control a cache's decision about whether to return a cached
655   response without validating it. Clients do this using several
656   directives of the Cache-Control header.
659   A client's request &MAY; specify the maximum age it is willing to
660   accept of an unvalidated response; specifying a value of zero forces
661   the cache(s) to revalidate all responses. A client &MAY; also specify
662   the minimum time remaining before a response expires. Both of these
663   options increase constraints on the behavior of caches, and so cannot
664   further relax the cache's approximation of semantic transparency.
667   A client &MAY; also specify that it will accept stale responses, up to
668   some maximum amount of staleness. This loosens the constraints on the
669   caches, and so might violate the origin server's specified
670   constraints on semantic transparency, but might be necessary to
671   support disconnected operation, or high availability in the face of
672   poor connectivity.
677<section title="Expiration Model" anchor="expiration.model">
679<section title="Server-Specified Expiration" anchor="server-specified.expiration">
681   HTTP caching works best when caches can entirely avoid making
682   requests to the origin server. The primary mechanism for avoiding
683   requests is for an origin server to provide an explicit expiration
684   time in the future, indicating that a response &MAY; be used to satisfy
685   subsequent requests. In other words, a cache can return a fresh
686   response without first contacting the server.
689   Our expectation is that servers will assign future explicit
690   expiration times to responses in the belief that the entity is not
691   likely to change, in a semantically significant way, before the
692   expiration time is reached. This normally preserves semantic
693   transparency, as long as the server's expiration times are carefully
694   chosen.
697   The expiration mechanism applies only to responses taken from a cache
698   and not to first-hand responses forwarded immediately to the
699   requesting client.
702   If an origin server wishes to force a semantically transparent cache
703   to validate every request, it &MAY; assign an explicit expiration time
704   in the past. This means that the response is always stale, and so the
705   cache &SHOULD; validate it before using it for subsequent requests. See
706   <xref target="cache.revalidation.and.reload.controls"/> for a more restrictive way to force revalidation.
709   If an origin server wishes to force any HTTP/1.1 cache, no matter how
710   it is configured, to validate every request, it &SHOULD; use the "must-revalidate"
711   cache-control directive (see <xref target="header.cache-control"/>).
714   Servers specify explicit expiration times using either the Expires
715   header, or the max-age directive of the Cache-Control header.
718   An expiration time cannot be used to force a user agent to refresh
719   its display or reload a resource; its semantics apply only to caching
720   mechanisms, and such mechanisms need only check a resource's
721   expiration status when a new request for that resource is initiated.
722   See <xref target="history.lists"/> for an explanation of the difference between caches
723   and history mechanisms.
727<section title="Heuristic Expiration" anchor="heuristic.expiration">
729   Since origin servers do not always provide explicit expiration times,
730   HTTP caches typically assign heuristic expiration times, employing
731   algorithms that use other header values (such as the Last-Modified
732   time) to estimate a plausible expiration time. The HTTP/1.1
733   specification does not provide specific algorithms, but does impose
734   worst-case constraints on their results. Since heuristic expiration
735   times might compromise semantic transparency, they ought to be used
736   cautiously, and we encourage origin servers to provide explicit
737   expiration times as much as possible.
741<section title="Age Calculations" anchor="age.calculations">
743   In order to know if a cached entry is fresh, a cache needs to know if
744   its age exceeds its freshness lifetime. We discuss how to calculate
745   the latter in <xref target="expiration.calculations"/>; this section describes how to calculate
746   the age of a response or cache entry.
749   In this discussion, we use the term "now" to mean "the current value
750   of the clock at the host performing the calculation." Hosts that use
751   HTTP, but especially hosts running origin servers and caches, &SHOULD;
752   use NTP <xref target="RFC1305"/> or some similar protocol to synchronize their clocks to
753   a globally accurate time standard.
756   HTTP/1.1 requires origin servers to send a Date header, if possible,
757   with every response, giving the time at which the response was
758   generated (see &header-date;). We use the term "date_value" to denote
759   the value of the Date header, in a form appropriate for arithmetic
760   operations.
763   HTTP/1.1 uses the Age response-header to convey the estimated age of
764   the response message when obtained from a cache. The Age field value
765   is the cache's estimate of the amount of time since the response was
766   generated or revalidated by the origin server.
769   In essence, the Age value is the sum of the time that the response
770   has been resident in each of the caches along the path from the
771   origin server, plus the amount of time it has been in transit along
772   network paths.
775   We use the term "age_value" to denote the value of the Age header, in
776   a form appropriate for arithmetic operations.
779   A response's age can be calculated in two entirely independent ways:
780  <list style="numbers">
781      <t>now minus date_value, if the local clock is reasonably well
782         synchronized to the origin server's clock. If the result is
783         negative, the result is replaced by zero.</t>
785      <t>age_value, if all of the caches along the response path
786         implement HTTP/1.1.</t>
787  </list>
790   Given that we have two independent ways to compute the age of a
791   response when it is received, we can combine these as
793<figure><artwork type="code">
794    corrected_received_age = max(now - date_value, age_value)
797   and as long as we have either nearly synchronized clocks or all-HTTP/1.1
798   paths, one gets a reliable (conservative) result.
801   Because of network-imposed delays, some significant interval might
802   pass between the time that a server generates a response and the time
803   it is received at the next outbound cache or client. If uncorrected,
804   this delay could result in improperly low ages.
807   Because the request that resulted in the returned Age value must have
808   been initiated prior to that Age value's generation, we can correct
809   for delays imposed by the network by recording the time at which the
810   request was initiated. Then, when an Age value is received, it &MUST;
811   be interpreted relative to the time the request was initiated, not
812   the time that the response was received. This algorithm results in
813   conservative behavior no matter how much delay is experienced. So, we
814   compute:
816<figure><artwork type="code">
817   corrected_initial_age = corrected_received_age
818                         + (now - request_time)
821   where "request_time" is the time (according to the local clock) when
822   the request that elicited this response was sent.
825   Summary of age calculation algorithm, when a cache receives a
826   response:
828<figure><artwork type="code">
829   /*
830    * age_value
831    *      is the value of Age: header received by the cache with
832    *              this response.
833    * date_value
834    *      is the value of the origin server's Date: header
835    * request_time
836    *      is the (local) time when the cache made the request
837    *              that resulted in this cached response
838    * response_time
839    *      is the (local) time when the cache received the
840    *              response
841    * now
842    *      is the current (local) time
843    */
845   apparent_age = max(0, response_time - date_value);
846   corrected_received_age = max(apparent_age, age_value);
847   response_delay = response_time - request_time;
848   corrected_initial_age = corrected_received_age + response_delay;
849   resident_time = now - response_time;
850   current_age   = corrected_initial_age + resident_time;
853   The current_age of a cache entry is calculated by adding the amount
854   of time (in seconds) since the cache entry was last validated by the
855   origin server to the corrected_initial_age. When a response is
856   generated from a cache entry, the cache &MUST; include a single Age
857   header field in the response with a value equal to the cache entry's
858   current_age.
861   The presence of an Age header field in a response implies that a
862   response is not first-hand. However, the converse is not true, since
863   the lack of an Age header field in a response does not imply that the
864   response is first-hand unless all caches along the request path are
865   compliant with HTTP/1.1 (i.e., older HTTP caches did not implement
866   the Age header field).
870<section title="Expiration Calculations" anchor="expiration.calculations">
872   In order to decide whether a response is fresh or stale, we need to
873   compare its freshness lifetime to its age. The age is calculated as
874   described in <xref target="age.calculations"/>; this section describes how to calculate
875   the freshness lifetime, and to determine if a response has expired.
876   In the discussion below, the values can be represented in any form
877   appropriate for arithmetic operations.
880   We use the term "expires_value" to denote the value of the Expires
881   header. We use the term "max_age_value" to denote an appropriate
882   value of the number of seconds carried by the "max-age" directive of
883   the Cache-Control header in a response (see <xref target="modifications.of.the.basic.expiration.mechanism"/>).
886   The max-age directive takes priority over Expires, so if max-age is
887   present in a response, the calculation is simply:
889<figure><artwork type="code">
890   freshness_lifetime = max_age_value
893   Otherwise, if Expires is present in the response, the calculation is:
895<figure><artwork type="code">
896   freshness_lifetime = expires_value - date_value
899   Note that neither of these calculations is vulnerable to clock skew,
900   since all of the information comes from the origin server.
903   If none of Expires, Cache-Control: max-age, or Cache-Control: s-maxage
904   (see <xref target="modifications.of.the.basic.expiration.mechanism"/>) appears in the response, and the response
905   does not include other restrictions on caching, the cache &MAY; compute
906   a freshness lifetime using a heuristic. The cache &MUST; attach Warning
907   113 to any response whose age is more than 24 hours if such warning
908   has not already been added.
911   Also, if the response does have a Last-Modified time, the heuristic
912   expiration value &SHOULD; be no more than some fraction of the interval
913   since that time. A typical setting of this fraction might be 10%.
916   The calculation to determine if a response has expired is quite
917   simple:
919<figure><artwork type="code">
920   response_is_fresh = (freshness_lifetime &gt; current_age)
924<section title="Disambiguating Expiration Values" anchor="disambiguating.expiration.values">
926   Because expiration values are assigned optimistically, it is possible
927   for two caches to contain fresh values for the same resource that are
928   different.
931   If a client performing a retrieval receives a non-first-hand response
932   for a request that was already fresh in its own cache, and the Date
933   header in its existing cache entry is newer than the Date on the new
934   response, then the client &MAY; ignore the response. If so, it &MAY;
935   retry the request with a "Cache-Control: max-age=0" directive (see
936   <xref target="header.cache-control"/>), to force a check with the origin server.
939   If a cache has two fresh responses for the same representation with
940   different validators, it &MUST; use the one with the more recent Date
941   header. This situation might arise because the cache is pooling
942   responses from other caches, or because a client has asked for a
943   reload or a revalidation of an apparently fresh cache entry.
947<section title="Disambiguating Multiple Responses" anchor="disambiguating.multiple.responses">
949   Because a client might be receiving responses via multiple paths, so
950   that some responses flow through one set of caches and other
951   responses flow through a different set of caches, a client might
952   receive responses in an order different from that in which the origin
953   server sent them. We would like the client to use the most recently
954   generated response, even if older responses are still apparently
955   fresh.
958   Neither the entity tag nor the expiration value can impose an
959   ordering on responses, since it is possible that a later response
960   intentionally carries an earlier expiration time. The Date values are
961   ordered to a granularity of one second.
964   When a client tries to revalidate a cache entry, and the response it
965   receives contains a Date header that appears to be older than the one
966   for the existing entry, then the client &SHOULD; repeat the request
967   unconditionally, and include
969<figure><artwork type="example">
970    Cache-Control: max-age=0
973   to force any intermediate caches to validate their copies directly
974   with the origin server, or
976<figure><artwork type="example">
977    Cache-Control: no-cache
980   to force any intermediate caches to obtain a new copy from the origin
981   server.
984   If the Date values are equal, then the client &MAY; use either response
985   (or &MAY;, if it is being extremely prudent, request a new response).
986   Servers &MUST-NOT; depend on clients being able to choose
987   deterministically between responses generated during the same second,
988   if their expiration times overlap.
993<section title="Validation Model" anchor="validation.model">
995   When a cache has a stale entry that it would like to use as a
996   response to a client's request, it first has to check with the origin
997   server (or possibly an intermediate cache with a fresh response) to
998   see if its cached entry is still usable. We call this "validating"
999   the cache entry.
1002   HTTP's conditional request mechanism, defined in &conditional;, is
1003   used to avoid retransmitting the response payload when the cached entry
1004   is valid.  When a cached response includes one or more "cache validators,"
1005   such as the field values of an ETag or Last-Modified header field, then
1006   a validating GET request &SHOULD; be made conditional to those field values.
1007   The server checks the conditional request's validator against the current
1008   state of the requested resource and, if they match, the server responds
1009   with a 304 (Not Modified) status code to indicate that the cached response
1010   can be refreshed and reused without retransmitting the response payload.
1011   If the validator does not match the current state of the requested
1012   resource, then the server returns a full response, including payload,
1013   so that the request can be satisfied and the cache entry supplanted
1014   without the need for an additional network round-trip.
1018<section title="Response Cacheability" anchor="response.cacheability">
1020   Unless specifically constrained by a cache-control (<xref target="header.cache-control"/>)
1021   directive, a caching system &MAY; always store a successful response
1022   (see <xref target="errors.or.incomplete.response.cache.behavior"/>) as a cache entry, &MAY; return it without validation
1023   if it is fresh, and &MAY; return it after successful validation. If
1024   there is neither a cache validator nor an explicit expiration time
1025   associated with a response, we do not expect it to be cached, but
1026   certain caches &MAY; violate this expectation (for example, when little
1027   or no network connectivity is available). A client can usually detect
1028   that such a response was taken from a cache by comparing the Date
1029   header to the current time.
1030  <list><t>
1031      <x:h>Note:</x:h> some HTTP/1.0 caches are known to violate this expectation
1032      without providing any Warning.
1033  </t></list>
1036   However, in some cases it might be inappropriate for a cache to
1037   retain an entity, or to return it in response to a subsequent
1038   request. This might be because absolute semantic transparency is
1039   deemed necessary by the service author, or because of security or
1040   privacy considerations. Certain cache-control directives are
1041   therefore provided so that the server can indicate that certain
1042   resource entities, or portions thereof, are not to be cached
1043   regardless of other considerations.
1046   Note that &header-authorization; normally prevents a shared cache from saving
1047   and returning a response to a previous request if that request
1048   included an Authorization header.
1051   A response received with a status code of 200, 203, 206, 300, 301 or
1052   410 &MAY; be stored by a cache and used in reply to a subsequent
1053   request, subject to the expiration mechanism, unless a cache-control
1054   directive prohibits caching. However, a cache that does not support
1055   the Range and Content-Range headers &MUST-NOT; cache 206 (Partial
1056   Content) responses.
1059   A response received with any other status code (e.g. status codes 302
1060   and 307) &MUST-NOT; be returned in a reply to a subsequent request
1061   unless there are cache-control directives or another header(s) that
1062   explicitly allow it. For example, these include the following: an
1063   Expires header (<xref target="header.expires"/>); a "max-age", "s-maxage",  "must-revalidate",
1064   "proxy-revalidate", "public" or "private" cache-control
1065   directive (<xref target="header.cache-control"/>).
1069<section title="Constructing Responses From Caches" anchor="constructing.responses.from.caches">
1071   The purpose of an HTTP cache is to store information received in
1072   response to requests for use in responding to future requests. In
1073   many cases, a cache simply returns the appropriate parts of a
1074   response to the requester. However, if the cache holds a cache entry
1075   based on a previous response, it might have to combine parts of a new
1076   response with what is held in the cache entry.
1079<section title="End-to-end and Hop-by-hop Headers" anchor="end-to-end.and.hop-by-hop.headers">
1081   For the purpose of defining the behavior of caches and non-caching
1082   proxies, we divide HTTP headers into two categories:
1083  <list style="symbols">
1084      <t>End-to-end headers, which are  transmitted to the ultimate
1085        recipient of a request or response. End-to-end headers in
1086        responses &MUST; be stored as part of a cache entry and &MUST; be
1087        transmitted in any response formed from a cache entry.</t>
1089      <t>Hop-by-hop headers, which are meaningful only for a single
1090        transport-level connection, and are not stored by caches or
1091        forwarded by proxies.</t>
1092  </list>
1095   The following HTTP/1.1 headers are hop-by-hop headers:
1096  <list style="symbols">
1097      <t>Connection</t>
1098      <t>Keep-Alive</t>
1099      <t>Proxy-Authenticate</t>
1100      <t>Proxy-Authorization</t>
1101      <t>TE</t>
1102      <t>Trailer</t>
1103      <t>Transfer-Encoding</t>
1104      <t>Upgrade</t>
1105  </list>
1108   All other headers defined by HTTP/1.1 are end-to-end headers.
1111   Other hop-by-hop headers &MUST; be listed in a Connection header
1112   (&header-connection;).
1116<section title="Non-modifiable Headers" anchor="non-modifiable.headers">
1118   Some features of HTTP/1.1, such as Digest
1119   Authentication, depend on the value of certain end-to-end headers. A
1120   transparent proxy &SHOULD-NOT;  modify an end-to-end header unless the
1121   definition of that header requires or specifically allows that.
1124   A transparent proxy &MUST-NOT; modify any of the following fields in a
1125   request or response, and it &MUST-NOT; add any of these fields if not
1126   already present:
1127  <list style="symbols">
1128      <t>Content-Location</t>
1129      <t>Content-MD5</t>
1130      <t>ETag</t>
1131      <t>Last-Modified</t>
1132  </list>
1135   A transparent proxy &MUST-NOT; modify any of the following fields in a
1136   response:
1137  <list style="symbols">
1138    <t>Expires</t>
1139  </list>
1142   but it &MAY; add any of these fields if not already present. If an
1143   Expires header is added, it &MUST; be given a field-value identical to
1144   that of the Date header in that response.
1147   A  proxy &MUST-NOT; modify or add any of the following fields in a
1148   message that contains the no-transform cache-control directive, or in
1149   any request:
1150  <list style="symbols">
1151    <t>Content-Encoding</t>
1152    <t>Content-Range</t>
1153    <t>Content-Type</t>
1154  </list>
1157   A non-transparent proxy &MAY; modify or add these fields to a message
1158   that does not include no-transform, but if it does so, it &MUST; add a
1159   Warning 214 (Transformation applied) if one does not already appear
1160   in the message (see <xref target="header.warning"/>).
1161  <list><t>
1162      Warning: unnecessary modification of end-to-end headers might
1163      cause authentication failures if stronger authentication
1164      mechanisms are introduced in later versions of HTTP. Such
1165      authentication mechanisms &MAY; rely on the values of header fields
1166      not listed here.
1167    </t></list>
1170   The Content-Length field of a request or response is added or deleted
1171   according to the rules in &message-length;. A transparent proxy &MUST;
1172   preserve the entity-length (&entity-length;) of the entity-body,
1173   although it &MAY; change the transfer-length (&message-length;).
1177<section title="Combining Headers" anchor="combining.headers">
1179   When a cache makes a validating request to a server, and the server
1180   provides a 304 (Not Modified) response or a 206 (Partial Content)
1181   response, the cache then constructs a response to send to the
1182   requesting client.
1185   If the status code is 304 (Not Modified), the cache uses the entity-body
1186   stored in the cache entry as the entity-body of this outgoing
1187   response. If the status code is 206 (Partial Content) and the ETag or
1188   Last-Modified headers match exactly, the cache &MAY; combine the
1189   contents stored in the cache entry with the new contents received in
1190   the response and use the result as the entity-body of this outgoing
1191   response, (see &combining-byte-ranges;).
1194   The end-to-end headers stored in the cache entry are used for the
1195   constructed response, except that
1196  <list style="symbols">
1197    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
1198      &MUST; be deleted from the cache entry and the forwarded response.</t>
1199    <t>any stored Warning headers with warn-code 2xx &MUST; be retained
1200        in the cache entry and the forwarded response.</t>
1201    <t>any end-to-end headers provided in the 304 or 206 response &MUST;
1202        replace the corresponding headers from the cache entry.</t>
1203  </list>
1206   Unless the cache decides to remove the cache entry, it &MUST; also
1207   replace the end-to-end headers stored with the cache entry with
1208   corresponding headers received in the incoming response, except for
1209   Warning headers as described immediately above. If a header field-name
1210   in the incoming response matches more than one header in the
1211   cache entry, all such old headers &MUST; be replaced.
1214   In other words, the set of end-to-end headers received in the
1215   incoming response overrides all corresponding end-to-end headers
1216   stored with the cache entry (except for stored Warning headers with
1217   warn-code 1xx, which are deleted even if not overridden).
1218  <list><t>
1219      <x:h>Note:</x:h> this rule allows an origin server to use a 304 (Not
1220      Modified) or a 206 (Partial Content) response to update any header
1221      associated with a previous response for the same entity or sub-ranges
1222      thereof, although it might not always be meaningful or
1223      correct to do so. This rule does not allow an origin server to use
1224      a 304 (Not Modified) or a 206 (Partial Content) response to
1225      entirely delete a header that it had provided with a previous
1226      response.
1227  </t></list>
1233<section title="Caching Negotiated Responses" anchor="caching.negotiated.responses">
1235   Use of server-driven content negotiation (&server-driven-negotiation;), as indicated
1236   by the presence of a Vary header field in a response, alters the
1237   conditions and procedure by which a cache can use the response for
1238   subsequent requests. See <xref target="header.vary"/> for use of the Vary header
1239   field by servers.
1242   A server &SHOULD; use the Vary header field to inform a cache of what
1243   request-header fields were used to select among multiple
1244   representations of a cacheable response subject to server-driven
1245   negotiation. The set of header fields named by the Vary field value
1246   is known as the "selecting" request-headers.
1249   When the cache receives a subsequent request whose Request-URI
1250   specifies one or more cache entries including a Vary header field,
1251   the cache &MUST-NOT; use such a cache entry to construct a response to
1252   the new request unless all of the selecting request-headers present
1253   in the new request match the corresponding stored request-headers in
1254   the original request.
1257   The selecting request-headers from two requests are defined to match
1258   if and only if the selecting request-headers in the first request can
1259   be transformed to the selecting request-headers in the second request
1260   by adding or removing linear white space (LWS) at places where this
1261   is allowed by the corresponding BNF, and/or combining multiple
1262   message-header fields with the same field name following the rules
1263   about message headers in &message-headers;.
1266   A Vary header field-value of "*" always fails to match and subsequent
1267   requests on that resource can only be properly interpreted by the
1268   origin server.
1271   If the selecting request header fields for the cached entry do not
1272   match the selecting request header fields of the new request, then
1273   the cache &MUST-NOT; use a cached entry to satisfy the request unless
1274   it first relays the new request to the origin server in a conditional
1275   request and the server responds with 304 (Not Modified), including an
1276   entity tag or Content-Location that indicates the entity to be used.
1279   If an entity tag was assigned to a cached representation, the
1280   forwarded request &SHOULD; be conditional and include the entity tags
1281   in an If-None-Match header field from all its cache entries for the
1282   resource. This conveys to the server the set of entities currently
1283   held by the cache, so that if any one of these entities matches the
1284   requested entity, the server can use the ETag header field in its 304
1285   (Not Modified) response to tell the cache which entry is appropriate.
1286   If the entity-tag of the new response matches that of an existing
1287   entry, the new response &SHOULD; be used to update the header fields of
1288   the existing entry, and the result &MUST; be returned to the client.
1291   If any of the existing cache entries contains only partial content
1292   for the associated entity, its entity-tag &SHOULD-NOT;  be included in
1293   the If-None-Match header field unless the request is for a range that
1294   would be fully satisfied by that entry.
1297   If a cache receives a successful response whose Content-Location
1298   field matches that of an existing cache entry for the same Request-URI,
1299   whose entity-tag differs from that of the existing entry, and
1300   whose Date is more recent than that of the existing entry, the
1301   existing entry &SHOULD-NOT;  be returned in response to future requests
1302   and &SHOULD; be deleted from the cache.
1306<section title="Shared and Non-Shared Caches" anchor="shared.and.non-shared.caches">
1308   For reasons of security and privacy, it is necessary to make a
1309   distinction between "shared" and "non-shared" caches. A non-shared
1310   cache is one that is accessible only to a single user. Accessibility
1311   in this case &SHOULD; be enforced by appropriate security mechanisms.
1312   All other caches are considered to be "shared." Other sections of
1313   this specification place certain constraints on the operation of
1314   shared caches in order to prevent loss of privacy or failure of
1315   access controls.
1319<section title="Errors or Incomplete Response Cache Behavior" anchor="errors.or.incomplete.response.cache.behavior">
1321   A cache that receives an incomplete response (for example, with fewer
1322   bytes of data than specified in a Content-Length header) &MAY; store
1323   the response. However, the cache &MUST; treat this as a partial
1324   response. Partial responses &MAY; be combined as described in &combining-byte-ranges;;
1325   the result might be a full response or might still be
1326   partial. A cache &MUST-NOT; return a partial response to a client
1327   without explicitly marking it as such, using the 206 (Partial
1328   Content) status code. A cache &MUST-NOT; return a partial response
1329   using a status code of 200 (OK).
1332   If a cache receives a 5xx response while attempting to revalidate an
1333   entry, it &MAY; either forward this response to the requesting client,
1334   or act as if the server failed to respond. In the latter case, it &MAY;
1335   return a previously received response unless the cached entry
1336   includes the "must-revalidate" cache-control directive (see <xref target="header.cache-control"/>).
1340<section title="Side Effects of GET and HEAD" anchor="side.effects.of.get.and.head">
1342   Unless the origin server explicitly prohibits the caching of their
1343   responses, the application of GET and HEAD methods to any resources
1344   &SHOULD-NOT;  have side effects that would lead to erroneous behavior if
1345   these responses are taken from a cache. They &MAY; still have side
1346   effects, but a cache is not required to consider such side effects in
1347   its caching decisions. Caches are always expected to observe an
1348   origin server's explicit restrictions on caching.
1351   We note one exception to this rule: since some applications have
1352   traditionally used GET and HEAD requests with URLs containing a query part
1353   to perform operations with significant side
1354   effects, caches &MUST-NOT; treat responses to such URIs as fresh unless
1355   the server provides an explicit expiration time. This specifically
1356   means that responses from HTTP/1.0 servers for such URIs &SHOULD-NOT;
1357   be taken from a cache. See &safe-methods; for related information.
1361<section title="Invalidation After Updates or Deletions" anchor="invalidation.after.updates.or.deletions">
1363   The effect of certain methods performed on a resource at the origin
1364   server might cause one or more existing cache entries to become non-transparently
1365   invalid. That is, although they might continue to be
1366   "fresh," they do not accurately reflect what the origin server would
1367   return for a new request on that resource.
1370   There is no way for HTTP to guarantee that all such
1371   cache entries are marked invalid. For example, the request that
1372   caused the change at the origin server might not have gone through
1373   the proxy where a cache entry is stored. However, several rules help
1374   reduce the likelihood of erroneous behavior.
1377   In this section, the phrase "invalidate an entity" means that the
1378   cache will either remove all instances of that entity from its
1379   storage, or will mark these as "invalid" and in need of a mandatory
1380   revalidation before they can be returned in response to a subsequent
1381   request.
1384   Some HTTP methods &MUST; cause a cache to invalidate an entity. This is
1385   either the entity referred to by the Request-URI, or by the Location
1386   or Content-Location headers (if present). These methods are:
1387  <list style="symbols">
1388      <t>PUT</t>
1389      <t>DELETE</t>
1390      <t>POST</t>
1391  </list>
1394   An invalidation based
1395   on the URI in a Location or Content-Location header &MUST-NOT; be
1396   performed if the host part of that URI differs from the host part
1397   in the Request-URI. This helps prevent denial of service attacks.
1400   A cache that passes through requests for methods it does not
1401   understand &SHOULD; invalidate any entities referred to by the
1402   Request-URI.
1406<section title="Write-Through Mandatory" anchor="write-through.mandatory">
1408   All methods that might be expected to cause modifications to the
1409   origin server's resources &MUST; be written through to the origin
1410   server. This currently includes all methods except for GET and HEAD.
1411   A cache &MUST-NOT; reply to such a request from a client before having
1412   transmitted the request to the inbound server, and having received a
1413   corresponding response from the inbound server. This does not prevent
1414   a proxy cache from sending a 100 (Continue) response before the
1415   inbound server has sent its final reply.
1418   The alternative (known as "write-back" or "copy-back" caching) is not
1419   allowed in HTTP/1.1, due to the difficulty of providing consistent
1420   updates and the problems arising from server, cache, or network
1421   failure prior to write-back.
1425<section title="Cache Replacement" anchor="cache.replacement">
1427   If a new cacheable (see Sections <xref target="" format="counter"/>,
1428   <xref target="disambiguating.expiration.values" format="counter"/>,
1429   <xref target="disambiguating.multiple.responses" format="counter"/>
1430   and <xref target="errors.or.incomplete.response.cache.behavior" format="counter"/>)
1431   response is received from a resource while any existing responses for
1432   the same resource are cached, the cache &SHOULD; use the new response
1433   to reply to the current request. It &MAY; insert it into cache storage
1434   and &MAY;, if it meets all other requirements, use it to respond to any
1435   future requests that would previously have caused the old response to
1436   be returned. If it inserts the new response into cache storage  the
1437   rules in <xref target="combining.headers"/> apply.
1438  <list><t>
1439      <x:h>Note:</x:h> a new response that has an older Date header value than
1440      existing cached responses is not cacheable.
1441  </t></list>
1445<section title="History Lists" anchor="history.lists">
1447   User agents often have history mechanisms, such as "Back" buttons and
1448   history lists, which can be used to redisplay an entity retrieved
1449   earlier in a session.
1452   History mechanisms and caches are different. In particular history
1453   mechanisms &SHOULD-NOT;  try to show a semantically transparent view of
1454   the current state of a resource. Rather, a history mechanism is meant
1455   to show exactly what the user saw at the time when the resource was
1456   retrieved.
1459   By default, an expiration time does not apply to history mechanisms.
1460   If the entity is still in storage, a history mechanism &SHOULD; display
1461   it even if the entity has expired, unless the user has specifically
1462   configured the agent to refresh expired history documents.
1465   This is not to be construed to prohibit the history mechanism from
1466   telling the user that a view might be stale.
1467  <list><t>
1468      <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from
1469      viewing stale resources, this will tend to force service authors
1470      to avoid using HTTP expiration controls and cache controls when
1471      they would otherwise like to. Service authors may consider it
1472      important that users not be presented with error messages or
1473      warning messages when they use navigation controls (such as BACK)
1474      to view previously fetched resources. Even though sometimes such
1475      resources ought not be cached, or ought to expire quickly, user
1476      interface considerations may force service authors to resort to
1477      other means of preventing caching (e.g. "once-only" URLs) in order
1478      not to suffer the effects of improperly functioning history
1479      mechanisms.
1480  </t></list>
1484<section title="Header Field Definitions" anchor="header.fields">
1486   This section defines the syntax and semantics of HTTP/1.1 header fields
1487   related to caching.
1490   For entity-header fields, both sender and recipient refer to either the
1491   client or the server, depending on who sends and who receives the entity.
1494<section title="Age" anchor="header.age">
1495  <iref primary="true" item="Age header" x:for-anchor=""/>
1496  <iref primary="true" item="Headers" subitem="Age" x:for-anchor=""/>
1498      The Age response-header field conveys the sender's estimate of the
1499      amount of time since the response (or its revalidation) was
1500      generated at the origin server. A cached response is "fresh" if
1501      its age does not exceed its freshness lifetime. Age values are
1502      calculated as specified in <xref target="age.calculations"/>.
1504<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="age-value"/>
1505  Age = "Age" ":" age-value
1506  age-value = delta-seconds
1509      Age values are non-negative decimal integers, representing time in
1510      seconds.
1513      If a cache receives a value larger than the largest positive
1514      integer it can represent, or if any of its age calculations
1515      overflows, it &MUST; transmit an Age header with a value of
1516      2147483648 (2^31). An HTTP/1.1 server that includes a cache &MUST;
1517      include an Age header field in every response generated from its
1518      own cache. Caches &SHOULD; use an arithmetic type of at least 31
1519      bits of range.
1523<section title="Cache-Control" anchor="header.cache-control">
1524  <iref primary="true" item="Cache-Control header" x:for-anchor=""/>
1525  <iref primary="true" item="Headers" subitem="Cache-Control" x:for-anchor=""/>
1527   The Cache-Control general-header field is used to specify directives
1528   that &MUST; be obeyed by all caching mechanisms along the
1529   request/response chain. The directives specify behavior intended to
1530   prevent caches from adversely interfering with the request or
1531   response. These directives typically override the default caching
1532   algorithms. Cache directives are unidirectional in that the presence
1533   of a directive in a request does not imply that the same directive is
1534   to be given in the response.
1535  <list><t>
1536      Note that HTTP/1.0 caches might not implement Cache-Control and
1537      might only implement Pragma: no-cache (see <xref target="header.pragma"/>).
1538  </t></list>
1541   Cache directives &MUST; be passed through by a proxy or gateway
1542   application, regardless of their significance to that application,
1543   since the directives might be applicable to all recipients along the
1544   request/response chain. It is not possible to specify a cache-directive
1545   for a specific cache.
1547<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-directive"/><iref primary="true" item="Grammar" subitem="cache-request-directive"/><iref primary="true" item="Grammar" subitem="cache-response-directive"/><iref primary="true" item="Grammar" subitem="cache-extension"/>
1548  Cache-Control   = "Cache-Control" ":" 1#cache-directive
1550  cache-directive = cache-request-directive
1551       | cache-response-directive
1553  cache-request-directive =
1554         "no-cache"                          ; <xref target=""/>
1555       | "no-store"                          ; <xref target=""/>
1556       | "max-age" "=" delta-seconds         ; <xref target="modifications.of.the.basic.expiration.mechanism"/>, <xref format="counter" target="cache.revalidation.and.reload.controls"/>
1557       | "max-stale" [ "=" delta-seconds ]   ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1558       | "min-fresh" "=" delta-seconds       ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1559       | "no-transform"                      ; <xref target="no-transform.directive"/>
1560       | "only-if-cached"                    ; <xref target="cache.revalidation.and.reload.controls"/>
1561       | cache-extension                     ; <xref target="cache.control.extensions"/>
1563  cache-response-directive =
1564         "public"                               ; <xref target=""/>
1565       | "private" [ "=" DQUOTE 1#field-name DQUOTE ] ; <xref target=""/>
1566       | "no-cache" [ "=" DQUOTE 1#field-name DQUOTE ]; <xref target=""/>
1567       | "no-store"                             ; <xref target=""/>
1568       | "no-transform"                         ; <xref target="no-transform.directive"/>
1569       | "must-revalidate"                      ; <xref target="cache.revalidation.and.reload.controls"/>
1570       | "proxy-revalidate"                     ; <xref target="cache.revalidation.and.reload.controls"/>
1571       | "max-age" "=" delta-seconds            ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1572       | "s-maxage" "=" delta-seconds           ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1573       | cache-extension                        ; <xref target="cache.control.extensions"/>
1575  cache-extension = token [ "=" ( token | quoted-string ) ]
1578   When a directive appears without any 1#field-name parameter, the
1579   directive applies to the entire request or response. When such a
1580   directive appears with a 1#field-name parameter, it applies only to
1581   the named field or fields, and not to the rest of the request or
1582   response. This mechanism supports extensibility; implementations of
1583   future versions of HTTP might apply these directives to
1584   header fields not defined in HTTP/1.1.
1587   The cache-control directives can be broken down into these general
1588   categories:
1589  <list style="symbols">
1590     <t>Restrictions on what are cacheable; these may only be imposed by
1591        the origin server.</t>
1593     <t>Restrictions on what may be stored by a cache; these may be
1594        imposed by either the origin server or the user agent.</t>
1596     <t>Modifications of the basic expiration mechanism; these may be
1597        imposed by either the origin server or the user agent.</t>
1599     <t>Controls over cache revalidation and reload; these may only be
1600        imposed by a user agent.</t>
1602     <t>Control over transformation of entities.</t>
1604     <t>Extensions to the caching system.</t>
1605  </list>
1608<section title="What is Cacheable" anchor="">
1610   By default, a response is cacheable if the requirements of the
1611   request method, request header fields, and the response status
1612   indicate that it is cacheable. <xref target="response.cacheability"/> summarizes these defaults
1613   for cacheability. The following Cache-Control response directives
1614   allow an origin server to override the default cacheability of a
1615   response:
1618  <iref item="Cache Directives" subitem="public" primary="true"/>
1619  <iref item="public" subitem="Cache Directive" primary="true"/>
1620   public
1621  <list><t>
1622      Indicates that the response &MAY; be cached by any cache, even if it
1623      would normally be non-cacheable or cacheable only within a non-shared
1624      cache. (See also Authorization, &header-authorization;, for
1625      additional details.)
1626  </t></list>
1629  <iref item="Cache Directives" subitem="private" primary="true"/>
1630  <iref item="private" subitem="Cache Directive" primary="true"/>
1631   private
1632  <list><t>
1633      Indicates that all or part of the response message is intended for
1634      a single user and &MUST-NOT; be cached by a shared cache. This
1635      allows an origin server to state that the specified parts of the
1636      response are intended for only one user and are not a valid
1637      response for requests by other users. A private (non-shared) cache
1638      &MAY; cache the response.
1639    </t><t>
1640       <x:h>Note:</x:h> This usage of the word private only controls where the
1641       response may be cached, and cannot ensure the privacy of the
1642       message content.
1643  </t></list>
1646  <iref item="Cache Directives" subitem="no-cache" primary="true"/>
1647  <iref item="no-cache" subitem="Cache Directive" primary="true"/>
1648   no-cache
1649  <list><t>
1650       If the no-cache directive does not specify a field-name, then a
1651      cache &MUST-NOT; use the response to satisfy a subsequent request
1652      without successful revalidation with the origin server. This
1653      allows an origin server to prevent caching even by caches that
1654      have been configured to return stale responses to client requests.
1655    </t><t>
1656      If the no-cache directive does specify one or more field-names,
1657      then a cache &MAY; use the response to satisfy a subsequent request,
1658      subject to any other restrictions on caching. However, the
1659      specified field-name(s) &MUST-NOT; be sent in the response to a
1660      subsequent request without successful revalidation with the origin
1661      server. This allows an origin server to prevent the re-use of
1662      certain header fields in a response, while still allowing caching
1663      of the rest of the response.
1664    <list><t>
1665       <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this
1666       directive.
1667    </t></list>
1668  </t></list>
1672<section title="What May be Stored by Caches" anchor="">
1674  <iref item="Cache Directives" subitem="no-store" primary="true"/>
1675  <iref item="no-store" subitem="Cache Directive" primary="true"/>
1676   no-store
1677  <list><t>   
1678      The purpose of the no-store directive is to prevent the
1679      inadvertent release or retention of sensitive information (for
1680      example, on backup tapes). The no-store directive applies to the
1681      entire message, and &MAY; be sent either in a response or in a
1682      request. If sent in a request, a cache &MUST-NOT; store any part of
1683      either this request or any response to it. If sent in a response,
1684      a cache &MUST-NOT; store any part of either this response or the
1685      request that elicited it. This directive applies to both non-shared
1686      and shared caches. "&MUST-NOT; store" in this context means
1687      that the cache &MUST-NOT; intentionally store the information in
1688      non-volatile storage, and &MUST; make a best-effort attempt to
1689      remove the information from volatile storage as promptly as
1690      possible after forwarding it.
1691  </t><t>
1692      Even when this directive is associated with a response, users
1693      might explicitly store such a response outside of the caching
1694      system (e.g., with a "Save As" dialog). History buffers &MAY; store
1695      such responses as part of their normal operation.
1696  </t><t>
1697      The purpose of this directive is to meet the stated requirements
1698      of certain users and service authors who are concerned about
1699      accidental releases of information via unanticipated accesses to
1700      cache data structures. While the use of this directive might
1701      improve privacy in some cases, we caution that it is NOT in any
1702      way a reliable or sufficient mechanism for ensuring privacy. In
1703      particular, malicious or compromised caches might not recognize or
1704      obey this directive, and communications networks might be
1705      vulnerable to eavesdropping.
1706  </t></list>
1710<section title="Modifications of the Basic Expiration Mechanism" anchor="modifications.of.the.basic.expiration.mechanism">
1712   The expiration time of an entity &MAY; be specified by the origin
1713   server using the Expires header (see <xref target="header.expires"/>). Alternatively,
1714   it &MAY; be specified using the max-age directive in a response. When
1715   the max-age cache-control directive is present in a cached response,
1716   the response is stale if its current age is greater than the age
1717   value given (in seconds) at the time of a new request for that
1718   resource. The max-age directive on a response implies that the
1719   response is cacheable (i.e., "public") unless some other, more
1720   restrictive cache directive is also present.
1723   If a response includes both an Expires header and a max-age
1724   directive, the max-age directive overrides the Expires header, even
1725   if the Expires header is more restrictive. This rule allows an origin
1726   server to provide, for a given response, a longer expiration time to
1727   an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be
1728   useful if certain HTTP/1.0 caches improperly calculate ages or
1729   expiration times, perhaps due to desynchronized clocks.
1732   Many HTTP/1.0 cache implementations will treat an Expires value that
1733   is less than or equal to the response Date value as being equivalent
1734   to the Cache-Control response directive "no-cache". If an HTTP/1.1
1735   cache receives such a response, and the response does not include a
1736   Cache-Control header field, it &SHOULD; consider the response to be
1737   non-cacheable in order to retain compatibility with HTTP/1.0 servers.
1738  <list><t>
1739       <x:h>Note:</x:h> An origin server might wish to use a relatively new HTTP
1740       cache control feature, such as the "private" directive, on a
1741       network including older caches that do not understand that
1742       feature. The origin server will need to combine the new feature
1743       with an Expires field whose value is less than or equal to the
1744       Date value. This will prevent older caches from improperly
1745       caching the response.
1746  </t></list>
1749  <iref item="Cache Directives" subitem="s-maxage" primary="true"/>
1750  <iref item="s-maxage" subitem="Cache Directive" primary="true"/>
1751   s-maxage
1752  <list><t>
1753       If a response includes an s-maxage directive, then for a shared
1754       cache (but not for a private cache), the maximum age specified by
1755       this directive overrides the maximum age specified by either the
1756       max-age directive or the Expires header. The s-maxage directive
1757       also implies the semantics of the proxy-revalidate directive (see
1758       <xref target="cache.revalidation.and.reload.controls"/>), i.e., that the shared cache must not use the
1759       entry after it becomes stale to respond to a subsequent request
1760       without first revalidating it with the origin server. The s-maxage
1761       directive is always ignored by a private cache.
1762  </t></list>
1765   Note that most older caches, not compliant with this specification,
1766   do not implement any cache-control directives. An origin server
1767   wishing to use a cache-control directive that restricts, but does not
1768   prevent, caching by an HTTP/1.1-compliant cache &MAY; exploit the
1769   requirement that the max-age directive overrides the Expires header,
1770   and the fact that pre-HTTP/1.1-compliant caches do not observe the
1771   max-age directive.
1774   Other directives allow a user agent to modify the basic expiration
1775   mechanism. These directives &MAY; be specified on a request:
1778  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1779  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1780   max-age
1781  <list><t>
1782      Indicates that the client is willing to accept a response whose
1783      age is no greater than the specified time in seconds. Unless max-stale
1784      directive is also included, the client is not willing to
1785      accept a stale response.
1786  </t></list>
1789  <iref item="Cache Directives" subitem="min-fresh" primary="true"/>
1790  <iref item="min-fresh" subitem="Cache Directive" primary="true"/>
1791   min-fresh
1792  <list><t>
1793      Indicates that the client is willing to accept a response whose
1794      freshness lifetime is no less than its current age plus the
1795      specified time in seconds. That is, the client wants a response
1796      that will still be fresh for at least the specified number of
1797      seconds.
1798  </t></list>
1801  <iref item="Cache Directives" subitem="max-stale" primary="true"/>
1802  <iref item="max-stale" subitem="Cache Directive" primary="true"/>
1803   max-stale
1804  <list><t>
1805      Indicates that the client is willing to accept a response that has
1806      exceeded its expiration time. If max-stale is assigned a value,
1807      then the client is willing to accept a response that has exceeded
1808      its expiration time by no more than the specified number of
1809      seconds. If no value is assigned to max-stale, then the client is
1810      willing to accept a stale response of any age.
1811  </t></list>
1814   If a cache returns a stale response, either because of a max-stale
1815   directive on a request, or because the cache is configured to
1816   override the expiration time of a response, the cache &MUST; attach a
1817   Warning header to the stale response, using Warning 110 (Response is
1818   stale).
1821   A cache &MAY; be configured to return stale responses without
1822   validation, but only if this does not conflict with any "MUST"-level
1823   requirements concerning cache validation (e.g., a "must-revalidate"
1824   cache-control directive).
1827   If both the new request and the cached entry include "max-age"
1828   directives, then the lesser of the two values is used for determining
1829   the freshness of the cached entry for that request.
1833<section title="Cache Revalidation and Reload Controls" anchor="cache.revalidation.and.reload.controls">
1835   Sometimes a user agent might want or need to insist that a cache
1836   revalidate its cache entry with the origin server (and not just with
1837   the next cache along the path to the origin server), or to reload its
1838   cache entry from the origin server. End-to-end revalidation might be
1839   necessary if either the cache or the origin server has overestimated
1840   the expiration time of the cached response. End-to-end reload may be
1841   necessary if the cache entry has become corrupted for some reason.
1844   End-to-end revalidation may be requested either when the client does
1845   not have its own local cached copy, in which case we call it
1846   "unspecified end-to-end revalidation", or when the client does have a
1847   local cached copy, in which case we call it "specific end-to-end
1848   revalidation."
1851   The client can specify these three kinds of action using Cache-Control
1852   request directives:
1855   End-to-end reload
1856  <list><t>
1857      The request includes a "no-cache" cache-control directive or, for
1858      compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field
1859      names &MUST-NOT; be included with the no-cache directive in a
1860      request. The server &MUST-NOT; use a cached copy when responding to
1861      such a request.
1862  </t></list>
1865   Specific end-to-end revalidation
1866  <list><t>
1867      The request includes a "max-age=0" cache-control directive, which
1868      forces each cache along the path to the origin server to
1869      revalidate its own entry, if any, with the next cache or server.
1870      The initial request includes a cache-validating conditional with
1871      the client's current validator.
1872  </t></list>
1875   Unspecified end-to-end revalidation
1876  <list><t>
1877      The request includes "max-age=0" cache-control directive, which
1878      forces each cache along the path to the origin server to
1879      revalidate its own entry, if any, with the next cache or server.
1880      The initial request does not include a cache-validating
1881      conditional; the first cache along the path (if any) that holds a
1882      cache entry for this resource includes a cache-validating
1883      conditional with its current validator.
1884  </t></list>
1887  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1888  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1889   max-age
1890  <list><t>
1891      When an intermediate cache is forced, by means of a max-age=0
1892      directive, to revalidate its own cache entry, and the client has
1893      supplied its own validator in the request, the supplied validator
1894      might differ from the validator currently stored with the cache
1895      entry. In this case, the cache &MAY; use either validator in making
1896      its own request without affecting semantic transparency.
1897  </t><t>
1898      However, the choice of validator might affect performance. The
1899      best approach is for the intermediate cache to use its own
1900      validator when making its request. If the server replies with 304
1901      (Not Modified), then the cache can return its now validated copy
1902      to the client with a 200 (OK) response. If the server replies with
1903      a new entity and cache validator, however, the intermediate cache
1904      can compare the returned validator with the one provided in the
1905      client's request, using the strong comparison function. If the
1906      client's validator is equal to the origin server's, then the
1907      intermediate cache simply returns 304 (Not Modified). Otherwise,
1908      it returns the new entity with a 200 (OK) response.
1909  </t><t>
1910      If a request includes the no-cache directive, it &SHOULD-NOT;
1911      include min-fresh, max-stale, or max-age.
1912  </t></list>
1915  <iref item="Cache Directives" subitem="only-if-cached" primary="true"/>
1916  <iref item="only-if-cached" subitem="Cache Directive" primary="true"/>
1917   only-if-cached
1918  <list><t>
1919      In some cases, such as times of extremely poor network
1920      connectivity, a client may want a cache to return only those
1921      responses that it currently has stored, and not to reload or
1922      revalidate with the origin server. To do this, the client may
1923      include the only-if-cached directive in a request. If it receives
1924      this directive, a cache &SHOULD; either respond using a cached entry
1925      that is consistent with the other constraints of the request, or
1926      respond with a 504 (Gateway Timeout) status. However, if a group
1927      of caches is being operated as a unified system with good internal
1928      connectivity, such a request &MAY; be forwarded within that group of
1929      caches.
1930  </t></list>
1933  <iref item="Cache Directives" subitem="must-revalidate" primary="true"/>
1934  <iref item="must-revalidate" subitem="Cache Directive" primary="true"/>
1935   must-revalidate
1936  <list><t>
1937      Because a cache &MAY; be configured to ignore a server's specified
1938      expiration time, and because a client request &MAY; include a max-stale
1939      directive (which has a similar effect), the protocol also
1940      includes a mechanism for the origin server to require revalidation
1941      of a cache entry on any subsequent use. When the must-revalidate
1942      directive is present in a response received by a cache, that cache
1943      &MUST-NOT; use the entry after it becomes stale to respond to a
1944      subsequent request without first revalidating it with the origin
1945      server. (I.e., the cache &MUST; do an end-to-end revalidation every
1946      time, if, based solely on the origin server's Expires or max-age
1947      value, the cached response is stale.)
1948  </t><t>
1949      The must-revalidate directive is necessary to support reliable
1950      operation for certain protocol features. In all circumstances an
1951      HTTP/1.1 cache &MUST; obey the must-revalidate directive; in
1952      particular, if the cache cannot reach the origin server for any
1953      reason, it &MUST; generate a 504 (Gateway Timeout) response.
1954  </t><t>
1955      Servers &SHOULD; send the must-revalidate directive if and only if
1956      failure to revalidate a request on the entity could result in
1957      incorrect operation, such as a silently unexecuted financial
1958      transaction. Recipients &MUST-NOT; take any automated action that
1959      violates this directive, and &MUST-NOT; automatically provide an
1960      unvalidated copy of the entity if revalidation fails.
1961  </t><t>
1962      Although this is not recommended, user agents operating under
1963      severe connectivity constraints &MAY; violate this directive but, if
1964      so, &MUST; explicitly warn the user that an unvalidated response has
1965      been provided. The warning &MUST; be provided on each unvalidated
1966      access, and &SHOULD; require explicit user confirmation.
1967  </t></list>
1970  <iref item="Cache Directives" subitem="proxy-revalidate" primary="true"/>
1971  <iref item="proxy-revalidate" subitem="Cache Directive" primary="true"/>
1972   proxy-revalidate
1973  <list><t>
1974      The proxy-revalidate directive has the same meaning as the must-revalidate
1975      directive, except that it does not apply to non-shared
1976      user agent caches. It can be used on a response to an
1977      authenticated request to permit the user's cache to store and
1978      later return the response without needing to revalidate it (since
1979      it has already been authenticated once by that user), while still
1980      requiring proxies that service many users to revalidate each time
1981      (in order to make sure that each user has been authenticated).
1982      Note that such authenticated responses also need the public cache
1983      control directive in order to allow them to be cached at all.
1984  </t></list>
1988<section title="No-Transform Directive" anchor="no-transform.directive">
1990  <iref item="Cache Directives" subitem="no-transform" primary="true"/>
1991  <iref item="no-transform" subitem="Cache Directive" primary="true"/>
1992   no-transform
1993  <list><t>
1994      Implementors of intermediate caches (proxies) have found it useful
1995      to convert the media type of certain entity bodies. A non-transparent
1996      proxy might, for example, convert between image
1997      formats in order to save cache space or to reduce the amount of
1998      traffic on a slow link.
1999  </t><t>
2000      Serious operational problems occur, however, when these
2001      transformations are applied to entity bodies intended for certain
2002      kinds of applications. For example, applications for medical
2003      imaging, scientific data analysis and those using end-to-end
2004      authentication, all depend on receiving an entity body that is bit
2005      for bit identical to the original entity-body.
2006  </t><t>
2007      Therefore, if a message includes the no-transform directive, an
2008      intermediate cache or proxy &MUST-NOT; change those headers that are
2009      listed in <xref target="non-modifiable.headers"/> as being subject to the no-transform
2010      directive. This implies that the cache or proxy &MUST-NOT; change
2011      any aspect of the entity-body that is specified by these headers,
2012      including the value of the entity-body itself.
2013  </t></list>
2017<section title="Cache Control Extensions" anchor="cache.control.extensions">
2019   The Cache-Control header field can be extended through the use of one
2020   or more cache-extension tokens, each with an optional assigned value.
2021   Informational extensions (those which do not require a change in
2022   cache behavior) &MAY; be added without changing the semantics of other
2023   directives. Behavioral extensions are designed to work by acting as
2024   modifiers to the existing base of cache directives. Both the new
2025   directive and the standard directive are supplied, such that
2026   applications which do not understand the new directive will default
2027   to the behavior specified by the standard directive, and those that
2028   understand the new directive will recognize it as modifying the
2029   requirements associated with the standard directive. In this way,
2030   extensions to the cache-control directives can be made without
2031   requiring changes to the base protocol.
2034   This extension mechanism depends on an HTTP cache obeying all of the
2035   cache-control directives defined for its native HTTP-version, obeying
2036   certain extensions, and ignoring all directives that it does not
2037   understand.
2040   For example, consider a hypothetical new response directive called
2041   community which acts as a modifier to the private directive. We
2042   define this new directive to mean that, in addition to any non-shared
2043   cache, any cache which is shared only by members of the community
2044   named within its value may cache the response. An origin server
2045   wishing to allow the UCI community to use an otherwise private
2046   response in their shared cache(s) could do so by including
2048<figure><artwork type="example">
2049    Cache-Control: private, community="UCI"
2052   A cache seeing this header field will act correctly even if the cache
2053   does not understand the community cache-extension, since it will also
2054   see and understand the private directive and thus default to the safe
2055   behavior.
2058   Unrecognized cache-directives &MUST; be ignored; it is assumed that any
2059   cache-directive likely to be unrecognized by an HTTP/1.1 cache will
2060   be combined with standard directives (or the response's default
2061   cacheability) such that the cache behavior will remain minimally
2062   correct even if the cache does not understand the extension(s).
2067<section title="Expires" anchor="header.expires">
2068  <iref primary="true" item="Expires header" x:for-anchor=""/>
2069  <iref primary="true" item="Headers" subitem="Expires" x:for-anchor=""/>
2071   The Expires entity-header field gives the date/time after which the
2072   response is considered stale. A stale cache entry may not normally be
2073   returned by a cache (either a proxy cache or a user agent cache)
2074   unless it is first validated with the origin server (or with an
2075   intermediate cache that has a fresh copy of the entity). See <xref target="expiration.model"/>
2076   for further discussion of the expiration model.
2079   The presence of an Expires field does not imply that the original
2080   resource will change or cease to exist at, before, or after that
2081   time.
2084   The format is an absolute date and time as defined by HTTP-date in
2085   &full-date;; it &MUST; be sent in rfc1123-date format.
2087<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
2088  Expires = "Expires" ":" HTTP-date
2091   An example of its use is
2093<figure><artwork type="example">
2094   Expires: Thu, 01 Dec 1994 16:00:00 GMT
2097  <list><t>
2098      <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
2099      directive (see <xref target="modifications.of.the.basic.expiration.mechanism"/>), that directive overrides the
2100      Expires field.
2101  </t></list>
2104   HTTP/1.1 clients and caches &MUST; treat other invalid date formats,
2105   especially including the value "0", as in the past (i.e., "already
2106   expired").
2109   To mark a response as "already expired," an origin server sends an
2110   Expires date that is equal to the Date header value. (See the rules
2111   for expiration calculations in <xref target="expiration.calculations"/>.)
2114   To mark a response as "never expires," an origin server sends an
2115   Expires date approximately one year from the time the response is
2116   sent. HTTP/1.1 servers &SHOULD-NOT;  send Expires dates more than one
2117   year in the future.
2120   The presence of an Expires header field with a date value of some
2121   time in the future on a response that otherwise would by default be
2122   non-cacheable indicates that the response is cacheable, unless
2123   indicated otherwise by a Cache-Control header field (<xref target="header.cache-control"/>).
2127<section title="Pragma" anchor="header.pragma">
2128  <iref primary="true" item="Pragma header" x:for-anchor=""/>
2129  <iref primary="true" item="Headers" subitem="Pragma" x:for-anchor=""/>
2131   The Pragma general-header field is used to include implementation-specific
2132   directives that might apply to any recipient along the
2133   request/response chain. All pragma directives specify optional
2134   behavior from the viewpoint of the protocol; however, some systems
2135   &MAY; require that behavior be consistent with the directives.
2137<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Pragma"/><iref primary="true" item="Grammar" subitem="pragma-directive"/><iref primary="true" item="Grammar" subitem="extension-pragma"/>
2138  Pragma            = "Pragma" ":" 1#pragma-directive
2139  pragma-directive  = "no-cache" | extension-pragma
2140  extension-pragma  = token [ "=" ( token | quoted-string ) ]
2143   When the no-cache directive is present in a request message, an
2144   application &SHOULD; forward the request toward the origin server even
2145   if it has a cached copy of what is being requested. This pragma
2146   directive has the same semantics as the no-cache cache-directive (see
2147   <xref target="header.cache-control"/>) and is defined here for backward compatibility with
2148   HTTP/1.0. Clients &SHOULD; include both header fields when a no-cache
2149   request is sent to a server not known to be HTTP/1.1 compliant.
2152   Pragma directives &MUST; be passed through by a proxy or gateway
2153   application, regardless of their significance to that application,
2154   since the directives might be applicable to all recipients along the
2155   request/response chain. It is not possible to specify a pragma for a
2156   specific recipient; however, any pragma directive not relevant to a
2157   recipient &SHOULD; be ignored by that recipient.
2160   HTTP/1.1 caches &SHOULD; treat "Pragma: no-cache" as if the client had
2161   sent "Cache-Control: no-cache". No new Pragma directives will be
2162   defined in HTTP.
2163  <list><t>
2164      <x:h>Note:</x:h> because the meaning of "Pragma: no-cache" as a
2165      response-header field is not actually specified, it does not provide a
2166      reliable replacement for "Cache-Control: no-cache" in a response.
2167  </t></list>
2171<section title="Vary" anchor="header.vary">
2172  <iref primary="true" item="Vary header" x:for-anchor=""/>
2173  <iref primary="true" item="Headers" subitem="Vary" x:for-anchor=""/>
2175   The Vary field value indicates the set of request-header fields that
2176   fully determines, while the response is fresh, whether a cache is
2177   permitted to use the response to reply to a subsequent request
2178   without revalidation. For uncacheable or stale responses, the Vary
2179   field value advises the user agent about the criteria that were used
2180   to select the representation. A Vary field value of "*" implies that
2181   a cache cannot determine from the request headers of a subsequent
2182   request whether this response is the appropriate representation. See
2183   <xref target="caching.negotiated.responses"/> for use of the Vary header field by caches.
2185<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/>
2186  Vary  = "Vary" ":" ( "*" | 1#field-name )
2189   An HTTP/1.1 server &SHOULD; include a Vary header field with any
2190   cacheable response that is subject to server-driven negotiation.
2191   Doing so allows a cache to properly interpret future requests on that
2192   resource and informs the user agent about the presence of negotiation
2193   on that resource. A server &MAY; include a Vary header field with a
2194   non-cacheable response that is subject to server-driven negotiation,
2195   since this might provide the user agent with useful information about
2196   the dimensions over which the response varies at the time of the
2197   response.
2200   A Vary field value consisting of a list of field-names signals that
2201   the representation selected for the response is based on a selection
2202   algorithm which considers ONLY the listed request-header field values
2203   in selecting the most appropriate representation. A cache &MAY; assume
2204   that the same selection will be made for future requests with the
2205   same values for the listed field names, for the duration of time for
2206   which the response is fresh.
2209   The field-names given are not limited to the set of standard
2210   request-header fields defined by this specification. Field names are
2211   case-insensitive.
2214   A Vary field value of "*" signals that unspecified parameters not
2215   limited to the request-headers (e.g., the network address of the
2216   client), play a role in the selection of the response representation.
2217   The "*" value &MUST-NOT; be generated by a proxy server; it may only be
2218   generated by an origin server.
2222<section title="Warning" anchor="header.warning">
2223  <iref primary="true" item="Warning header" x:for-anchor=""/>
2224  <iref primary="true" item="Headers" subitem="Warning" x:for-anchor=""/>
2226   The Warning general-header field is used to carry additional
2227   information about the status or transformation of a message which
2228   might not be reflected in the message. This information is typically
2229   used to warn about a possible lack of semantic transparency from
2230   caching operations or transformations applied to the entity body of
2231   the message.
2234   Warning headers are sent with responses using:
2236<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Warning"/><iref primary="true" item="Grammar" subitem="warning-value"/><iref primary="true" item="Grammar" subitem="warn-code"/><iref primary="true" item="Grammar" subitem="warn-agent"/><iref primary="true" item="Grammar" subitem="warn-text"/><iref primary="true" item="Grammar" subitem="warn-date"/>
2237  Warning    = "Warning" ":" 1#warning-value
2239  warning-value = warn-code SP warn-agent SP warn-text
2240                                        [SP warn-date]
2242  warn-code  = 3DIGIT
2243  warn-agent = ( uri-host [ ":" port ] ) | pseudonym
2244                  ; the name or pseudonym of the server adding
2245                  ; the Warning header, for use in debugging
2246  warn-text  = quoted-string
2247  warn-date  = DQUOTE HTTP-date DQUOTE
2250   A response &MAY; carry more than one Warning header.
2253   The warn-text &SHOULD; be in a natural language and character set that
2254   is most likely to be intelligible to the human user receiving the
2255   response. This decision &MAY; be based on any available knowledge, such
2256   as the location of the cache or user, the Accept-Language field in a
2257   request, the Content-Language field in a response, etc. The default
2258   language is English and the default character set is ISO-8859-1 (<xref target="ISO-8859-1"/>).
2261   If a character set other than ISO-8859-1 is used, it &MUST; be encoded
2262   in the warn-text using the method described in <xref target="RFC2047"/>.
2265   Warning headers can in general be applied to any message, however
2266   some specific warn-codes are specific to caches and can only be
2267   applied to response messages. New Warning headers &SHOULD; be added
2268   after any existing Warning headers. A cache &MUST-NOT; delete any
2269   Warning header that it received with a message. However, if a cache
2270   successfully validates a cache entry, it &SHOULD; remove any Warning
2271   headers previously attached to that entry except as specified for
2272   specific Warning codes. It &MUST; then add any Warning headers received
2273   in the validating response. In other words, Warning headers are those
2274   that would be attached to the most recent relevant response.
2277   When multiple Warning headers are attached to a response, the user
2278   agent ought to inform the user of as many of them as possible, in the
2279   order that they appear in the response. If it is not possible to
2280   inform the user of all of the warnings, the user agent &SHOULD; follow
2281   these heuristics:
2282  <list style="symbols">
2283    <t>Warnings that appear early in the response take priority over
2284        those appearing later in the response.</t>
2286    <t>Warnings in the user's preferred character set take priority
2287        over warnings in other character sets but with identical warn-codes
2288        and warn-agents.</t>
2289  </list>
2292   Systems that generate multiple Warning headers &SHOULD; order them with
2293   this user agent behavior in mind.
2296   Requirements for the behavior of caches with respect to Warnings are
2297   stated in <xref target="warnings"/>.
2300   This is a list of the currently-defined warn-codes, each with a
2301   recommended warn-text in English, and a description of its meaning.
2304   110 Response is stale
2305  <list><t>
2306     &MUST; be included whenever the returned response is stale.
2307  </t></list>
2310   111 Revalidation failed
2311  <list><t>
2312     &MUST; be included if a cache returns a stale response because an
2313     attempt to revalidate the response failed, due to an inability to
2314     reach the server.
2315  </t></list>
2318   112 Disconnected operation
2319  <list><t>
2320     &SHOULD; be included if the cache is intentionally disconnected from
2321     the rest of the network for a period of time.
2322  </t></list>
2325   113 Heuristic expiration
2326  <list><t>
2327     &MUST; be included if the cache heuristically chose a freshness
2328     lifetime greater than 24 hours and the response's age is greater
2329     than 24 hours.
2330  </t></list>
2333   199 Miscellaneous warning
2334  <list><t>
2335     The warning text &MAY; include arbitrary information to be presented
2336     to a human user, or logged. A system receiving this warning &MUST-NOT;
2337     take any automated action, besides presenting the warning to
2338     the user.
2339  </t></list>
2342   214 Transformation applied
2343  <list><t>
2344     &MUST; be added by an intermediate cache or proxy if it applies any
2345     transformation changing the content-coding (as specified in the
2346     Content-Encoding header) or media-type (as specified in the
2347     Content-Type header) of the response, or the entity-body of the
2348     response, unless this Warning code already appears in the response.
2349  </t></list>
2352   299 Miscellaneous persistent warning
2353  <list><t>
2354     The warning text &MAY; include arbitrary information to be presented
2355     to a human user, or logged. A system receiving this warning &MUST-NOT;
2356     take any automated action.
2357  </t></list>
2360   If an implementation sends a message with one or more Warning headers
2361   whose version is HTTP/1.0 or lower, then the sender &MUST; include in
2362   each warning-value a warn-date that matches the date in the response.
2365   If an implementation receives a message with a warning-value that
2366   includes a warn-date, and that warn-date is different from the Date
2367   value in the response, then that warning-value &MUST; be deleted from
2368   the message before storing, forwarding, or using it. (This prevents
2369   bad consequences of naive caching of Warning header fields.) If all
2370   of the warning-values are deleted for this reason, the Warning header
2371   &MUST; be deleted as well.
2377<section title="IANA Considerations" anchor="IANA.considerations">
2379   <cref>TBD.</cref>
2383<section title="Security Considerations" anchor="security.considerations">
2385   Caching proxies provide additional potential vulnerabilities, since
2386   the contents of the cache represent an attractive target for
2387   malicious exploitation. Because cache contents persist after an HTTP
2388   request is complete, an attack on the cache can reveal information
2389   long after a user believes that the information has been removed from
2390   the network. Therefore, cache contents should be protected as
2391   sensitive information.
2395<section title="Acknowledgments" anchor="ack">
2397   Much of the content and presentation of the caching design is due to
2398   suggestions and comments from individuals including: Shel Kaphan,
2399   Paul Leach, Koen Holtman, David Morris, and Larry Masinter.
2405<references title="Normative References">
2407<reference anchor="ISO-8859-1">
2408  <front>
2409    <title>
2410     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
2411    </title>
2412    <author>
2413      <organization>International Organization for Standardization</organization>
2414    </author>
2415    <date year="1998"/>
2416  </front>
2417  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
2420<reference anchor="Part1">
2421  <front>
2422    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2423    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2424      <organization abbrev="Day Software">Day Software</organization>
2425      <address><email></email></address>
2426    </author>
2427    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2428      <organization>One Laptop per Child</organization>
2429      <address><email></email></address>
2430    </author>
2431    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2432      <organization abbrev="HP">Hewlett-Packard Company</organization>
2433      <address><email></email></address>
2434    </author>
2435    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2436      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2437      <address><email></email></address>
2438    </author>
2439    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2440      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2441      <address><email></email></address>
2442    </author>
2443    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2444      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2445      <address><email></email></address>
2446    </author>
2447    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2448      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2449      <address><email></email></address>
2450    </author>
2451    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2452      <organization abbrev="W3C">World Wide Web Consortium</organization>
2453      <address><email></email></address>
2454    </author>
2455    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2456      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2457      <address><email></email></address>
2458    </author>
2459    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2460  </front>
2461  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
2462  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
2465<reference anchor="Part2">
2466  <front>
2467    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2468    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2469      <organization abbrev="Day Software">Day Software</organization>
2470      <address><email></email></address>
2471    </author>
2472    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2473      <organization>One Laptop per Child</organization>
2474      <address><email></email></address>
2475    </author>
2476    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2477      <organization abbrev="HP">Hewlett-Packard Company</organization>
2478      <address><email></email></address>
2479    </author>
2480    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2481      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2482      <address><email></email></address>
2483    </author>
2484    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2485      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2486      <address><email></email></address>
2487    </author>
2488    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2489      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2490      <address><email></email></address>
2491    </author>
2492    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2493      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2494      <address><email></email></address>
2495    </author>
2496    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2497      <organization abbrev="W3C">World Wide Web Consortium</organization>
2498      <address><email></email></address>
2499    </author>
2500    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2501      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2502      <address><email></email></address>
2503    </author>
2504    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2505  </front>
2506  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
2507  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
2510<reference anchor="Part3">
2511  <front>
2512    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2513    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2514      <organization abbrev="Day Software">Day Software</organization>
2515      <address><email></email></address>
2516    </author>
2517    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2518      <organization>One Laptop per Child</organization>
2519      <address><email></email></address>
2520    </author>
2521    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2522      <organization abbrev="HP">Hewlett-Packard Company</organization>
2523      <address><email></email></address>
2524    </author>
2525    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2526      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2527      <address><email></email></address>
2528    </author>
2529    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2530      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2531      <address><email></email></address>
2532    </author>
2533    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2534      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2535      <address><email></email></address>
2536    </author>
2537    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2538      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2539      <address><email></email></address>
2540    </author>
2541    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2542      <organization abbrev="W3C">World Wide Web Consortium</organization>
2543      <address><email></email></address>
2544    </author>
2545    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2546      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2547      <address><email></email></address>
2548    </author>
2549    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2550  </front>
2551  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
2552  <x:source href="p3-payload.xml" basename="p3-payload"/>
2555<reference anchor="Part4">
2556  <front>
2557    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2558    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2559      <organization abbrev="Day Software">Day Software</organization>
2560      <address><email></email></address>
2561    </author>
2562    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2563      <organization>One Laptop per Child</organization>
2564      <address><email></email></address>
2565    </author>
2566    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2567      <organization abbrev="HP">Hewlett-Packard Company</organization>
2568      <address><email></email></address>
2569    </author>
2570    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2571      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2572      <address><email></email></address>
2573    </author>
2574    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2575      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2576      <address><email></email></address>
2577    </author>
2578    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2579      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2580      <address><email></email></address>
2581    </author>
2582    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2583      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2584      <address><email></email></address>
2585    </author>
2586    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2587      <organization abbrev="W3C">World Wide Web Consortium</organization>
2588      <address><email></email></address>
2589    </author>
2590    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2591      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2592      <address><email></email></address>
2593    </author>
2594    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2595  </front>
2596  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
2597  <x:source href="p4-conditional.xml" basename="p4-conditional"/>
2600<reference anchor="Part5">
2601  <front>
2602    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2603    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2604      <organization abbrev="Day Software">Day Software</organization>
2605      <address><email></email></address>
2606    </author>
2607    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2608      <organization>One Laptop per Child</organization>
2609      <address><email></email></address>
2610    </author>
2611    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2612      <organization abbrev="HP">Hewlett-Packard Company</organization>
2613      <address><email></email></address>
2614    </author>
2615    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2616      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2617      <address><email></email></address>
2618    </author>
2619    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2620      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2621      <address><email></email></address>
2622    </author>
2623    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2624      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2625      <address><email></email></address>
2626    </author>
2627    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2628      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2629      <address><email></email></address>
2630    </author>
2631    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2632      <organization abbrev="W3C">World Wide Web Consortium</organization>
2633      <address><email></email></address>
2634    </author>
2635    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2636      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2637      <address><email></email></address>
2638    </author>
2639    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2640  </front>
2641  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
2642  <x:source href="p5-range.xml" basename="p5-range"/>
2645<reference anchor="Part7">
2646  <front>
2647    <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2648    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2649      <organization abbrev="Day Software">Day Software</organization>
2650      <address><email></email></address>
2651    </author>
2652    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2653      <organization>One Laptop per Child</organization>
2654      <address><email></email></address>
2655    </author>
2656    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2657      <organization abbrev="HP">Hewlett-Packard Company</organization>
2658      <address><email></email></address>
2659    </author>
2660    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2661      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2662      <address><email></email></address>
2663    </author>
2664    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2665      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2666      <address><email></email></address>
2667    </author>
2668    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2669      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2670      <address><email></email></address>
2671    </author>
2672    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2673      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2674      <address><email></email></address>
2675    </author>
2676    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2677      <organization abbrev="W3C">World Wide Web Consortium</organization>
2678      <address><email></email></address>
2679    </author>
2680    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2681      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2682      <address><email></email></address>
2683    </author>
2684    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2685  </front>
2686  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;"/>
2687  <x:source href="p7-auth.xml" basename="p7-auth"/>
2690<reference anchor="RFC2047">
2691  <front>
2692    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
2693    <author initials="K." surname="Moore" fullname="Keith Moore">
2694      <organization>University of Tennessee</organization>
2695      <address><email></email></address>
2696    </author>
2697    <date month="November" year="1996"/>
2698  </front>
2699  <seriesInfo name="RFC" value="2047"/>
2702<reference anchor="RFC2119">
2703  <front>
2704    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2705    <author initials="S." surname="Bradner" fullname="Scott Bradner">
2706      <organization>Harvard University</organization>
2707      <address><email></email></address>
2708    </author>
2709    <date month="March" year="1997"/>
2710  </front>
2711  <seriesInfo name="BCP" value="14"/>
2712  <seriesInfo name="RFC" value="2119"/>
2717<references title="Informative References">
2719<reference anchor="RFC1305">
2720  <front>
2721    <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2722    <author initials="D." surname="Mills" fullname="David L. Mills">
2723      <organization>University of Delaware, Electrical Engineering Department</organization>
2724      <address><email></email></address>
2725    </author>
2726    <date month="March" year="1992"/>
2727  </front>
2728  <seriesInfo name="RFC" value="1305"/>
2731<reference anchor="RFC2616">
2732  <front>
2733    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2734    <author initials="R." surname="Fielding" fullname="R. Fielding">
2735      <organization>University of California, Irvine</organization>
2736      <address><email></email></address>
2737    </author>
2738    <author initials="J." surname="Gettys" fullname="J. Gettys">
2739      <organization>W3C</organization>
2740      <address><email></email></address>
2741    </author>
2742    <author initials="J." surname="Mogul" fullname="J. Mogul">
2743      <organization>Compaq Computer Corporation</organization>
2744      <address><email></email></address>
2745    </author>
2746    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2747      <organization>MIT Laboratory for Computer Science</organization>
2748      <address><email></email></address>
2749    </author>
2750    <author initials="L." surname="Masinter" fullname="L. Masinter">
2751      <organization>Xerox Corporation</organization>
2752      <address><email></email></address>
2753    </author>
2754    <author initials="P." surname="Leach" fullname="P. Leach">
2755      <organization>Microsoft Corporation</organization>
2756      <address><email></email></address>
2757    </author>
2758    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2759      <organization>W3C</organization>
2760      <address><email></email></address>
2761    </author>
2762    <date month="June" year="1999"/>
2763  </front>
2764  <seriesInfo name="RFC" value="2616"/>
2769<section title="Compatibility with Previous Versions" anchor="compatibility">
2771<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2773   A case was missed in the Cache-Control model of HTTP/1.1; s-maxage
2774   was introduced to add this missing case. (Sections <xref target="response.cacheability" format="counter"/>,
2775   <xref target="header.cache-control" format="counter"/>,
2776   <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>)
2779   Transfer-coding and message lengths all interact in ways that
2780   required fixing exactly when chunked encoding is used (to allow for
2781   transfer encoding that may not be self delimiting); it was important
2782   to straighten out exactly how message lengths are computed.
2783   (<xref target="non-modifiable.headers"/>,
2784   see also <xref target="Part1"/>, <xref target="Part3"/> and <xref target="Part5"/>)
2787   Proxies should be able to add Content-Length when appropriate.
2788   (<xref target="non-modifiable.headers"/>)
2791   Range request responses would become very verbose if all meta-data
2792   were always returned; by allowing the server to only send needed
2793   headers in a 206 response, this problem can be avoided.
2794   (<xref target="combining.headers"/>)
2797   The Cache-Control: max-age directive was not properly defined for
2798   responses. (<xref target="modifications.of.the.basic.expiration.mechanism"/>)
2801   Warnings could be cached incorrectly, or not updated appropriately.
2802   (Section <xref target="warnings" format="counter"/>, <xref target="expiration.calculations" format="counter"/>, <xref target="non-modifiable.headers" format="counter"/>,
2803   <xref target="combining.headers" format="counter"/>, <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>,
2804   and <xref target="header.warning" format="counter"/>) Warning
2805   also needed to be a general header, as PUT or other methods may have
2806   need for it in requests.
2810<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
2812  Clarify denial of service attack avoidance requirement.
2813  (<xref target="invalidation.after.updates.or.deletions"/>)
2819<section title="Change Log (to be removed by RFC Editor before publication)">
2821<section title="Since RFC2616">
2823  Extracted relevant partitions from <xref target="RFC2616"/>.
2827<section title="Since draft-ietf-httpbis-p6-cache-00">
2829  Closed issues:
2830  <list style="symbols">
2831    <t>
2832      <eref target=""/>:
2833      "Trailer"
2834      (<eref target=""/>)
2835    </t>
2836    <t>
2837      <eref target=""/>:
2838      "Invalidation after Update or Delete"
2839      (<eref target=""/>)
2840    </t>
2841    <t>
2842      <eref target=""/>:
2843      "Normative and Informative references"
2844    </t>
2845    <t>
2846      <eref target=""/>:
2847      "Date reference typo"
2848    </t>
2849    <t>
2850      <eref target=""/>:
2851      "Connection header text"
2852    </t>
2853    <t>
2854      <eref target=""/>:
2855      "Informative references"
2856    </t>
2857    <t>
2858      <eref target=""/>:
2859      "ISO-8859-1 Reference"
2860    </t>
2861    <t>
2862      <eref target=""/>:
2863      "Normative up-to-date references"
2864    </t>
2865    <t>
2866      <eref target=""/>:
2867      "typo in 13.2.2"
2868    </t>
2869  </list>
2872  Other changes:
2873  <list style="symbols">
2874    <t>
2875      Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref target=""/>)
2876    </t>
2877  </list>
2881<section title="Since draft-ietf-httpbis-p6-cache-01">
2883  Closed issues:
2884  <list style="symbols">
2885    <t>
2886      <eref target=""/>:
2887      "rel_path not used"
2888    </t>
2889  </list>
2892  Ongoing work on ABNF conversion (<eref target=""/>):
2893  <list style="symbols">
2894    <t>
2895      Get rid of duplicate BNF rule names ("host" -> "uri-host").
2896    </t>
2897    <t>
2898      Add explicit references to BNF syntax and rules imported from other parts of the specification.
2899    </t>
2900    <t>
2901      Move definition of "delta-seconds" into Part1 as a common BNF element.
2902    </t>
2903  </list>
Note: See TracBrowser for help on using the repository browser.