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

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


  • Property svn:eol-style set to native
File size: 127.6 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 messaging                   "<xref target='Part1' xmlns:x=''/>">
18  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x=''/>">
19  <!ENTITY entity-length               "<xref target='Part3' x:rel='#entity.length' xmlns:x=''/>">
20  <!ENTITY entity-header-fields        "<xref target='Part4' x:rel='#header.fields' xmlns:x=''/>">
21  <!ENTITY entity-tags                 "<xref target='Part4' x:rel='#entity.tags' xmlns:x=''/>">
22  <!ENTITY full-date                   "<xref target='Part1' x:rel='' xmlns:x=''/>">
23  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x=''/>">
24  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x=''/>">
25  <!ENTITY header-date                 "<xref target='Part1' x:rel='' xmlns:x=''/>">
26  <!ENTITY weak-and-strong-validators  "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
27  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x=''/>">
28  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
29  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
30  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x=''/>">
32<?rfc toc="yes" ?>
33<?rfc symrefs="yes" ?>
34<?rfc sortrefs="yes" ?>
35<?rfc compact="yes"?>
36<?rfc subcompact="no" ?>
37<?rfc linkmailto="no" ?>
38<?rfc editing="no" ?>
39<?rfc-ext allow-markup-in-artwork="yes" ?>
40<?rfc-ext include-references-in-index="yes" ?>
41<rfc obsoletes="2616" category="std"
42     ipr="full3978" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;"
43     xmlns:x=''>
46  <title abbrev="HTTP/1.1, Part 6">HTTP/1.1, part 6: Caching</title>
48  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
49    <organization abbrev="Day Software">Day Software</organization>
50    <address>
51      <postal>
52        <street>23 Corporate Plaza DR, Suite 280</street>
53        <city>Newport Beach</city>
54        <region>CA</region>
55        <code>92660</code>
56        <country>USA</country>
57      </postal>
58      <phone>+1-949-706-5300</phone>
59      <facsimile>+1-949-706-5305</facsimile>
60      <email></email>
61      <uri></uri>
62    </address>
63  </author>
65  <author initials="J." surname="Gettys" fullname="Jim Gettys">
66    <organization>One Laptop per Child</organization>
67    <address>
68      <postal>
69        <street>21 Oak Knoll Road</street>
70        <city>Carlisle</city>
71        <region>MA</region>
72        <code>01741</code>
73        <country>USA</country>
74      </postal>
75      <email></email>
76      <uri></uri>
77    </address>
78  </author>
80  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
81    <organization abbrev="HP">Hewlett-Packard Company</organization>
82    <address>
83      <postal>
84        <street>HP Labs, Large Scale Systems Group</street>
85        <street>1501 Page Mill Road, MS 1177</street>
86        <city>Palo Alto</city>
87        <region>CA</region>
88        <code>94304</code>
89        <country>USA</country>
90      </postal>
91      <email></email>
92    </address>
93  </author>
95  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
96    <organization abbrev="Microsoft">Microsoft Corporation</organization>
97    <address>
98      <postal>
99        <street>1 Microsoft Way</street>
100        <city>Redmond</city>
101        <region>WA</region>
102        <code>98052</code>
103        <country>USA</country>
104      </postal>
105      <email></email>
106    </address>
107  </author>
109  <author initials="L." surname="Masinter" fullname="Larry Masinter">
110    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
111    <address>
112      <postal>
113        <street>345 Park Ave</street>
114        <city>San Jose</city>
115        <region>CA</region>
116        <code>95110</code>
117        <country>USA</country>
118      </postal>
119      <email></email>
120      <uri></uri>
121    </address>
122  </author>
124  <author initials="P." surname="Leach" fullname="Paul J. Leach">
125    <organization abbrev="Microsoft">Microsoft Corporation</organization>
126    <address>
127      <postal>
128        <street>1 Microsoft Way</street>
129        <city>Redmond</city>
130        <region>WA</region>
131        <code>98052</code>
132      </postal>
133      <email></email>
134    </address>
135  </author>
137  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
138    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
139    <address>
140      <postal>
141        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
142        <street>The Stata Center, Building 32</street>
143        <street>32 Vassar Street</street>
144        <city>Cambridge</city>
145        <region>MA</region>
146        <code>02139</code>
147        <country>USA</country>
148      </postal>
149      <email></email>
150      <uri></uri>
151    </address>
152  </author>
154  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
155    <organization abbrev="W3C">World Wide Web Consortium</organization>
156    <address>
157      <postal>
158        <street>W3C / ERCIM</street>
159        <street>2004, rte des Lucioles</street>
160        <city>Sophia-Antipolis</city>
161        <region>AM</region>
162        <code>06902</code>
163        <country>France</country>
164      </postal>
165      <email></email>
166      <uri></uri>
167    </address>
168  </author>
170  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
171    <organization abbrev="greenbytes">greenbytes GmbH</organization>
172    <address>
173      <postal>
174        <street>Hafenweg 16</street>
175        <city>Muenster</city><region>NW</region><code>48155</code>
176        <country>Germany</country>
177      </postal>
178      <phone>+49 251 2807760</phone>   
179      <facsimile>+49 251 2807761</facsimile>   
180      <email></email>       
181      <uri></uri>     
182    </address>
183  </author>
185  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
189   The Hypertext Transfer Protocol (HTTP) is an application-level
190   protocol for distributed, collaborative, hypermedia information
191   systems. HTTP has been in use by the World Wide Web global information
192   initiative since 1990. This document is Part 6 of the seven-part specification
193   that defines the protocol referred to as "HTTP/1.1" and, taken together,
194   obsoletes RFC 2616.  Part 6 defines requirements on HTTP caches
195   and the associated header fields that control cache behavior or indicate
196   cacheable response messages.
200<note title="Editorial Note (To be removed by RFC Editor)">
201  <t>
202    Discussion of this draft should take place on the HTTPBIS working group
203    mailing list ( The current issues list is
204    at <eref target=""/>
205    and related documents (including fancy diffs) can be found at
206    <eref target=""/>.
207  </t>
208  <t>
209    This draft incorporates those issue resolutions that were either
210    collected in the original RFC2616 errata list (<eref target=""/>),
211    or which were agreed upon on the mailing list between October 2006 and
212    November 2007 (as published in "draft-lafon-rfc2616bis-03").
213  </t>
217<section title="Introduction" anchor="caching">
219   HTTP is typically used for distributed information systems, where
220   performance can be improved by the use of response caches, and includes
221   a number of elements intended to make caching work as well as possible.
222   Because these elements interact with each other, it is useful to describe
223   the caching design of HTTP separately.  This document defines aspects of
224   HTTP/1.1 related to caching and reusing response messages.
227<section title="Purpose" anchor="intro.purpose">
228<iref item="cache"/>
230   An HTTP <x:dfn>cache</x:dfn> is a local store of response messages
231   and the subsystem that controls its message storage, retrieval, and
232   deletion. A cache stores cacheable responses in order to reduce the
233   response time and network bandwidth consumption on future, equivalent
234   requests. Any client or server may include a cache, though a cache
235   cannot be used by a server that is acting as a tunnel.
238   Caching would be useless if it did not significantly improve
239   performance. The goal of caching in HTTP/1.1 is to reuse a prior response
240   message to satisfy a current request.  In some cases, the existing response
241   can be reused without the need for a network request, reducing latency and
242   network round-trips; we use an "expiration" mechanism for this purpose
243   (see <xref target="expiration.model"/>).  Even when a new request is required,
244   it is often possible to reuse all or parts of the payload of a prior response
245   to satisfy the request, thereby reducing network bandwidth usage; we use a
246   "validation" mechanism for this purpose (see <xref target="validation.model"/>).
248<iref item="semantically transparent"/>
250   A cache behaves in a "<x:dfn>semantically transparent</x:dfn>" manner, with
251   respect to a particular response, when its use affects neither the
252   requesting client nor the origin server, except to improve
253   performance. When a cache is semantically transparent, the client
254   receives exactly the same response status and payload
255   that it would have received had its request been handled directly
256   by the origin server.
259   In an ideal world, all interactions with an HTTP cache would be
260   semantically transparent.  However, for some resources, semantic
261   transparency is not always necessary and can be effectively traded
262   for the sake of bandwidth scaling, disconnected operation, and
263   high availability.  HTTP/1.1 allows origin servers, caches,
264   and clients to explicitly reduce transparency when necessary.
265   However, because non-transparent operation may confuse non-expert
266   users and might be incompatible with certain server applications
267   (such as those for ordering merchandise), the protocol requires that
268   transparency be relaxed
269  <list style="symbols">
270     <t>only by an explicit protocol-level request when relaxed by
271        client or origin server</t>
273     <t>only with an explicit warning to the end user when relaxed by
274        cache or client</t>
275  </list>
278   Therefore, HTTP/1.1 provides these important elements:
279  <list style="numbers">
280      <t>Protocol features that provide full semantic transparency when
281         this is required by all parties.</t>
283      <t>Protocol features that allow an origin server or user agent to
284         explicitly request and control non-transparent operation.</t>
286      <t>Protocol features that allow a cache to attach warnings to
287         responses that do not preserve the requested approximation of
288         semantic transparency.</t>
289  </list>
292   A basic principle is that it must be possible for the clients to
293   detect any potential relaxation of semantic transparency.
294  <list><t>
295      <x:h>Note:</x:h> The server, cache, or client implementor might be faced with
296      design decisions not explicitly discussed in this specification.
297      If a decision might affect semantic transparency, the implementor
298      ought to err on the side of maintaining transparency unless a
299      careful and complete analysis shows significant benefits in
300      breaking transparency.
301    </t></list>
305<section title="Terminology" anchor="intro.terminology">
307   This specification uses a number of terms to refer to the roles
308   played by participants in, and objects of, HTTP caching.
311  <iref item="cacheable"/>
312  <x:dfn>cacheable</x:dfn>
313  <list>
314    <t>
315      A response is cacheable if a cache is allowed to store a copy of
316      the response message for use in answering subsequent requests.
317      Even when a response is cacheable, there may
318      be additional constraints on whether a cache can use the cached
319      copy for a particular request.
320    </t>
321  </list>
324  <iref item="first-hand"/>
325  <x:dfn>first-hand</x:dfn>
326  <list>
327    <t>
328      A response is first-hand if it comes directly and without
329      unnecessary delay from the origin server, perhaps via one or more
330      proxies. A response is also first-hand if its validity has just
331      been checked directly with the origin server.
332    </t>
333  </list>
336  <iref item="explicit expiration time"/>
337  <x:dfn>explicit expiration time</x:dfn>
338  <list>
339    <t>
340      The time at which the origin server intends that an entity should
341      no longer be returned by a cache without further validation.
342    </t>
343  </list>
346  <iref item="heuristic expiration time"/>
347  <x:dfn>heuristic expiration time</x:dfn>
348  <list>
349    <t>
350      An expiration time assigned by a cache when no explicit expiration
351      time is available.
352    </t>
353  </list>
356  <iref item="age"/>
357  <x:dfn>age</x:dfn>
358  <list>
359    <t>
360      The age of a response is the time since it was sent by, or
361      successfully validated with, the origin server.
362    </t>
363  </list>
366  <iref item="freshness lifetime"/>
367  <x:dfn>freshness lifetime</x:dfn>
368  <list>
369    <t>
370      The length of time between the generation of a response and its
371      expiration time.
372    </t>
373  </list>
376  <iref item="fresh"/>
377  <x:dfn>fresh</x:dfn>
378  <list>
379    <t>
380      A response is fresh if its age has not yet exceeded its freshness
381      lifetime.
382    </t>
383  </list>
386  <iref item="stale"/>
387  <x:dfn>stale</x:dfn>
388  <list>
389    <t>
390      A response is stale if its age has passed its freshness lifetime.
391    </t>
392  </list>
395  <iref item="validator"/>
396  <x:dfn>validator</x:dfn>
397  <list>
398    <t>
399      A protocol element (e.g., an entity tag or a Last-Modified time)
400      that is used to find out whether a cache entry is an equivalent
401      copy of an entity.
402    </t>
403  </list>
407<section title="Requirements" anchor="intro.requirements">
409   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
410   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
411   document are to be interpreted as described in <xref target="RFC2119"/>.
414   An implementation is not compliant if it fails to satisfy one or more
415   of the &MUST; or &REQUIRED; level requirements for the protocols it
416   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
417   level and all the &SHOULD; level requirements for its protocols is said
418   to be "unconditionally compliant"; one that satisfies all the &MUST;
419   level requirements but not all the &SHOULD; level requirements for its
420   protocols is said to be "conditionally compliant."
425<section title="Overview" anchor="caching.overview">
426<section title="Cache Correctness" anchor="cache.correctness">
428   A correct cache &MUST; respond to a request with the most up-to-date
429   response held by the cache that is appropriate to the request (see
430   Sections <xref target="disambiguating.expiration.values" format="counter"/>,
431   <xref target="disambiguating.multiple.responses" format="counter"/>,
432   and <xref target="cache.replacement" format="counter"/>) which meets one of the following
433   conditions:
434  <list style="numbers">
435      <t>It has been checked for equivalence with what the origin server
436         would have returned by revalidating the response with the
437         origin server (<xref target="validation.model"/>);</t>
439      <t>It is "fresh enough" (see <xref target="expiration.model"/>). In the default case,
440         this means it meets the least restrictive freshness requirement
441         of the client, origin server, and cache (see <xref target="header.cache-control"/>); if
442         the origin server so specifies, it is the freshness requirement
443         of the origin server alone.
445         If a stored response is not "fresh enough" by the most
446         restrictive freshness requirement of both the client and the
447         origin server, in carefully considered circumstances the cache
448         &MAY; still return the response with the appropriate Warning
449         header (see Sections <xref target="" format="counter"/>
450         and <xref target="header.warning" format="counter"/>), unless such a response
451         is prohibited (e.g., by a "no-store" cache-directive, or by a
452         "no-cache" cache-request-directive; see <xref target="header.cache-control"/>).</t>
454      <t>It is an appropriate 304 (Not Modified), 305 (Use Proxy),
455         or error (4xx or 5xx) response message.</t>
456  </list>
459   If the cache can not communicate with the origin server, then a
460   correct cache &SHOULD; respond as above if the response can be
461   correctly served from the cache; if not it &MUST; return an error or
462   warning indicating that there was a communication failure.
465   If a cache receives a response (either an entire response, or a 304
466   (Not Modified) response) that it would normally forward to the
467   requesting client, and the received response is no longer fresh, the
468   cache &SHOULD; forward it to the requesting client without adding a new
469   Warning (but without removing any existing Warning headers). A cache
470   &SHOULD-NOT;  attempt to revalidate a response simply because that
471   response became stale in transit; this might lead to an infinite
472   loop. A user agent that receives a stale response without a Warning
473   &MAY; display a warning indication to the user.
477<section title="Warnings" anchor="warnings">
479   Whenever a cache returns a response that is neither first-hand nor
480   "fresh enough" (in the sense of condition 2 in <xref target="cache.correctness"/>), it
481   &MUST; attach a warning to that effect, using a Warning general-header.
482   The Warning header and the currently defined warnings are described
483   in <xref target="header.warning"/>. The warning allows clients to take appropriate
484   action.
487   Warnings &MAY; be used for other purposes, both cache-related and
488   otherwise. The use of a warning, rather than an error status code,
489   distinguish these responses from true failures.
492   Warnings are assigned three digit warn-codes. The first digit
493   indicates whether the Warning &MUST; or &MUST-NOT; be deleted from a
494   stored cache entry after a successful revalidation:
497  <list style="hanging">
498    <t hangText="1xx">Warnings that describe the freshness or revalidation status of
499     the response, and so &MUST; be deleted after a successful
500     revalidation. 1xx warn-codes &MAY; be generated by a cache only when
501     validating a cached entry. It &MUST-NOT; be generated by clients.</t>
503    <t hangText="2xx">Warnings that describe some aspect of the entity body or entity
504     headers that is not rectified by a revalidation (for example, a
505     lossy compression of the entity bodies) and which &MUST-NOT; be
506     deleted after a successful revalidation.</t>
507    </list>
510   See <xref target="header.warning"/> for the definitions of the codes themselves.
513   HTTP/1.0 caches will cache all Warnings in responses, without
514   deleting the ones in the first category. Warnings in responses that
515   are passed to HTTP/1.0 caches carry an extra warning-date field,
516   which prevents a future HTTP/1.1 recipient from believing an
517   erroneously cached Warning.
520   Warnings also carry a warning text. The text &MAY; be in any
521   appropriate natural language (perhaps based on the client's Accept
522   headers), and include an &OPTIONAL; indication of what character set is
523   used.
526   Multiple warnings &MAY; be attached to a response (either by the origin
527   server or by a cache), including multiple warnings with the same code
528   number. For example, a server might provide the same warning with
529   texts in both English and Basque.
532   When multiple warnings are attached to a response, it might not be
533   practical or reasonable to display all of them to the user. This
534   version of HTTP does not specify strict priority rules for deciding
535   which warnings to display and in what order, but does suggest some
536   heuristics.
540<section title="Cache-control Mechanisms" anchor="cache-control.mechanisms">
542   The basic cache mechanisms in HTTP/1.1 (server-specified expiration
543   times and validators) are implicit directives to caches. In some
544   cases, a server or client might need to provide explicit directives
545   to the HTTP caches. We use the Cache-Control header for this purpose.
548   The Cache-Control header allows a client or server to transmit a
549   variety of directives in either requests or responses. These
550   directives typically override the default caching algorithms. As a
551   general rule, if there is any apparent conflict between header
552   values, the most restrictive interpretation is applied (that is, the
553   one that is most likely to preserve semantic transparency). However,
554   in some cases, cache-control directives are explicitly specified as
555   weakening the approximation of semantic transparency (for example,
556   "max-stale" or "public").
559   The cache-control directives are described in detail in <xref target="header.cache-control"/>.
563<section title="Explicit User Agent Warnings" anchor="">
565   Many user agents make it possible for users to override the basic
566   caching mechanisms. For example, the user agent might allow the user
567   to specify that cached entities (even explicitly stale ones) are
568   never validated. Or the user agent might habitually add "Cache-Control:
569   max-stale=3600" to every request. The user agent &SHOULD-NOT;
570   default to either non-transparent behavior, or behavior that results
571   in abnormally ineffective caching, but &MAY; be explicitly configured
572   to do so by an explicit action of the user.
575   If the user has overridden the basic caching mechanisms, the user
576   agent &SHOULD; explicitly indicate to the user whenever this results in
577   the display of information that might not meet the server's
578   transparency requirements (in particular, if the displayed entity is
579   known to be stale). Since the protocol normally allows the user agent
580   to determine if responses are stale or not, this indication need only
581   be displayed when this actually happens. The indication need not be a
582   dialog box; it could be an icon (for example, a picture of a rotting
583   fish) or some other indicator.
586   If the user has overridden the caching mechanisms in a way that would
587   abnormally reduce the effectiveness of caches, the user agent &SHOULD;
588   continually indicate this state to the user (for example, by a
589   display of a picture of currency in flames) so that the user does not
590   inadvertently consume excess resources or suffer from excessive
591   latency.
595<section title="Exceptions to the Rules and Warnings" anchor="">
597   In some cases, the operator of a cache &MAY; choose to configure it to
598   return stale responses even when not requested by clients. This
599   decision ought not be made lightly, but may be necessary for reasons
600   of availability or performance, especially when the cache is poorly
601   connected to the origin server. Whenever a cache returns a stale
602   response, it &MUST; mark it as such (using a Warning header) enabling
603   the client software to alert the user that there might be a potential
604   problem.
607   It also allows the user agent to take steps to obtain a first-hand or
608   fresh response. For this reason, a cache &SHOULD-NOT;  return a stale
609   response if the client explicitly requests a first-hand or fresh one,
610   unless it is impossible to comply for technical or policy reasons.
614<section title="Client-controlled Behavior" anchor="client-controlled.behavior">
616   While the origin server (and to a lesser extent, intermediate caches,
617   by their contribution to the age of a response) are the primary
618   source of expiration information, in some cases the client might need
619   to control a cache's decision about whether to return a cached
620   response without validating it. Clients do this using several
621   directives of the Cache-Control header.
624   A client's request &MAY; specify the maximum age it is willing to
625   accept of an unvalidated response; specifying a value of zero forces
626   the cache(s) to revalidate all responses. A client &MAY; also specify
627   the minimum time remaining before a response expires. Both of these
628   options increase constraints on the behavior of caches, and so cannot
629   further relax the cache's approximation of semantic transparency.
632   A client &MAY; also specify that it will accept stale responses, up to
633   some maximum amount of staleness. This loosens the constraints on the
634   caches, and so might violate the origin server's specified
635   constraints on semantic transparency, but might be necessary to
636   support disconnected operation, or high availability in the face of
637   poor connectivity.
642<section title="Expiration Model" anchor="expiration.model">
644<section title="Server-Specified Expiration" anchor="server-specified.expiration">
646   HTTP caching works best when caches can entirely avoid making
647   requests to the origin server. The primary mechanism for avoiding
648   requests is for an origin server to provide an explicit expiration
649   time in the future, indicating that a response &MAY; be used to satisfy
650   subsequent requests. In other words, a cache can return a fresh
651   response without first contacting the server.
654   Our expectation is that servers will assign future explicit
655   expiration times to responses in the belief that the entity is not
656   likely to change, in a semantically significant way, before the
657   expiration time is reached. This normally preserves semantic
658   transparency, as long as the server's expiration times are carefully
659   chosen.
662   The expiration mechanism applies only to responses taken from a cache
663   and not to first-hand responses forwarded immediately to the
664   requesting client.
667   If an origin server wishes to force a semantically transparent cache
668   to validate every request, it &MAY; assign an explicit expiration time
669   in the past. This means that the response is always stale, and so the
670   cache &SHOULD; validate it before using it for subsequent requests. See
671   <xref target="cache.revalidation.and.reload.controls"/> for a more restrictive way to force revalidation.
674   If an origin server wishes to force any HTTP/1.1 cache, no matter how
675   it is configured, to validate every request, it &SHOULD; use the "must-revalidate"
676   cache-control directive (see <xref target="header.cache-control"/>).
679   Servers specify explicit expiration times using either the Expires
680   header, or the max-age directive of the Cache-Control header.
683   An expiration time cannot be used to force a user agent to refresh
684   its display or reload a resource; its semantics apply only to caching
685   mechanisms, and such mechanisms need only check a resource's
686   expiration status when a new request for that resource is initiated.
687   See <xref target="history.lists"/> for an explanation of the difference between caches
688   and history mechanisms.
692<section title="Heuristic Expiration" anchor="heuristic.expiration">
694   Since origin servers do not always provide explicit expiration times,
695   HTTP caches typically assign heuristic expiration times, employing
696   algorithms that use other header values (such as the Last-Modified
697   time) to estimate a plausible expiration time. The HTTP/1.1
698   specification does not provide specific algorithms, but does impose
699   worst-case constraints on their results. Since heuristic expiration
700   times might compromise semantic transparency, they ought to be used
701   cautiously, and we encourage origin servers to provide explicit
702   expiration times as much as possible.
706<section title="Age Calculations" anchor="age.calculations">
708   In order to know if a cached entry is fresh, a cache needs to know if
709   its age exceeds its freshness lifetime. We discuss how to calculate
710   the latter in <xref target="expiration.calculations"/>; this section describes how to calculate
711   the age of a response or cache entry.
714   In this discussion, we use the term "now" to mean "the current value
715   of the clock at the host performing the calculation." Hosts that use
716   HTTP, but especially hosts running origin servers and caches, &SHOULD;
717   use NTP <xref target="RFC1305"/> or some similar protocol to synchronize their clocks to
718   a globally accurate time standard.
721   HTTP/1.1 requires origin servers to send a Date header, if possible,
722   with every response, giving the time at which the response was
723   generated (see &header-date;). We use the term "date_value" to denote
724   the value of the Date header, in a form appropriate for arithmetic
725   operations.
728   HTTP/1.1 uses the Age response-header to convey the estimated age of
729   the response message when obtained from a cache. The Age field value
730   is the cache's estimate of the amount of time since the response was
731   generated or revalidated by the origin server.
734   In essence, the Age value is the sum of the time that the response
735   has been resident in each of the caches along the path from the
736   origin server, plus the amount of time it has been in transit along
737   network paths.
740   We use the term "age_value" to denote the value of the Age header, in
741   a form appropriate for arithmetic operations.
744   A response's age can be calculated in two entirely independent ways:
745  <list style="numbers">
746      <t>now minus date_value, if the local clock is reasonably well
747         synchronized to the origin server's clock. If the result is
748         negative, the result is replaced by zero.</t>
750      <t>age_value, if all of the caches along the response path
751         implement HTTP/1.1.</t>
752  </list>
755   Given that we have two independent ways to compute the age of a
756   response when it is received, we can combine these as
758<figure><artwork type="code">
759    corrected_received_age = max(now - date_value, age_value)
762   and as long as we have either nearly synchronized clocks or all-HTTP/1.1
763   paths, one gets a reliable (conservative) result.
766   Because of network-imposed delays, some significant interval might
767   pass between the time that a server generates a response and the time
768   it is received at the next outbound cache or client. If uncorrected,
769   this delay could result in improperly low ages.
772   Because the request that resulted in the returned Age value must have
773   been initiated prior to that Age value's generation, we can correct
774   for delays imposed by the network by recording the time at which the
775   request was initiated. Then, when an Age value is received, it &MUST;
776   be interpreted relative to the time the request was initiated, not
777   the time that the response was received. This algorithm results in
778   conservative behavior no matter how much delay is experienced. So, we
779   compute:
781<figure><artwork type="code">
782   corrected_initial_age = corrected_received_age
783                         + (now - request_time)
786   where "request_time" is the time (according to the local clock) when
787   the request that elicited this response was sent.
790   Summary of age calculation algorithm, when a cache receives a
791   response:
793<figure><artwork type="code">
794   /*
795    * age_value
796    *      is the value of Age: header received by the cache with
797    *              this response.
798    * date_value
799    *      is the value of the origin server's Date: header
800    * request_time
801    *      is the (local) time when the cache made the request
802    *              that resulted in this cached response
803    * response_time
804    *      is the (local) time when the cache received the
805    *              response
806    * now
807    *      is the current (local) time
808    */
810   apparent_age = max(0, response_time - date_value);
811   corrected_received_age = max(apparent_age, age_value);
812   response_delay = response_time - request_time;
813   corrected_initial_age = corrected_received_age + response_delay;
814   resident_time = now - response_time;
815   current_age   = corrected_initial_age + resident_time;
818   The current_age of a cache entry is calculated by adding the amount
819   of time (in seconds) since the cache entry was last validated by the
820   origin server to the corrected_initial_age. When a response is
821   generated from a cache entry, the cache &MUST; include a single Age
822   header field in the response with a value equal to the cache entry's
823   current_age.
826   The presence of an Age header field in a response implies that a
827   response is not first-hand. However, the converse is not true, since
828   the lack of an Age header field in a response does not imply that the
829   response is first-hand unless all caches along the request path are
830   compliant with HTTP/1.1 (i.e., older HTTP caches did not implement
831   the Age header field).
835<section title="Expiration Calculations" anchor="expiration.calculations">
837   In order to decide whether a response is fresh or stale, we need to
838   compare its freshness lifetime to its age. The age is calculated as
839   described in <xref target="age.calculations"/>; this section describes how to calculate
840   the freshness lifetime, and to determine if a response has expired.
841   In the discussion below, the values can be represented in any form
842   appropriate for arithmetic operations.
845   We use the term "expires_value" to denote the value of the Expires
846   header. We use the term "max_age_value" to denote an appropriate
847   value of the number of seconds carried by the "max-age" directive of
848   the Cache-Control header in a response (see <xref target="modifications.of.the.basic.expiration.mechanism"/>).
851   The max-age directive takes priority over Expires, so if max-age is
852   present in a response, the calculation is simply:
854<figure><artwork type="code">
855   freshness_lifetime = max_age_value
858   Otherwise, if Expires is present in the response, the calculation is:
860<figure><artwork type="code">
861   freshness_lifetime = expires_value - date_value
864   Note that neither of these calculations is vulnerable to clock skew,
865   since all of the information comes from the origin server.
868   If none of Expires, Cache-Control: max-age, or Cache-Control: s-maxage
869   (see <xref target="modifications.of.the.basic.expiration.mechanism"/>) appears in the response, and the response
870   does not include other restrictions on caching, the cache &MAY; compute
871   a freshness lifetime using a heuristic. The cache &MUST; attach Warning
872   113 to any response whose age is more than 24 hours if such warning
873   has not already been added.
876   Also, if the response does have a Last-Modified time, the heuristic
877   expiration value &SHOULD; be no more than some fraction of the interval
878   since that time. A typical setting of this fraction might be 10%.
881   The calculation to determine if a response has expired is quite
882   simple:
884<figure><artwork type="code">
885   response_is_fresh = (freshness_lifetime &gt; current_age)
889<section title="Disambiguating Expiration Values" anchor="disambiguating.expiration.values">
891   Because expiration values are assigned optimistically, it is possible
892   for two caches to contain fresh values for the same resource that are
893   different.
896   If a client performing a retrieval receives a non-first-hand response
897   for a request that was already fresh in its own cache, and the Date
898   header in its existing cache entry is newer than the Date on the new
899   response, then the client &MAY; ignore the response. If so, it &MAY;
900   retry the request with a "Cache-Control: max-age=0" directive (see
901   <xref target="header.cache-control"/>), to force a check with the origin server.
904   If a cache has two fresh responses for the same representation with
905   different validators, it &MUST; use the one with the more recent Date
906   header. This situation might arise because the cache is pooling
907   responses from other caches, or because a client has asked for a
908   reload or a revalidation of an apparently fresh cache entry.
912<section title="Disambiguating Multiple Responses" anchor="disambiguating.multiple.responses">
914   Because a client might be receiving responses via multiple paths, so
915   that some responses flow through one set of caches and other
916   responses flow through a different set of caches, a client might
917   receive responses in an order different from that in which the origin
918   server sent them. We would like the client to use the most recently
919   generated response, even if older responses are still apparently
920   fresh.
923   Neither the entity tag nor the expiration value can impose an
924   ordering on responses, since it is possible that a later response
925   intentionally carries an earlier expiration time. The Date values are
926   ordered to a granularity of one second.
929   When a client tries to revalidate a cache entry, and the response it
930   receives contains a Date header that appears to be older than the one
931   for the existing entry, then the client &SHOULD; repeat the request
932   unconditionally, and include
934<figure><artwork type="example">
935    Cache-Control: max-age=0
938   to force any intermediate caches to validate their copies directly
939   with the origin server, or
941<figure><artwork type="example">
942    Cache-Control: no-cache
945   to force any intermediate caches to obtain a new copy from the origin
946   server.
949   If the Date values are equal, then the client &MAY; use either response
950   (or &MAY;, if it is being extremely prudent, request a new response).
951   Servers &MUST-NOT; depend on clients being able to choose
952   deterministically between responses generated during the same second,
953   if their expiration times overlap.
958<section title="Validation Model" anchor="validation.model">
960   When a cache has a stale entry that it would like to use as a
961   response to a client's request, it first has to check with the origin
962   server (or possibly an intermediate cache with a fresh response) to
963   see if its cached entry is still usable. We call this "validating"
964   the cache entry. Since we do not want to have to pay the overhead of
965   retransmitting the full response if the cached entry is good, and we
966   do not want to pay the overhead of an extra round trip if the cached
967   entry is invalid, HTTP/1.1 supports the use of
968   conditional methods.
971   The key protocol features for supporting conditional methods are
972   those concerned with "cache validators." When an origin server
973   generates a full response, it attaches some sort of validator to it,
974   which is kept with the cache entry. When a client (user agent or
975   proxy cache) makes a conditional request for a resource for which it
976   has a cache entry, it includes the associated validator in the
977   request.
980   The server then checks that validator against the current validator
981   for the entity, and, if they match (see &weak-and-strong-validators;), it responds
982   with a special status code (usually, 304 (Not Modified)) and no
983   entity-body. Otherwise, it returns a full response (including
984   entity-body). Thus, we avoid transmitting the full response if the
985   validator matches, and we avoid an extra round trip if it does not
986   match.
989   In HTTP/1.1, a conditional request looks exactly the same as a normal
990   request for the same resource, except that it carries a special
991   header (which includes the validator) that implicitly turns the
992   method (usually, GET) into a conditional.
995   The protocol includes both positive and negative senses of cache-validating
996   conditions. That is, it is possible to request either that
997   a method be performed if and only if a validator matches or if and
998   only if no validators match.
999  <list><t>
1000      <x:h>Note:</x:h> a response that lacks a validator may still be cached, and
1001      served from cache until it expires, unless this is explicitly
1002      prohibited by a cache-control directive. However, a cache cannot
1003      do a conditional retrieval if it does not have a validator for the
1004      entity, which means it will not be refreshable after it expires.
1005  </t></list>
1008<section title="Last-Modified Dates" anchor="last-modified.dates">
1010   The Last-Modified entity-header field value is often used as a cache
1011   validator. In simple terms, a cache entry is considered to be valid
1012   if the entity has not been modified since the Last-Modified value.
1016<section title="Entity Tag Cache Validators" anchor="entity.tag.cache.validators">
1018   The ETag response-header field value, an entity tag, provides for an
1019   "opaque" cache validator. This might allow more reliable validation
1020   in situations where it is inconvenient to store modification dates,
1021   where the one-second resolution of HTTP date values is not
1022   sufficient, or where the origin server wishes to avoid certain
1023   paradoxes that might arise from the use of modification dates.
1026   Entity Tags are described in &entity-tags;. The headers used with entity
1027   tags are described in &entity-header-fields;.
1031<section title="Non-validating Conditionals" anchor="non-validating.conditionals">
1033   The principle behind entity tags is that only the service author
1034   knows the semantics of a resource well enough to select an
1035   appropriate cache validation mechanism, and the specification of any
1036   validator comparison function more complex than byte-equality would
1037   open up a can of worms. Thus, comparisons of any other headers
1038   (except Last-Modified, for compatibility with HTTP/1.0) are never
1039   used for purposes of validating a cache entry.
1044<section title="Response Cacheability" anchor="response.cacheability">
1046   Unless specifically constrained by a cache-control (<xref target="header.cache-control"/>)
1047   directive, a caching system &MAY; always store a successful response
1048   (see <xref target="errors.or.incomplete.response.cache.behavior"/>) as a cache entry, &MAY; return it without validation
1049   if it is fresh, and &MAY; return it after successful validation. If
1050   there is neither a cache validator nor an explicit expiration time
1051   associated with a response, we do not expect it to be cached, but
1052   certain caches &MAY; violate this expectation (for example, when little
1053   or no network connectivity is available). A client can usually detect
1054   that such a response was taken from a cache by comparing the Date
1055   header to the current time.
1056  <list><t>
1057      <x:h>Note:</x:h> some HTTP/1.0 caches are known to violate this expectation
1058      without providing any Warning.
1059  </t></list>
1062   However, in some cases it might be inappropriate for a cache to
1063   retain an entity, or to return it in response to a subsequent
1064   request. This might be because absolute semantic transparency is
1065   deemed necessary by the service author, or because of security or
1066   privacy considerations. Certain cache-control directives are
1067   therefore provided so that the server can indicate that certain
1068   resource entities, or portions thereof, are not to be cached
1069   regardless of other considerations.
1072   Note that &header-authorization; normally prevents a shared cache from saving
1073   and returning a response to a previous request if that request
1074   included an Authorization header.
1077   A response received with a status code of 200, 203, 206, 300, 301 or
1078   410 &MAY; be stored by a cache and used in reply to a subsequent
1079   request, subject to the expiration mechanism, unless a cache-control
1080   directive prohibits caching. However, a cache that does not support
1081   the Range and Content-Range headers &MUST-NOT; cache 206 (Partial
1082   Content) responses.
1085   A response received with any other status code (e.g. status codes 302
1086   and 307) &MUST-NOT; be returned in a reply to a subsequent request
1087   unless there are cache-control directives or another header(s) that
1088   explicitly allow it. For example, these include the following: an
1089   Expires header (<xref target="header.expires"/>); a "max-age", "s-maxage",  "must-revalidate",
1090   "proxy-revalidate", "public" or "private" cache-control
1091   directive (<xref target="header.cache-control"/>).
1095<section title="Constructing Responses From Caches" anchor="constructing.responses.from.caches">
1097   The purpose of an HTTP cache is to store information received in
1098   response to requests for use in responding to future requests. In
1099   many cases, a cache simply returns the appropriate parts of a
1100   response to the requester. However, if the cache holds a cache entry
1101   based on a previous response, it might have to combine parts of a new
1102   response with what is held in the cache entry.
1105<section title="End-to-end and Hop-by-hop Headers" anchor="end-to-end.and.hop-by-hop.headers">
1107   For the purpose of defining the behavior of caches and non-caching
1108   proxies, we divide HTTP headers into two categories:
1109  <list style="symbols">
1110      <t>End-to-end headers, which are  transmitted to the ultimate
1111        recipient of a request or response. End-to-end headers in
1112        responses &MUST; be stored as part of a cache entry and &MUST; be
1113        transmitted in any response formed from a cache entry.</t>
1115      <t>Hop-by-hop headers, which are meaningful only for a single
1116        transport-level connection, and are not stored by caches or
1117        forwarded by proxies.</t>
1118  </list>
1121   The following HTTP/1.1 headers are hop-by-hop headers:
1122  <list style="symbols">
1123      <t>Connection</t>
1124      <t>Keep-Alive</t>
1125      <t>Proxy-Authenticate</t>
1126      <t>Proxy-Authorization</t>
1127      <t>TE</t>
1128      <t>Trailer</t>
1129      <t>Transfer-Encoding</t>
1130      <t>Upgrade</t>
1131  </list>
1134   All other headers defined by HTTP/1.1 are end-to-end headers.
1137   Other hop-by-hop headers &MUST; be listed in a Connection header
1138   (&header-connection;).
1142<section title="Non-modifiable Headers" anchor="non-modifiable.headers">
1144   Some features of HTTP/1.1, such as Digest
1145   Authentication, depend on the value of certain end-to-end headers. A
1146   transparent proxy &SHOULD-NOT;  modify an end-to-end header unless the
1147   definition of that header requires or specifically allows that.
1150   A transparent proxy &MUST-NOT; modify any of the following fields in a
1151   request or response, and it &MUST-NOT; add any of these fields if not
1152   already present:
1153  <list style="symbols">
1154      <t>Content-Location</t>
1155      <t>Content-MD5</t>
1156      <t>ETag</t>
1157      <t>Last-Modified</t>
1158  </list>
1161   A transparent proxy &MUST-NOT; modify any of the following fields in a
1162   response:
1163  <list style="symbols">
1164    <t>Expires</t>
1165  </list>
1168   but it &MAY; add any of these fields if not already present. If an
1169   Expires header is added, it &MUST; be given a field-value identical to
1170   that of the Date header in that response.
1173   A  proxy &MUST-NOT; modify or add any of the following fields in a
1174   message that contains the no-transform cache-control directive, or in
1175   any request:
1176  <list style="symbols">
1177    <t>Content-Encoding</t>
1178    <t>Content-Range</t>
1179    <t>Content-Type</t>
1180  </list>
1183   A non-transparent proxy &MAY; modify or add these fields to a message
1184   that does not include no-transform, but if it does so, it &MUST; add a
1185   Warning 214 (Transformation applied) if one does not already appear
1186   in the message (see <xref target="header.warning"/>).
1187  <list><t>
1188      Warning: unnecessary modification of end-to-end headers might
1189      cause authentication failures if stronger authentication
1190      mechanisms are introduced in later versions of HTTP. Such
1191      authentication mechanisms &MAY; rely on the values of header fields
1192      not listed here.
1193    </t></list>
1196   The Content-Length field of a request or response is added or deleted
1197   according to the rules in &message-length;. A transparent proxy &MUST;
1198   preserve the entity-length (&entity-length;) of the entity-body,
1199   although it &MAY; change the transfer-length (&message-length;).
1203<section title="Combining Headers" anchor="combining.headers">
1205   When a cache makes a validating request to a server, and the server
1206   provides a 304 (Not Modified) response or a 206 (Partial Content)
1207   response, the cache then constructs a response to send to the
1208   requesting client.
1211   If the status code is 304 (Not Modified), the cache uses the entity-body
1212   stored in the cache entry as the entity-body of this outgoing
1213   response. If the status code is 206 (Partial Content) and the ETag or
1214   Last-Modified headers match exactly, the cache &MAY; combine the
1215   contents stored in the cache entry with the new contents received in
1216   the response and use the result as the entity-body of this outgoing
1217   response, (see &combining-byte-ranges;).
1220   The end-to-end headers stored in the cache entry are used for the
1221   constructed response, except that
1222  <list style="symbols">
1223    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
1224      &MUST; be deleted from the cache entry and the forwarded response.</t>
1225    <t>any stored Warning headers with warn-code 2xx &MUST; be retained
1226        in the cache entry and the forwarded response.</t>
1227    <t>any end-to-end headers provided in the 304 or 206 response &MUST;
1228        replace the corresponding headers from the cache entry.</t>
1229  </list>
1232   Unless the cache decides to remove the cache entry, it &MUST; also
1233   replace the end-to-end headers stored with the cache entry with
1234   corresponding headers received in the incoming response, except for
1235   Warning headers as described immediately above. If a header field-name
1236   in the incoming response matches more than one header in the
1237   cache entry, all such old headers &MUST; be replaced.
1240   In other words, the set of end-to-end headers received in the
1241   incoming response overrides all corresponding end-to-end headers
1242   stored with the cache entry (except for stored Warning headers with
1243   warn-code 1xx, which are deleted even if not overridden).
1244  <list><t>
1245      <x:h>Note:</x:h> this rule allows an origin server to use a 304 (Not
1246      Modified) or a 206 (Partial Content) response to update any header
1247      associated with a previous response for the same entity or sub-ranges
1248      thereof, although it might not always be meaningful or
1249      correct to do so. This rule does not allow an origin server to use
1250      a 304 (Not Modified) or a 206 (Partial Content) response to
1251      entirely delete a header that it had provided with a previous
1252      response.
1253  </t></list>
1259<section title="Caching Negotiated Responses" anchor="caching.negotiated.responses">
1261   Use of server-driven content negotiation (&server-driven-negotiation;), as indicated
1262   by the presence of a Vary header field in a response, alters the
1263   conditions and procedure by which a cache can use the response for
1264   subsequent requests. See <xref target="header.vary"/> for use of the Vary header
1265   field by servers.
1268   A server &SHOULD; use the Vary header field to inform a cache of what
1269   request-header fields were used to select among multiple
1270   representations of a cacheable response subject to server-driven
1271   negotiation. The set of header fields named by the Vary field value
1272   is known as the "selecting" request-headers.
1275   When the cache receives a subsequent request whose Request-URI
1276   specifies one or more cache entries including a Vary header field,
1277   the cache &MUST-NOT; use such a cache entry to construct a response to
1278   the new request unless all of the selecting request-headers present
1279   in the new request match the corresponding stored request-headers in
1280   the original request.
1283   The selecting request-headers from two requests are defined to match
1284   if and only if the selecting request-headers in the first request can
1285   be transformed to the selecting request-headers in the second request
1286   by adding or removing linear white space (LWS) at places where this
1287   is allowed by the corresponding BNF, and/or combining multiple
1288   message-header fields with the same field name following the rules
1289   about message headers in &message-headers;.
1292   A Vary header field-value of "*" always fails to match and subsequent
1293   requests on that resource can only be properly interpreted by the
1294   origin server.
1297   If the selecting request header fields for the cached entry do not
1298   match the selecting request header fields of the new request, then
1299   the cache &MUST-NOT; use a cached entry to satisfy the request unless
1300   it first relays the new request to the origin server in a conditional
1301   request and the server responds with 304 (Not Modified), including an
1302   entity tag or Content-Location that indicates the entity to be used.
1305   If an entity tag was assigned to a cached representation, the
1306   forwarded request &SHOULD; be conditional and include the entity tags
1307   in an If-None-Match header field from all its cache entries for the
1308   resource. This conveys to the server the set of entities currently
1309   held by the cache, so that if any one of these entities matches the
1310   requested entity, the server can use the ETag header field in its 304
1311   (Not Modified) response to tell the cache which entry is appropriate.
1312   If the entity-tag of the new response matches that of an existing
1313   entry, the new response &SHOULD; be used to update the header fields of
1314   the existing entry, and the result &MUST; be returned to the client.
1317   If any of the existing cache entries contains only partial content
1318   for the associated entity, its entity-tag &SHOULD-NOT;  be included in
1319   the If-None-Match header field unless the request is for a range that
1320   would be fully satisfied by that entry.
1323   If a cache receives a successful response whose Content-Location
1324   field matches that of an existing cache entry for the same Request-URI,
1325   whose entity-tag differs from that of the existing entry, and
1326   whose Date is more recent than that of the existing entry, the
1327   existing entry &SHOULD-NOT;  be returned in response to future requests
1328   and &SHOULD; be deleted from the cache.
1332<section title="Shared and Non-Shared Caches" anchor="shared.and.non-shared.caches">
1334   For reasons of security and privacy, it is necessary to make a
1335   distinction between "shared" and "non-shared" caches. A non-shared
1336   cache is one that is accessible only to a single user. Accessibility
1337   in this case &SHOULD; be enforced by appropriate security mechanisms.
1338   All other caches are considered to be "shared." Other sections of
1339   this specification place certain constraints on the operation of
1340   shared caches in order to prevent loss of privacy or failure of
1341   access controls.
1345<section title="Errors or Incomplete Response Cache Behavior" anchor="errors.or.incomplete.response.cache.behavior">
1347   A cache that receives an incomplete response (for example, with fewer
1348   bytes of data than specified in a Content-Length header) &MAY; store
1349   the response. However, the cache &MUST; treat this as a partial
1350   response. Partial responses &MAY; be combined as described in &combining-byte-ranges;;
1351   the result might be a full response or might still be
1352   partial. A cache &MUST-NOT; return a partial response to a client
1353   without explicitly marking it as such, using the 206 (Partial
1354   Content) status code. A cache &MUST-NOT; return a partial response
1355   using a status code of 200 (OK).
1358   If a cache receives a 5xx response while attempting to revalidate an
1359   entry, it &MAY; either forward this response to the requesting client,
1360   or act as if the server failed to respond. In the latter case, it &MAY;
1361   return a previously received response unless the cached entry
1362   includes the "must-revalidate" cache-control directive (see <xref target="header.cache-control"/>).
1366<section title="Side Effects of GET and HEAD" anchor="side.effects.of.get.and.head">
1368   Unless the origin server explicitly prohibits the caching of their
1369   responses, the application of GET and HEAD methods to any resources
1370   &SHOULD-NOT;  have side effects that would lead to erroneous behavior if
1371   these responses are taken from a cache. They &MAY; still have side
1372   effects, but a cache is not required to consider such side effects in
1373   its caching decisions. Caches are always expected to observe an
1374   origin server's explicit restrictions on caching.
1377   We note one exception to this rule: since some applications have
1378   traditionally used GET and HEAD requests with URLs containing a query part
1379   to perform operations with significant side
1380   effects, caches &MUST-NOT; treat responses to such URIs as fresh unless
1381   the server provides an explicit expiration time. This specifically
1382   means that responses from HTTP/1.0 servers for such URIs &SHOULD-NOT;
1383   be taken from a cache. See &safe-methods; for related information.
1387<section title="Invalidation After Updates or Deletions" anchor="invalidation.after.updates.or.deletions">
1389   The effect of certain methods performed on a resource at the origin
1390   server might cause one or more existing cache entries to become non-transparently
1391   invalid. That is, although they might continue to be
1392   "fresh," they do not accurately reflect what the origin server would
1393   return for a new request on that resource.
1396   There is no way for HTTP to guarantee that all such
1397   cache entries are marked invalid. For example, the request that
1398   caused the change at the origin server might not have gone through
1399   the proxy where a cache entry is stored. However, several rules help
1400   reduce the likelihood of erroneous behavior.
1403   In this section, the phrase "invalidate an entity" means that the
1404   cache will either remove all instances of that entity from its
1405   storage, or will mark these as "invalid" and in need of a mandatory
1406   revalidation before they can be returned in response to a subsequent
1407   request.
1410   Some HTTP methods &MUST; cause a cache to invalidate an entity. This is
1411   either the entity referred to by the Request-URI, or by the Location
1412   or Content-Location headers (if present). These methods are:
1413  <list style="symbols">
1414      <t>PUT</t>
1415      <t>DELETE</t>
1416      <t>POST</t>
1417  </list>
1420   An invalidation based
1421   on the URI in a Location or Content-Location header &MUST-NOT; be
1422   performed if the host part of that URI differs from the host part
1423   in the Request-URI. This helps prevent denial of service attacks.
1426   A cache that passes through requests for methods it does not
1427   understand &SHOULD; invalidate any entities referred to by the
1428   Request-URI.
1432<section title="Write-Through Mandatory" anchor="write-through.mandatory">
1434   All methods that might be expected to cause modifications to the
1435   origin server's resources &MUST; be written through to the origin
1436   server. This currently includes all methods except for GET and HEAD.
1437   A cache &MUST-NOT; reply to such a request from a client before having
1438   transmitted the request to the inbound server, and having received a
1439   corresponding response from the inbound server. This does not prevent
1440   a proxy cache from sending a 100 (Continue) response before the
1441   inbound server has sent its final reply.
1444   The alternative (known as "write-back" or "copy-back" caching) is not
1445   allowed in HTTP/1.1, due to the difficulty of providing consistent
1446   updates and the problems arising from server, cache, or network
1447   failure prior to write-back.
1451<section title="Cache Replacement" anchor="cache.replacement">
1453   If a new cacheable (see Sections <xref target="" format="counter"/>,
1454   <xref target="disambiguating.expiration.values" format="counter"/>,
1455   <xref target="disambiguating.multiple.responses" format="counter"/>
1456   and <xref target="errors.or.incomplete.response.cache.behavior" format="counter"/>)
1457   response is received from a resource while any existing responses for
1458   the same resource are cached, the cache &SHOULD; use the new response
1459   to reply to the current request. It &MAY; insert it into cache storage
1460   and &MAY;, if it meets all other requirements, use it to respond to any
1461   future requests that would previously have caused the old response to
1462   be returned. If it inserts the new response into cache storage  the
1463   rules in <xref target="combining.headers"/> apply.
1464  <list><t>
1465      <x:h>Note:</x:h> a new response that has an older Date header value than
1466      existing cached responses is not cacheable.
1467  </t></list>
1471<section title="History Lists" anchor="history.lists">
1473   User agents often have history mechanisms, such as "Back" buttons and
1474   history lists, which can be used to redisplay an entity retrieved
1475   earlier in a session.
1478   History mechanisms and caches are different. In particular history
1479   mechanisms &SHOULD-NOT;  try to show a semantically transparent view of
1480   the current state of a resource. Rather, a history mechanism is meant
1481   to show exactly what the user saw at the time when the resource was
1482   retrieved.
1485   By default, an expiration time does not apply to history mechanisms.
1486   If the entity is still in storage, a history mechanism &SHOULD; display
1487   it even if the entity has expired, unless the user has specifically
1488   configured the agent to refresh expired history documents.
1491   This is not to be construed to prohibit the history mechanism from
1492   telling the user that a view might be stale.
1493  <list><t>
1494      <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from
1495      viewing stale resources, this will tend to force service authors
1496      to avoid using HTTP expiration controls and cache controls when
1497      they would otherwise like to. Service authors may consider it
1498      important that users not be presented with error messages or
1499      warning messages when they use navigation controls (such as BACK)
1500      to view previously fetched resources. Even though sometimes such
1501      resources ought not be cached, or ought to expire quickly, user
1502      interface considerations may force service authors to resort to
1503      other means of preventing caching (e.g. "once-only" URLs) in order
1504      not to suffer the effects of improperly functioning history
1505      mechanisms.
1506  </t></list>
1510<section title="Header Field Definitions" anchor="header.fields">
1512   This section defines the syntax and semantics of HTTP/1.1 header fields
1513   related to caching.
1516   For entity-header fields, both sender and recipient refer to either the
1517   client or the server, depending on who sends and who receives the entity.
1520<section title="Age" anchor="header.age">
1521  <iref primary="true" item="Age header" x:for-anchor=""/>
1522  <iref primary="true" item="Headers" subitem="Age" x:for-anchor=""/>
1524      The Age response-header field conveys the sender's estimate of the
1525      amount of time since the response (or its revalidation) was
1526      generated at the origin server. A cached response is "fresh" if
1527      its age does not exceed its freshness lifetime. Age values are
1528      calculated as specified in <xref target="age.calculations"/>.
1530<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="age-value"/>
1531  Age = "Age" ":" age-value
1532  age-value = delta-seconds
1535      Age values are non-negative decimal integers, representing time in
1536      seconds.
1538<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="delta-seconds"/>
1539  delta-seconds  = 1*DIGIT
1542      If a cache receives a value larger than the largest positive
1543      integer it can represent, or if any of its age calculations
1544      overflows, it &MUST; transmit an Age header with a value of
1545      2147483648 (2^31). An HTTP/1.1 server that includes a cache &MUST;
1546      include an Age header field in every response generated from its
1547      own cache. Caches &SHOULD; use an arithmetic type of at least 31
1548      bits of range.
1552<section title="Cache-Control" anchor="header.cache-control">
1553  <iref primary="true" item="Cache-Control header" x:for-anchor=""/>
1554  <iref primary="true" item="Headers" subitem="Cache-Control" x:for-anchor=""/>
1556   The Cache-Control general-header field is used to specify directives
1557   that &MUST; be obeyed by all caching mechanisms along the
1558   request/response chain. The directives specify behavior intended to
1559   prevent caches from adversely interfering with the request or
1560   response. These directives typically override the default caching
1561   algorithms. Cache directives are unidirectional in that the presence
1562   of a directive in a request does not imply that the same directive is
1563   to be given in the response.
1564  <list><t>
1565      Note that HTTP/1.0 caches might not implement Cache-Control and
1566      might only implement Pragma: no-cache (see <xref target="header.pragma"/>).
1567  </t></list>
1570   Cache directives &MUST; be passed through by a proxy or gateway
1571   application, regardless of their significance to that application,
1572   since the directives might be applicable to all recipients along the
1573   request/response chain. It is not possible to specify a cache-directive
1574   for a specific cache.
1576<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"/>
1577  Cache-Control   = "Cache-Control" ":" 1#cache-directive
1579  cache-directive = cache-request-directive
1580       | cache-response-directive
1582  cache-request-directive =
1583         "no-cache"                          ; <xref target=""/>
1584       | "no-store"                          ; <xref target=""/>
1585       | "max-age" "=" delta-seconds         ; <xref target="modifications.of.the.basic.expiration.mechanism"/>, <xref format="counter" target="cache.revalidation.and.reload.controls"/>
1586       | "max-stale" [ "=" delta-seconds ]   ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1587       | "min-fresh" "=" delta-seconds       ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1588       | "no-transform"                      ; <xref target="no-transform.directive"/>
1589       | "only-if-cached"                    ; <xref target="cache.revalidation.and.reload.controls"/>
1590       | cache-extension                     ; <xref target="cache.control.extensions"/>
1592  cache-response-directive =
1593         "public"                               ; <xref target=""/>
1594       | "private" [ "=" DQUOTE 1#field-name DQUOTE ] ; <xref target=""/>
1595       | "no-cache" [ "=" DQUOTE 1#field-name DQUOTE ]; <xref target=""/>
1596       | "no-store"                             ; <xref target=""/>
1597       | "no-transform"                         ; <xref target="no-transform.directive"/>
1598       | "must-revalidate"                      ; <xref target="cache.revalidation.and.reload.controls"/>
1599       | "proxy-revalidate"                     ; <xref target="cache.revalidation.and.reload.controls"/>
1600       | "max-age" "=" delta-seconds            ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1601       | "s-maxage" "=" delta-seconds           ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1602       | cache-extension                        ; <xref target="cache.control.extensions"/>
1604  cache-extension = token [ "=" ( token | quoted-string ) ]
1607   When a directive appears without any 1#field-name parameter, the
1608   directive applies to the entire request or response. When such a
1609   directive appears with a 1#field-name parameter, it applies only to
1610   the named field or fields, and not to the rest of the request or
1611   response. This mechanism supports extensibility; implementations of
1612   future versions of HTTP might apply these directives to
1613   header fields not defined in HTTP/1.1.
1616   The cache-control directives can be broken down into these general
1617   categories:
1618  <list style="symbols">
1619     <t>Restrictions on what are cacheable; these may only be imposed by
1620        the origin server.</t>
1622     <t>Restrictions on what may be stored by a cache; these may be
1623        imposed by either the origin server or the user agent.</t>
1625     <t>Modifications of the basic expiration mechanism; these may be
1626        imposed by either the origin server or the user agent.</t>
1628     <t>Controls over cache revalidation and reload; these may only be
1629        imposed by a user agent.</t>
1631     <t>Control over transformation of entities.</t>
1633     <t>Extensions to the caching system.</t>
1634  </list>
1637<section title="What is Cacheable" anchor="">
1639   By default, a response is cacheable if the requirements of the
1640   request method, request header fields, and the response status
1641   indicate that it is cacheable. <xref target="response.cacheability"/> summarizes these defaults
1642   for cacheability. The following Cache-Control response directives
1643   allow an origin server to override the default cacheability of a
1644   response:
1647  <iref item="Cache Directives" subitem="public" primary="true"/>
1648  <iref item="public" subitem="Cache Directive" primary="true"/>
1649   public
1650  <list><t>
1651      Indicates that the response &MAY; be cached by any cache, even if it
1652      would normally be non-cacheable or cacheable only within a non-shared
1653      cache. (See also Authorization, &header-authorization;, for
1654      additional details.)
1655  </t></list>
1658  <iref item="Cache Directives" subitem="private" primary="true"/>
1659  <iref item="private" subitem="Cache Directive" primary="true"/>
1660   private
1661  <list><t>
1662      Indicates that all or part of the response message is intended for
1663      a single user and &MUST-NOT; be cached by a shared cache. This
1664      allows an origin server to state that the specified parts of the
1665      response are intended for only one user and are not a valid
1666      response for requests by other users. A private (non-shared) cache
1667      &MAY; cache the response.
1668    </t><t>
1669       <x:h>Note:</x:h> This usage of the word private only controls where the
1670       response may be cached, and cannot ensure the privacy of the
1671       message content.
1672  </t></list>
1675  <iref item="Cache Directives" subitem="no-cache" primary="true"/>
1676  <iref item="no-cache" subitem="Cache Directive" primary="true"/>
1677   no-cache
1678  <list><t>
1679       If the no-cache directive does not specify a field-name, then a
1680      cache &MUST-NOT; use the response to satisfy a subsequent request
1681      without successful revalidation with the origin server. This
1682      allows an origin server to prevent caching even by caches that
1683      have been configured to return stale responses to client requests.
1684    </t><t>
1685      If the no-cache directive does specify one or more field-names,
1686      then a cache &MAY; use the response to satisfy a subsequent request,
1687      subject to any other restrictions on caching. However, the
1688      specified field-name(s) &MUST-NOT; be sent in the response to a
1689      subsequent request without successful revalidation with the origin
1690      server. This allows an origin server to prevent the re-use of
1691      certain header fields in a response, while still allowing caching
1692      of the rest of the response.
1693    <list><t>
1694       <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this
1695       directive.
1696    </t></list>
1697  </t></list>
1701<section title="What May be Stored by Caches" anchor="">
1703  <iref item="Cache Directives" subitem="no-store" primary="true"/>
1704  <iref item="no-store" subitem="Cache Directive" primary="true"/>
1705   no-store
1706  <list><t>   
1707      The purpose of the no-store directive is to prevent the
1708      inadvertent release or retention of sensitive information (for
1709      example, on backup tapes). The no-store directive applies to the
1710      entire message, and &MAY; be sent either in a response or in a
1711      request. If sent in a request, a cache &MUST-NOT; store any part of
1712      either this request or any response to it. If sent in a response,
1713      a cache &MUST-NOT; store any part of either this response or the
1714      request that elicited it. This directive applies to both non-shared
1715      and shared caches. "&MUST-NOT; store" in this context means
1716      that the cache &MUST-NOT; intentionally store the information in
1717      non-volatile storage, and &MUST; make a best-effort attempt to
1718      remove the information from volatile storage as promptly as
1719      possible after forwarding it.
1720  </t><t>
1721      Even when this directive is associated with a response, users
1722      might explicitly store such a response outside of the caching
1723      system (e.g., with a "Save As" dialog). History buffers &MAY; store
1724      such responses as part of their normal operation.
1725  </t><t>
1726      The purpose of this directive is to meet the stated requirements
1727      of certain users and service authors who are concerned about
1728      accidental releases of information via unanticipated accesses to
1729      cache data structures. While the use of this directive might
1730      improve privacy in some cases, we caution that it is NOT in any
1731      way a reliable or sufficient mechanism for ensuring privacy. In
1732      particular, malicious or compromised caches might not recognize or
1733      obey this directive, and communications networks might be
1734      vulnerable to eavesdropping.
1735  </t></list>
1739<section title="Modifications of the Basic Expiration Mechanism" anchor="modifications.of.the.basic.expiration.mechanism">
1741   The expiration time of an entity &MAY; be specified by the origin
1742   server using the Expires header (see <xref target="header.expires"/>). Alternatively,
1743   it &MAY; be specified using the max-age directive in a response. When
1744   the max-age cache-control directive is present in a cached response,
1745   the response is stale if its current age is greater than the age
1746   value given (in seconds) at the time of a new request for that
1747   resource. The max-age directive on a response implies that the
1748   response is cacheable (i.e., "public") unless some other, more
1749   restrictive cache directive is also present.
1752   If a response includes both an Expires header and a max-age
1753   directive, the max-age directive overrides the Expires header, even
1754   if the Expires header is more restrictive. This rule allows an origin
1755   server to provide, for a given response, a longer expiration time to
1756   an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be
1757   useful if certain HTTP/1.0 caches improperly calculate ages or
1758   expiration times, perhaps due to desynchronized clocks.
1761   Many HTTP/1.0 cache implementations will treat an Expires value that
1762   is less than or equal to the response Date value as being equivalent
1763   to the Cache-Control response directive "no-cache". If an HTTP/1.1
1764   cache receives such a response, and the response does not include a
1765   Cache-Control header field, it &SHOULD; consider the response to be
1766   non-cacheable in order to retain compatibility with HTTP/1.0 servers.
1767  <list><t>
1768       <x:h>Note:</x:h> An origin server might wish to use a relatively new HTTP
1769       cache control feature, such as the "private" directive, on a
1770       network including older caches that do not understand that
1771       feature. The origin server will need to combine the new feature
1772       with an Expires field whose value is less than or equal to the
1773       Date value. This will prevent older caches from improperly
1774       caching the response.
1775  </t></list>
1778  <iref item="Cache Directives" subitem="s-maxage" primary="true"/>
1779  <iref item="s-maxage" subitem="Cache Directive" primary="true"/>
1780   s-maxage
1781  <list><t>
1782       If a response includes an s-maxage directive, then for a shared
1783       cache (but not for a private cache), the maximum age specified by
1784       this directive overrides the maximum age specified by either the
1785       max-age directive or the Expires header. The s-maxage directive
1786       also implies the semantics of the proxy-revalidate directive (see
1787       <xref target="cache.revalidation.and.reload.controls"/>), i.e., that the shared cache must not use the
1788       entry after it becomes stale to respond to a subsequent request
1789       without first revalidating it with the origin server. The s-maxage
1790       directive is always ignored by a private cache.
1791  </t></list>
1794   Note that most older caches, not compliant with this specification,
1795   do not implement any cache-control directives. An origin server
1796   wishing to use a cache-control directive that restricts, but does not
1797   prevent, caching by an HTTP/1.1-compliant cache &MAY; exploit the
1798   requirement that the max-age directive overrides the Expires header,
1799   and the fact that pre-HTTP/1.1-compliant caches do not observe the
1800   max-age directive.
1803   Other directives allow a user agent to modify the basic expiration
1804   mechanism. These directives &MAY; be specified on a request:
1807  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1808  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1809   max-age
1810  <list><t>
1811      Indicates that the client is willing to accept a response whose
1812      age is no greater than the specified time in seconds. Unless max-stale
1813      directive is also included, the client is not willing to
1814      accept a stale response.
1815  </t></list>
1818  <iref item="Cache Directives" subitem="min-fresh" primary="true"/>
1819  <iref item="min-fresh" subitem="Cache Directive" primary="true"/>
1820   min-fresh
1821  <list><t>
1822      Indicates that the client is willing to accept a response whose
1823      freshness lifetime is no less than its current age plus the
1824      specified time in seconds. That is, the client wants a response
1825      that will still be fresh for at least the specified number of
1826      seconds.
1827  </t></list>
1830  <iref item="Cache Directives" subitem="max-stale" primary="true"/>
1831  <iref item="max-stale" subitem="Cache Directive" primary="true"/>
1832   max-stale
1833  <list><t>
1834      Indicates that the client is willing to accept a response that has
1835      exceeded its expiration time. If max-stale is assigned a value,
1836      then the client is willing to accept a response that has exceeded
1837      its expiration time by no more than the specified number of
1838      seconds. If no value is assigned to max-stale, then the client is
1839      willing to accept a stale response of any age.
1840  </t></list>
1843   If a cache returns a stale response, either because of a max-stale
1844   directive on a request, or because the cache is configured to
1845   override the expiration time of a response, the cache &MUST; attach a
1846   Warning header to the stale response, using Warning 110 (Response is
1847   stale).
1850   A cache &MAY; be configured to return stale responses without
1851   validation, but only if this does not conflict with any "MUST"-level
1852   requirements concerning cache validation (e.g., a "must-revalidate"
1853   cache-control directive).
1856   If both the new request and the cached entry include "max-age"
1857   directives, then the lesser of the two values is used for determining
1858   the freshness of the cached entry for that request.
1862<section title="Cache Revalidation and Reload Controls" anchor="cache.revalidation.and.reload.controls">
1864   Sometimes a user agent might want or need to insist that a cache
1865   revalidate its cache entry with the origin server (and not just with
1866   the next cache along the path to the origin server), or to reload its
1867   cache entry from the origin server. End-to-end revalidation might be
1868   necessary if either the cache or the origin server has overestimated
1869   the expiration time of the cached response. End-to-end reload may be
1870   necessary if the cache entry has become corrupted for some reason.
1873   End-to-end revalidation may be requested either when the client does
1874   not have its own local cached copy, in which case we call it
1875   "unspecified end-to-end revalidation", or when the client does have a
1876   local cached copy, in which case we call it "specific end-to-end
1877   revalidation."
1880   The client can specify these three kinds of action using Cache-Control
1881   request directives:
1884   End-to-end reload
1885  <list><t>
1886      The request includes a "no-cache" cache-control directive or, for
1887      compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field
1888      names &MUST-NOT; be included with the no-cache directive in a
1889      request. The server &MUST-NOT; use a cached copy when responding to
1890      such a request.
1891  </t></list>
1894   Specific end-to-end revalidation
1895  <list><t>
1896      The request includes a "max-age=0" cache-control directive, which
1897      forces each cache along the path to the origin server to
1898      revalidate its own entry, if any, with the next cache or server.
1899      The initial request includes a cache-validating conditional with
1900      the client's current validator.
1901  </t></list>
1904   Unspecified end-to-end revalidation
1905  <list><t>
1906      The request includes "max-age=0" cache-control directive, which
1907      forces each cache along the path to the origin server to
1908      revalidate its own entry, if any, with the next cache or server.
1909      The initial request does not include a cache-validating
1910      conditional; the first cache along the path (if any) that holds a
1911      cache entry for this resource includes a cache-validating
1912      conditional with its current validator.
1913  </t></list>
1916  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1917  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1918   max-age
1919  <list><t>
1920      When an intermediate cache is forced, by means of a max-age=0
1921      directive, to revalidate its own cache entry, and the client has
1922      supplied its own validator in the request, the supplied validator
1923      might differ from the validator currently stored with the cache
1924      entry. In this case, the cache &MAY; use either validator in making
1925      its own request without affecting semantic transparency.
1926  </t><t>
1927      However, the choice of validator might affect performance. The
1928      best approach is for the intermediate cache to use its own
1929      validator when making its request. If the server replies with 304
1930      (Not Modified), then the cache can return its now validated copy
1931      to the client with a 200 (OK) response. If the server replies with
1932      a new entity and cache validator, however, the intermediate cache
1933      can compare the returned validator with the one provided in the
1934      client's request, using the strong comparison function. If the
1935      client's validator is equal to the origin server's, then the
1936      intermediate cache simply returns 304 (Not Modified). Otherwise,
1937      it returns the new entity with a 200 (OK) response.
1938  </t><t>
1939      If a request includes the no-cache directive, it &SHOULD-NOT;
1940      include min-fresh, max-stale, or max-age.
1941  </t></list>
1944  <iref item="Cache Directives" subitem="only-if-cached" primary="true"/>
1945  <iref item="only-if-cached" subitem="Cache Directive" primary="true"/>
1946   only-if-cached
1947  <list><t>
1948      In some cases, such as times of extremely poor network
1949      connectivity, a client may want a cache to return only those
1950      responses that it currently has stored, and not to reload or
1951      revalidate with the origin server. To do this, the client may
1952      include the only-if-cached directive in a request. If it receives
1953      this directive, a cache &SHOULD; either respond using a cached entry
1954      that is consistent with the other constraints of the request, or
1955      respond with a 504 (Gateway Timeout) status. However, if a group
1956      of caches is being operated as a unified system with good internal
1957      connectivity, such a request &MAY; be forwarded within that group of
1958      caches.
1959  </t></list>
1962  <iref item="Cache Directives" subitem="must-revalidate" primary="true"/>
1963  <iref item="must-revalidate" subitem="Cache Directive" primary="true"/>
1964   must-revalidate
1965  <list><t>
1966      Because a cache &MAY; be configured to ignore a server's specified
1967      expiration time, and because a client request &MAY; include a max-stale
1968      directive (which has a similar effect), the protocol also
1969      includes a mechanism for the origin server to require revalidation
1970      of a cache entry on any subsequent use. When the must-revalidate
1971      directive is present in a response received by a cache, that cache
1972      &MUST-NOT; use the entry after it becomes stale to respond to a
1973      subsequent request without first revalidating it with the origin
1974      server. (I.e., the cache &MUST; do an end-to-end revalidation every
1975      time, if, based solely on the origin server's Expires or max-age
1976      value, the cached response is stale.)
1977  </t><t>
1978      The must-revalidate directive is necessary to support reliable
1979      operation for certain protocol features. In all circumstances an
1980      HTTP/1.1 cache &MUST; obey the must-revalidate directive; in
1981      particular, if the cache cannot reach the origin server for any
1982      reason, it &MUST; generate a 504 (Gateway Timeout) response.
1983  </t><t>
1984      Servers &SHOULD; send the must-revalidate directive if and only if
1985      failure to revalidate a request on the entity could result in
1986      incorrect operation, such as a silently unexecuted financial
1987      transaction. Recipients &MUST-NOT; take any automated action that
1988      violates this directive, and &MUST-NOT; automatically provide an
1989      unvalidated copy of the entity if revalidation fails.
1990  </t><t>
1991      Although this is not recommended, user agents operating under
1992      severe connectivity constraints &MAY; violate this directive but, if
1993      so, &MUST; explicitly warn the user that an unvalidated response has
1994      been provided. The warning &MUST; be provided on each unvalidated
1995      access, and &SHOULD; require explicit user confirmation.
1996  </t></list>
1999  <iref item="Cache Directives" subitem="proxy-revalidate" primary="true"/>
2000  <iref item="proxy-revalidate" subitem="Cache Directive" primary="true"/>
2001   proxy-revalidate
2002  <list><t>
2003      The proxy-revalidate directive has the same meaning as the must-revalidate
2004      directive, except that it does not apply to non-shared
2005      user agent caches. It can be used on a response to an
2006      authenticated request to permit the user's cache to store and
2007      later return the response without needing to revalidate it (since
2008      it has already been authenticated once by that user), while still
2009      requiring proxies that service many users to revalidate each time
2010      (in order to make sure that each user has been authenticated).
2011      Note that such authenticated responses also need the public cache
2012      control directive in order to allow them to be cached at all.
2013  </t></list>
2017<section title="No-Transform Directive" anchor="no-transform.directive">
2019  <iref item="Cache Directives" subitem="no-transform" primary="true"/>
2020  <iref item="no-transform" subitem="Cache Directive" primary="true"/>
2021   no-transform
2022  <list><t>
2023      Implementors of intermediate caches (proxies) have found it useful
2024      to convert the media type of certain entity bodies. A non-transparent
2025      proxy might, for example, convert between image
2026      formats in order to save cache space or to reduce the amount of
2027      traffic on a slow link.
2028  </t><t>
2029      Serious operational problems occur, however, when these
2030      transformations are applied to entity bodies intended for certain
2031      kinds of applications. For example, applications for medical
2032      imaging, scientific data analysis and those using end-to-end
2033      authentication, all depend on receiving an entity body that is bit
2034      for bit identical to the original entity-body.
2035  </t><t>
2036      Therefore, if a message includes the no-transform directive, an
2037      intermediate cache or proxy &MUST-NOT; change those headers that are
2038      listed in <xref target="non-modifiable.headers"/> as being subject to the no-transform
2039      directive. This implies that the cache or proxy &MUST-NOT; change
2040      any aspect of the entity-body that is specified by these headers,
2041      including the value of the entity-body itself.
2042  </t></list>
2046<section title="Cache Control Extensions" anchor="cache.control.extensions">
2048   The Cache-Control header field can be extended through the use of one
2049   or more cache-extension tokens, each with an optional assigned value.
2050   Informational extensions (those which do not require a change in
2051   cache behavior) &MAY; be added without changing the semantics of other
2052   directives. Behavioral extensions are designed to work by acting as
2053   modifiers to the existing base of cache directives. Both the new
2054   directive and the standard directive are supplied, such that
2055   applications which do not understand the new directive will default
2056   to the behavior specified by the standard directive, and those that
2057   understand the new directive will recognize it as modifying the
2058   requirements associated with the standard directive. In this way,
2059   extensions to the cache-control directives can be made without
2060   requiring changes to the base protocol.
2063   This extension mechanism depends on an HTTP cache obeying all of the
2064   cache-control directives defined for its native HTTP-version, obeying
2065   certain extensions, and ignoring all directives that it does not
2066   understand.
2069   For example, consider a hypothetical new response directive called
2070   community which acts as a modifier to the private directive. We
2071   define this new directive to mean that, in addition to any non-shared
2072   cache, any cache which is shared only by members of the community
2073   named within its value may cache the response. An origin server
2074   wishing to allow the UCI community to use an otherwise private
2075   response in their shared cache(s) could do so by including
2077<figure><artwork type="example">
2078    Cache-Control: private, community="UCI"
2081   A cache seeing this header field will act correctly even if the cache
2082   does not understand the community cache-extension, since it will also
2083   see and understand the private directive and thus default to the safe
2084   behavior.
2087   Unrecognized cache-directives &MUST; be ignored; it is assumed that any
2088   cache-directive likely to be unrecognized by an HTTP/1.1 cache will
2089   be combined with standard directives (or the response's default
2090   cacheability) such that the cache behavior will remain minimally
2091   correct even if the cache does not understand the extension(s).
2096<section title="Expires" anchor="header.expires">
2097  <iref primary="true" item="Expires header" x:for-anchor=""/>
2098  <iref primary="true" item="Headers" subitem="Expires" x:for-anchor=""/>
2100   The Expires entity-header field gives the date/time after which the
2101   response is considered stale. A stale cache entry may not normally be
2102   returned by a cache (either a proxy cache or a user agent cache)
2103   unless it is first validated with the origin server (or with an
2104   intermediate cache that has a fresh copy of the entity). See <xref target="expiration.model"/>
2105   for further discussion of the expiration model.
2108   The presence of an Expires field does not imply that the original
2109   resource will change or cease to exist at, before, or after that
2110   time.
2113   The format is an absolute date and time as defined by HTTP-date in
2114   &full-date;; it &MUST; be sent in rfc1123-date format.
2116<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
2117  Expires = "Expires" ":" HTTP-date
2120   An example of its use is
2122<figure><artwork type="example">
2123   Expires: Thu, 01 Dec 1994 16:00:00 GMT
2126  <list><t>
2127      <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
2128      directive (see <xref target="modifications.of.the.basic.expiration.mechanism"/>), that directive overrides the
2129      Expires field.
2130  </t></list>
2133   HTTP/1.1 clients and caches &MUST; treat other invalid date formats,
2134   especially including the value "0", as in the past (i.e., "already
2135   expired").
2138   To mark a response as "already expired," an origin server sends an
2139   Expires date that is equal to the Date header value. (See the rules
2140   for expiration calculations in <xref target="expiration.calculations"/>.)
2143   To mark a response as "never expires," an origin server sends an
2144   Expires date approximately one year from the time the response is
2145   sent. HTTP/1.1 servers &SHOULD-NOT;  send Expires dates more than one
2146   year in the future.
2149   The presence of an Expires header field with a date value of some
2150   time in the future on a response that otherwise would by default be
2151   non-cacheable indicates that the response is cacheable, unless
2152   indicated otherwise by a Cache-Control header field (<xref target="header.cache-control"/>).
2156<section title="Pragma" anchor="header.pragma">
2157  <iref primary="true" item="Pragma header" x:for-anchor=""/>
2158  <iref primary="true" item="Headers" subitem="Pragma" x:for-anchor=""/>
2160   The Pragma general-header field is used to include implementation-specific
2161   directives that might apply to any recipient along the
2162   request/response chain. All pragma directives specify optional
2163   behavior from the viewpoint of the protocol; however, some systems
2164   &MAY; require that behavior be consistent with the directives.
2166<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"/>
2167  Pragma            = "Pragma" ":" 1#pragma-directive
2168  pragma-directive  = "no-cache" | extension-pragma
2169  extension-pragma  = token [ "=" ( token | quoted-string ) ]
2172   When the no-cache directive is present in a request message, an
2173   application &SHOULD; forward the request toward the origin server even
2174   if it has a cached copy of what is being requested. This pragma
2175   directive has the same semantics as the no-cache cache-directive (see
2176   <xref target="header.cache-control"/>) and is defined here for backward compatibility with
2177   HTTP/1.0. Clients &SHOULD; include both header fields when a no-cache
2178   request is sent to a server not known to be HTTP/1.1 compliant.
2181   Pragma directives &MUST; be passed through by a proxy or gateway
2182   application, regardless of their significance to that application,
2183   since the directives might be applicable to all recipients along the
2184   request/response chain. It is not possible to specify a pragma for a
2185   specific recipient; however, any pragma directive not relevant to a
2186   recipient &SHOULD; be ignored by that recipient.
2189   HTTP/1.1 caches &SHOULD; treat "Pragma: no-cache" as if the client had
2190   sent "Cache-Control: no-cache". No new Pragma directives will be
2191   defined in HTTP.
2192  <list><t>
2193      <x:h>Note:</x:h> because the meaning of "Pragma: no-cache" as a
2194      response-header field is not actually specified, it does not provide a
2195      reliable replacement for "Cache-Control: no-cache" in a response.
2196  </t></list>
2200<section title="Vary" anchor="header.vary">
2201  <iref primary="true" item="Vary header" x:for-anchor=""/>
2202  <iref primary="true" item="Headers" subitem="Vary" x:for-anchor=""/>
2204   The Vary field value indicates the set of request-header fields that
2205   fully determines, while the response is fresh, whether a cache is
2206   permitted to use the response to reply to a subsequent request
2207   without revalidation. For uncacheable or stale responses, the Vary
2208   field value advises the user agent about the criteria that were used
2209   to select the representation. A Vary field value of "*" implies that
2210   a cache cannot determine from the request headers of a subsequent
2211   request whether this response is the appropriate representation. See
2212   <xref target="caching.negotiated.responses"/> for use of the Vary header field by caches.
2214<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/>
2215  Vary  = "Vary" ":" ( "*" | 1#field-name )
2218   An HTTP/1.1 server &SHOULD; include a Vary header field with any
2219   cacheable response that is subject to server-driven negotiation.
2220   Doing so allows a cache to properly interpret future requests on that
2221   resource and informs the user agent about the presence of negotiation
2222   on that resource. A server &MAY; include a Vary header field with a
2223   non-cacheable response that is subject to server-driven negotiation,
2224   since this might provide the user agent with useful information about
2225   the dimensions over which the response varies at the time of the
2226   response.
2229   A Vary field value consisting of a list of field-names signals that
2230   the representation selected for the response is based on a selection
2231   algorithm which considers ONLY the listed request-header field values
2232   in selecting the most appropriate representation. A cache &MAY; assume
2233   that the same selection will be made for future requests with the
2234   same values for the listed field names, for the duration of time for
2235   which the response is fresh.
2238   The field-names given are not limited to the set of standard
2239   request-header fields defined by this specification. Field names are
2240   case-insensitive.
2243   A Vary field value of "*" signals that unspecified parameters not
2244   limited to the request-headers (e.g., the network address of the
2245   client), play a role in the selection of the response representation.
2246   The "*" value &MUST-NOT; be generated by a proxy server; it may only be
2247   generated by an origin server.
2251<section title="Warning" anchor="header.warning">
2252  <iref primary="true" item="Warning header" x:for-anchor=""/>
2253  <iref primary="true" item="Headers" subitem="Warning" x:for-anchor=""/>
2255   The Warning general-header field is used to carry additional
2256   information about the status or transformation of a message which
2257   might not be reflected in the message. This information is typically
2258   used to warn about a possible lack of semantic transparency from
2259   caching operations or transformations applied to the entity body of
2260   the message.
2263   Warning headers are sent with responses using:
2265<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"/>
2266  Warning    = "Warning" ":" 1#warning-value
2268  warning-value = warn-code SP warn-agent SP warn-text
2269                                        [SP warn-date]
2271  warn-code  = 3DIGIT
2272  warn-agent = ( host [ ":" port ] ) | pseudonym
2273                  ; the name or pseudonym of the server adding
2274                  ; the Warning header, for use in debugging
2275  warn-text  = quoted-string
2276  warn-date  = DQUOTE HTTP-date DQUOTE
2279   A response &MAY; carry more than one Warning header.
2282   The warn-text &SHOULD; be in a natural language and character set that
2283   is most likely to be intelligible to the human user receiving the
2284   response. This decision &MAY; be based on any available knowledge, such
2285   as the location of the cache or user, the Accept-Language field in a
2286   request, the Content-Language field in a response, etc. The default
2287   language is English and the default character set is ISO-8859-1 (<xref target="ISO-8859-1"/>).
2290   If a character set other than ISO-8859-1 is used, it &MUST; be encoded
2291   in the warn-text using the method described in <xref target="RFC2047"/>.
2294   Warning headers can in general be applied to any message, however
2295   some specific warn-codes are specific to caches and can only be
2296   applied to response messages. New Warning headers &SHOULD; be added
2297   after any existing Warning headers. A cache &MUST-NOT; delete any
2298   Warning header that it received with a message. However, if a cache
2299   successfully validates a cache entry, it &SHOULD; remove any Warning
2300   headers previously attached to that entry except as specified for
2301   specific Warning codes. It &MUST; then add any Warning headers received
2302   in the validating response. In other words, Warning headers are those
2303   that would be attached to the most recent relevant response.
2306   When multiple Warning headers are attached to a response, the user
2307   agent ought to inform the user of as many of them as possible, in the
2308   order that they appear in the response. If it is not possible to
2309   inform the user of all of the warnings, the user agent &SHOULD; follow
2310   these heuristics:
2311  <list style="symbols">
2312    <t>Warnings that appear early in the response take priority over
2313        those appearing later in the response.</t>
2315    <t>Warnings in the user's preferred character set take priority
2316        over warnings in other character sets but with identical warn-codes
2317        and warn-agents.</t>
2318  </list>
2321   Systems that generate multiple Warning headers &SHOULD; order them with
2322   this user agent behavior in mind.
2325   Requirements for the behavior of caches with respect to Warnings are
2326   stated in <xref target="warnings"/>.
2329   This is a list of the currently-defined warn-codes, each with a
2330   recommended warn-text in English, and a description of its meaning.
2333   110 Response is stale
2334  <list><t>
2335     &MUST; be included whenever the returned response is stale.
2336  </t></list>
2339   111 Revalidation failed
2340  <list><t>
2341     &MUST; be included if a cache returns a stale response because an
2342     attempt to revalidate the response failed, due to an inability to
2343     reach the server.
2344  </t></list>
2347   112 Disconnected operation
2348  <list><t>
2349     &SHOULD; be included if the cache is intentionally disconnected from
2350     the rest of the network for a period of time.
2351  </t></list>
2354   113 Heuristic expiration
2355  <list><t>
2356     &MUST; be included if the cache heuristically chose a freshness
2357     lifetime greater than 24 hours and the response's age is greater
2358     than 24 hours.
2359  </t></list>
2362   199 Miscellaneous warning
2363  <list><t>
2364     The warning text &MAY; include arbitrary information to be presented
2365     to a human user, or logged. A system receiving this warning &MUST-NOT;
2366     take any automated action, besides presenting the warning to
2367     the user.
2368  </t></list>
2371   214 Transformation applied
2372  <list><t>
2373     &MUST; be added by an intermediate cache or proxy if it applies any
2374     transformation changing the content-coding (as specified in the
2375     Content-Encoding header) or media-type (as specified in the
2376     Content-Type header) of the response, or the entity-body of the
2377     response, unless this Warning code already appears in the response.
2378  </t></list>
2381   299 Miscellaneous persistent warning
2382  <list><t>
2383     The warning text &MAY; include arbitrary information to be presented
2384     to a human user, or logged. A system receiving this warning &MUST-NOT;
2385     take any automated action.
2386  </t></list>
2389   If an implementation sends a message with one or more Warning headers
2390   whose version is HTTP/1.0 or lower, then the sender &MUST; include in
2391   each warning-value a warn-date that matches the date in the response.
2394   If an implementation receives a message with a warning-value that
2395   includes a warn-date, and that warn-date is different from the Date
2396   value in the response, then that warning-value &MUST; be deleted from
2397   the message before storing, forwarding, or using it. (This prevents
2398   bad consequences of naive caching of Warning header fields.) If all
2399   of the warning-values are deleted for this reason, the Warning header
2400   &MUST; be deleted as well.
2406<section title="IANA Considerations" anchor="IANA.considerations">
2408   TBD.
2412<section title="Security Considerations" anchor="security.considerations">
2414   Caching proxies provide additional potential vulnerabilities, since
2415   the contents of the cache represent an attractive target for
2416   malicious exploitation. Because cache contents persist after an HTTP
2417   request is complete, an attack on the cache can reveal information
2418   long after a user believes that the information has been removed from
2419   the network. Therefore, cache contents should be protected as
2420   sensitive information.
2424<section title="Acknowledgments" anchor="ack">
2426   Much of the content and presentation of the caching design is due to
2427   suggestions and comments from individuals including: Shel Kaphan,
2428   Paul Leach, Koen Holtman, David Morris, and Larry Masinter.
2434<references title="Normative References">
2436<reference anchor="ISO-8859-1">
2437  <front>
2438    <title>
2439     Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
2440    </title>
2441    <author>
2442      <organization>International Organization for Standardization</organization>
2443    </author>
2444    <date year="1998"/>
2445  </front>
2446  <seriesInfo name="ISO/IEC" value="8859-1:1998"/>
2449<reference anchor="Part1">
2450  <front>
2451    <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2452    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2453      <organization abbrev="Day Software">Day Software</organization>
2454      <address><email></email></address>
2455    </author>
2456    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2457      <organization>One Laptop per Child</organization>
2458      <address><email></email></address>
2459    </author>
2460    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2461      <organization abbrev="HP">Hewlett-Packard Company</organization>
2462      <address><email></email></address>
2463    </author>
2464    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2465      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2466      <address><email></email></address>
2467    </author>
2468    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2469      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2470      <address><email></email></address>
2471    </author>
2472    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2473      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2474      <address><email></email></address>
2475    </author>
2476    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2477      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2478      <address><email></email></address>
2479    </author>
2480    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2481      <organization abbrev="W3C">World Wide Web Consortium</organization>
2482      <address><email></email></address>
2483    </author>
2484    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2485      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2486      <address><email></email></address>
2487    </author>
2488    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2489  </front>
2490  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
2491  <x:source href="p1-messaging.xml" basename="p1-messaging"/>
2494<reference anchor="Part2">
2495  <front>
2496    <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2497    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2498      <organization abbrev="Day Software">Day Software</organization>
2499      <address><email></email></address>
2500    </author>
2501    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2502      <organization>One Laptop per Child</organization>
2503      <address><email></email></address>
2504    </author>
2505    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2506      <organization abbrev="HP">Hewlett-Packard Company</organization>
2507      <address><email></email></address>
2508    </author>
2509    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2510      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2511      <address><email></email></address>
2512    </author>
2513    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2514      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2515      <address><email></email></address>
2516    </author>
2517    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2518      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2519      <address><email></email></address>
2520    </author>
2521    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2522      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2523      <address><email></email></address>
2524    </author>
2525    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2526      <organization abbrev="W3C">World Wide Web Consortium</organization>
2527      <address><email></email></address>
2528    </author>
2529    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2530      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2531      <address><email></email></address>
2532    </author>
2533    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2534  </front>
2535  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
2536  <x:source href="p2-semantics.xml" basename="p2-semantics"/>
2539<reference anchor="Part3">
2540  <front>
2541    <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2542    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2543      <organization abbrev="Day Software">Day Software</organization>
2544      <address><email></email></address>
2545    </author>
2546    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2547      <organization>One Laptop per Child</organization>
2548      <address><email></email></address>
2549    </author>
2550    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2551      <organization abbrev="HP">Hewlett-Packard Company</organization>
2552      <address><email></email></address>
2553    </author>
2554    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2555      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2556      <address><email></email></address>
2557    </author>
2558    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2559      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2560      <address><email></email></address>
2561    </author>
2562    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2563      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2564      <address><email></email></address>
2565    </author>
2566    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2567      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2568      <address><email></email></address>
2569    </author>
2570    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2571      <organization abbrev="W3C">World Wide Web Consortium</organization>
2572      <address><email></email></address>
2573    </author>
2574    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2575      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2576      <address><email></email></address>
2577    </author>
2578    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2579  </front>
2580  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
2581  <x:source href="p3-payload.xml" basename="p3-payload"/>
2584<reference anchor="Part4">
2585  <front>
2586    <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2587    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2588      <organization abbrev="Day Software">Day Software</organization>
2589      <address><email></email></address>
2590    </author>
2591    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2592      <organization>One Laptop per Child</organization>
2593      <address><email></email></address>
2594    </author>
2595    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2596      <organization abbrev="HP">Hewlett-Packard Company</organization>
2597      <address><email></email></address>
2598    </author>
2599    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2600      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2601      <address><email></email></address>
2602    </author>
2603    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2604      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2605      <address><email></email></address>
2606    </author>
2607    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2608      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2609      <address><email></email></address>
2610    </author>
2611    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2612      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2613      <address><email></email></address>
2614    </author>
2615    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2616      <organization abbrev="W3C">World Wide Web Consortium</organization>
2617      <address><email></email></address>
2618    </author>
2619    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2620      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2621      <address><email></email></address>
2622    </author>
2623    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2624  </front>
2625  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
2626  <x:source href="p4-conditional.xml" basename="p4-conditional"/>
2629<reference anchor="Part5">
2630  <front>
2631    <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2632    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2633      <organization abbrev="Day Software">Day Software</organization>
2634      <address><email></email></address>
2635    </author>
2636    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2637      <organization>One Laptop per Child</organization>
2638      <address><email></email></address>
2639    </author>
2640    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2641      <organization abbrev="HP">Hewlett-Packard Company</organization>
2642      <address><email></email></address>
2643    </author>
2644    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2645      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2646      <address><email></email></address>
2647    </author>
2648    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2649      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2650      <address><email></email></address>
2651    </author>
2652    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2653      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2654      <address><email></email></address>
2655    </author>
2656    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2657      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2658      <address><email></email></address>
2659    </author>
2660    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2661      <organization abbrev="W3C">World Wide Web Consortium</organization>
2662      <address><email></email></address>
2663    </author>
2664    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2665      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2666      <address><email></email></address>
2667    </author>
2668    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2669  </front>
2670  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
2671  <x:source href="p5-range.xml" basename="p5-range"/>
2674<reference anchor="Part7">
2675  <front>
2676    <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2677    <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2678      <organization abbrev="Day Software">Day Software</organization>
2679      <address><email></email></address>
2680    </author>
2681    <author initials="J." surname="Gettys" fullname="Jim Gettys">
2682      <organization>One Laptop per Child</organization>
2683      <address><email></email></address>
2684    </author>
2685    <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2686      <organization abbrev="HP">Hewlett-Packard Company</organization>
2687      <address><email></email></address>
2688    </author>
2689    <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2690      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2691      <address><email></email></address>
2692    </author>
2693    <author initials="L." surname="Masinter" fullname="Larry Masinter">
2694      <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2695      <address><email></email></address>
2696    </author>
2697    <author initials="P." surname="Leach" fullname="Paul J. Leach">
2698      <organization abbrev="Microsoft">Microsoft Corporation</organization>
2699      <address><email></email></address>
2700    </author>
2701    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2702      <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2703      <address><email></email></address>
2704    </author>
2705    <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2706      <organization abbrev="W3C">World Wide Web Consortium</organization>
2707      <address><email></email></address>
2708    </author>
2709    <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2710      <organization abbrev="greenbytes">greenbytes GmbH</organization>
2711      <address><email></email></address>
2712    </author>
2713    <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2714  </front>
2715  <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;"/>
2716  <x:source href="p7-auth.xml" basename="p7-auth"/>
2719<reference anchor="RFC2047">
2720  <front>
2721    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
2722    <author initials="K." surname="Moore" fullname="Keith Moore">
2723      <organization>University of Tennessee</organization>
2724      <address><email></email></address>
2725    </author>
2726    <date month="November" year="1996"/>
2727  </front>
2728  <seriesInfo name="RFC" value="2047"/>
2731<reference anchor="RFC2119">
2732  <front>
2733    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2734    <author initials="S." surname="Bradner" fullname="Scott Bradner">
2735      <organization>Harvard University</organization>
2736      <address><email></email></address>
2737    </author>
2738    <date month="March" year="1997"/>
2739  </front>
2740  <seriesInfo name="BCP" value="14"/>
2741  <seriesInfo name="RFC" value="2119"/>
2746<references title="Informative References">
2748<reference anchor="RFC1305">
2749  <front>
2750    <title>Network Time Protocol (Version 3) Specification, Implementation</title>
2751    <author initials="D." surname="Mills" fullname="David L. Mills">
2752      <organization>University of Delaware, Electrical Engineering Department</organization>
2753      <address><email></email></address>
2754    </author>
2755    <date month="March" year="1992"/>
2756  </front>
2757  <seriesInfo name="RFC" value="1305"/>
2760<reference anchor="RFC2616">
2761  <front>
2762    <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2763    <author initials="R." surname="Fielding" fullname="R. Fielding">
2764      <organization>University of California, Irvine</organization>
2765      <address><email></email></address>
2766    </author>
2767    <author initials="J." surname="Gettys" fullname="J. Gettys">
2768      <organization>W3C</organization>
2769      <address><email></email></address>
2770    </author>
2771    <author initials="J." surname="Mogul" fullname="J. Mogul">
2772      <organization>Compaq Computer Corporation</organization>
2773      <address><email></email></address>
2774    </author>
2775    <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2776      <organization>MIT Laboratory for Computer Science</organization>
2777      <address><email></email></address>
2778    </author>
2779    <author initials="L." surname="Masinter" fullname="L. Masinter">
2780      <organization>Xerox Corporation</organization>
2781      <address><email></email></address>
2782    </author>
2783    <author initials="P." surname="Leach" fullname="P. Leach">
2784      <organization>Microsoft Corporation</organization>
2785      <address><email></email></address>
2786    </author>
2787    <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2788      <organization>W3C</organization>
2789      <address><email></email></address>
2790    </author>
2791    <date month="June" year="1999"/>
2792  </front>
2793  <seriesInfo name="RFC" value="2616"/>
2798<section title="Compatibility with Previous Versions" anchor="compatibility">
2800<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2802   A case was missed in the Cache-Control model of HTTP/1.1; s-maxage
2803   was introduced to add this missing case. (Sections <xref target="response.cacheability" format="counter"/>,
2804   <xref target="header.cache-control" format="counter"/>,
2805   <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>)
2808   Transfer-coding and message lengths all interact in ways that
2809   required fixing exactly when chunked encoding is used (to allow for
2810   transfer encoding that may not be self delimiting); it was important
2811   to straighten out exactly how message lengths are computed.
2812   (<xref target="non-modifiable.headers"/>,
2813   see also <xref target="Part1"/>, <xref target="Part3"/> and <xref target="Part5"/>)
2816   Proxies should be able to add Content-Length when appropriate.
2817   (<xref target="non-modifiable.headers"/>)
2820   Range request responses would become very verbose if all meta-data
2821   were always returned; by allowing the server to only send needed
2822   headers in a 206 response, this problem can be avoided.
2823   (<xref target="combining.headers"/>)
2826   The Cache-Control: max-age directive was not properly defined for
2827   responses. (<xref target="modifications.of.the.basic.expiration.mechanism"/>)
2830   Warnings could be cached incorrectly, or not updated appropriately.
2831   (Section <xref target="warnings" format="counter"/>, <xref target="expiration.calculations" format="counter"/>, <xref target="non-modifiable.headers" format="counter"/>,
2832   <xref target="combining.headers" format="counter"/>, <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>,
2833   and <xref target="header.warning" format="counter"/>) Warning
2834   also needed to be a general header, as PUT or other methods may have
2835   need for it in requests.
2839<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
2841  Clarify denial of service attack avoidance requirement.
2842  (<xref target="invalidation.after.updates.or.deletions"/>)
2848<section title="Change Log (to be removed by RFC Editor before publication)">
2850<section title="Since RFC2616">
2852  Extracted relevant partitions from <xref target="RFC2616"/>.
2856<section title="Since draft-ietf-httpbis-p6-cache-00">
2858  Closed issues:
2859  <list style="symbols">
2860    <t>
2861      <eref target=""/>:
2862      "Trailer"
2863      (<eref target=""/>)
2864    </t>
2865    <t>
2866      <eref target=""/>:
2867      "Invalidation after Update or Delete"
2868      (<eref target=""/>)
2869    </t>
2870    <t>
2871      <eref target=""/>:
2872      "Normative and Informative references"
2873    </t>
2874    <t>
2875      <eref target=""/>:
2876      "Date reference typo"
2877    </t>
2878    <t>
2879      <eref target=""/>:
2880      "Connection header text"
2881    </t>
2882    <t>
2883      <eref target=""/>:
2884      "Informative references"
2885    </t>
2886    <t>
2887      <eref target=""/>:
2888      "ISO-8859-1 Reference"
2889    </t>
2890    <t>
2891      <eref target=""/>:
2892      "Normative up-to-date references"
2893    </t>
2894    <t>
2895      <eref target=""/>:
2896      "typo in 13.2.2"
2897    </t>
2898  </list>
2901  Other changes:
2902  <list style="symbols">
2903    <t>
2904      Use names of RFC4234 core rules DQUOTE and HTAB (work in progress on <eref target=""/>)
2905    </t>
2906  </list>
2910<section title="Since draft-ietf-httpbis-p6-cache-01">
2912  Closed issues:
2913  <list style="symbols">
2914    <t>
2915      <eref target=""/>:
2916      "rel_path not used"
2917    </t>
2918  </list>
Note: See TracBrowser for help on using the repository browser.