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

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

add XSLT processing instructions for preview in browsers

  • Property svn:eol-style set to native
File size: 126.7 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 "December">
16  <!ENTITY ID-YEAR "2007">
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-tags                 "<xref target='Part4' x:rel='#entity.tags' xmlns:x=''/>">
21  <!ENTITY full-date                   "<xref target='Part1' x:rel='' xmlns:x=''/>">
22  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x=''/>">
23  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x=''/>">
24  <!ENTITY header-date                 "<xref target='Part1' x:rel='' xmlns:x=''/>">
25  <!ENTITY weak-and-strong-validators  "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
26  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x=''/>">
27  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
28  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
29  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x=''/>">
31<?rfc toc="yes" ?>
32<?rfc symrefs="yes" ?>
33<?rfc sortrefs="yes" ?>
34<?rfc compact="yes"?>
35<?rfc subcompact="no" ?>
36<?rfc linkmailto="no" ?>
37<?rfc editing="no" ?>
38<?rfc-ext allow-markup-in-artwork="yes" ?>
39<?rfc-ext include-references-in-index="yes" ?>
40<rfc obsoletes="2068, 2616" category="std"
41     ipr="full3978" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;"
42     xmlns:x='' xmlns:ed="">
45  <title abbrev="HTTP/1.1, part 6">HTTP/1.1, part 6: Caching</title>
47  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
48    <organization abbrev="Day Software">Day Software</organization>
49    <address>
50      <postal>
51        <street>23 Corporate Plaza DR, Suite 280</street>
52        <city>Newport Beach</city>
53        <region>CA</region>
54        <code>92660</code>
55        <country>USA</country>
56      </postal>
57      <phone>+1-949-706-5300</phone>
58      <facsimile>+1-949-706-5305</facsimile>
59      <email></email>
60      <uri></uri>
61    </address>
62  </author>
64  <author initials="J." surname="Gettys" fullname="Jim Gettys">
65    <organization>One Laptop per Child</organization>
66    <address>
67      <postal>
68        <street>21 Oak Knoll Road</street>
69        <city>Carlisle</city>
70        <region>MA</region>
71        <code>01741</code>
72        <country>USA</country>
73      </postal>
74      <email></email>
75      <uri></uri>
76    </address>
77  </author>
79  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
80    <organization abbrev="HP">Hewlett-Packard Company</organization>
81    <address>
82      <postal>
83        <street>HP Labs, Large Scale Systems Group</street>
84        <street>1501 Page Mill Road, MS 1177</street>
85        <city>Palo Alto</city>
86        <region>CA</region>
87        <code>94304</code>
88        <country>USA</country>
89      </postal>
90      <email></email>
91    </address>
92  </author>
94  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
95    <organization abbrev="Microsoft">Microsoft Corporation</organization>
96    <address>
97      <postal>
98        <street>1 Microsoft Way</street>
99        <city>Redmond</city>
100        <region>WA</region>
101        <code>98052</code>
102        <country>USA</country>
103      </postal>
104      <email></email>
105    </address>
106  </author>
108  <author initials="L." surname="Masinter" fullname="Larry Masinter">
109    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
110    <address>
111      <postal>
112        <street>345 Park Ave</street>
113        <city>San Jose</city>
114        <region>CA</region>
115        <code>95110</code>
116        <country>USA</country>
117      </postal>
118      <email></email>
119      <uri></uri>
120    </address>
121  </author>
123  <author initials="P." surname="Leach" fullname="Paul J. Leach">
124    <organization abbrev="Microsoft">Microsoft Corporation</organization>
125    <address>
126      <postal>
127        <street>1 Microsoft Way</street>
128        <city>Redmond</city>
129        <region>WA</region>
130        <code>98052</code>
131      </postal>
132      <email></email>
133    </address>
134  </author>
136  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
137    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
138    <address>
139      <postal>
140        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
141        <street>The Stata Center, Building 32</street>
142        <street>32 Vassar Street</street>
143        <city>Cambridge</city>
144        <region>MA</region>
145        <code>02139</code>
146        <country>USA</country>
147      </postal>
148      <email></email>
149      <uri></uri>
150    </address>
151  </author>
153  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
154    <organization abbrev="W3C">World Wide Web Consortium</organization>
155    <address>
156      <postal>
157        <street>W3C / ERCIM</street>
158        <street>2004, rte des Lucioles</street>
159        <city>Sophia-Antipolis</city>
160        <region>AM</region>
161        <code>06902</code>
162        <country>France</country>
163      </postal>
164      <email></email>
165      <uri></uri>
166    </address>
167  </author>
169  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
170    <organization abbrev="greenbytes">greenbytes GmbH</organization>
171    <address>
172      <postal>
173        <street>Hafenweg 16</street>
174        <city>Muenster</city><region>NW</region><code>48155</code>
175        <country>Germany</country>
176      </postal>
177      <phone>+49 251 2807760</phone>   
178      <facsimile>+49 251 2807761</facsimile>   
179      <email></email>       
180      <uri></uri>     
181    </address>
182  </author>
184  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
188   The Hypertext Transfer Protocol (HTTP) is an application-level
189   protocol for distributed, collaborative, hypermedia information
190   systems. HTTP has been in use by the World Wide Web global information
191   initiative since 1990. This document is Part 6 of the seven-part specification
192   that defines the protocol referred to as "HTTP/1.1" and, taken together,
193   obsoletes RFC 2616.  Part 6 defines requirements on HTTP caches
194   and the associated header fields that control cache behavior or indicate
195   cacheable response messages.
199<note title="Editorial Note (To be removed by RFC Editor)">
200  <t>
201    This version of the HTTP specification contains only minimal editorial
202    changes from <xref target="RFC2616"/> (abstract, introductory paragraph,
203    and authors' addresses).  All other changes are due to partitioning the
204    original into seven mostly independent parts.  The intent is for readers
205    of future drafts to able to use draft 00 as the basis for comparison
206    when the WG makes later changes to the specification text.  This draft
207    will shortly be followed by draft 01 (containing the first round of changes
208    that have already been agreed to on the mailing list). There is no point in
209    reviewing this draft other than to verify that the partitioning has been
210    done correctly.  Roy T. Fielding, Yves Lafon, and Julian Reschke
211    will be the editors after draft 00 is submitted.
212  </t>
213  <t>
214    Discussion of this draft should take place on the HTTPBIS working group
215    mailing list ( The current issues list is
216    at <eref target=""/>
217    and related documents (including fancy diffs) can be found at
218    <eref target=""/>.
219  </t>
223<section title="Introduction" anchor="introduction">
225   This document will define aspects of HTTP related to caching response
226   messages.  Right now it only includes the extracted relevant sections
227   of <xref target="RFC2616" x:fmt="none">RFC 2616</xref> without edit.
230<section title="Requirements" anchor="intro.requirements">
232   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
233   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
234   document are to be interpreted as described in <xref target="RFC2119"/>.
237   An implementation is not compliant if it fails to satisfy one or more
238   of the &MUST; or &REQUIRED; level requirements for the protocols it
239   implements. An implementation that satisfies all the &MUST; or &REQUIRED;
240   level and all the &SHOULD; level requirements for its protocols is said
241   to be "unconditionally compliant"; one that satisfies all the &MUST;
242   level requirements but not all the &SHOULD; level requirements for its
243   protocols is said to be "conditionally compliant."
247<section title="Terminology" anchor="intro.terminology">
249   This specification uses a number of terms to refer to the roles
250   played by participants in, and objects of, the HTTP communication.
253  <iref item="cache"/>
254  <x:dfn>cache</x:dfn>
255  <list>
256    <t>
257      A program's local store of response messages and the subsystem
258      that controls its message storage, retrieval, and deletion. A
259      cache stores cacheable responses in order to reduce the response
260      time and network bandwidth consumption on future, equivalent
261      requests. Any client or server may include a cache, though a cache
262      cannot be used by a server that is acting as a tunnel.
263    </t>
264  </list>
267  <iref item="cacheable"/>
268  <x:dfn>cacheable</x:dfn>
269  <list>
270    <t>
271      A response is cacheable if a cache is allowed to store a copy of
272      the response message for use in answering subsequent requests. The
273      rules for determining the cacheability of HTTP responses are
274      defined in <xref target="caching"/>. Even if a resource is cacheable, there may
275      be additional constraints on whether a cache can use the cached
276      copy for a particular request.
277    </t>
278  </list>
281  <iref item="first-hand"/>
282  <x:dfn>first-hand</x:dfn>
283  <list>
284    <t>
285      A response is first-hand if it comes directly and without
286      unnecessary delay from the origin server, perhaps via one or more
287      proxies. A response is also first-hand if its validity has just
288      been checked directly with the origin server.
289    </t>
290  </list>
293  <iref item="explicit expiration time"/>
294  <x:dfn>explicit expiration time</x:dfn>
295  <list>
296    <t>
297      The time at which the origin server intends that an entity should
298      no longer be returned by a cache without further validation.
299    </t>
300  </list>
303  <iref item="heuristic expiration time"/>
304  <x:dfn>heuristic expiration time</x:dfn>
305  <list>
306    <t>
307      An expiration time assigned by a cache when no explicit expiration
308      time is available.
309    </t>
310  </list>
313  <iref item="age"/>
314  <x:dfn>age</x:dfn>
315  <list>
316    <t>
317      The age of a response is the time since it was sent by, or
318      successfully validated with, the origin server.
319    </t>
320  </list>
323  <iref item="freshness lifetime"/>
324  <x:dfn>freshness lifetime</x:dfn>
325  <list>
326    <t>
327      The length of time between the generation of a response and its
328      expiration time.
329    </t>
330  </list>
333  <iref item="fresh"/>
334  <x:dfn>fresh</x:dfn>
335  <list>
336    <t>
337      A response is fresh if its age has not yet exceeded its freshness
338      lifetime.
339    </t>
340  </list>
343  <iref item="stale"/>
344  <x:dfn>stale</x:dfn>
345  <list>
346    <t>
347      A response is stale if its age has passed its freshness lifetime.
348    </t>
349  </list>
352  <iref item="semantically transparent"/>
353  <x:dfn>semantically transparent</x:dfn>
354  <list>
355    <t>
356      A cache behaves in a "semantically transparent" manner, with
357      respect to a particular response, when its use affects neither the
358      requesting client nor the origin server, except to improve
359      performance. When a cache is semantically transparent, the client
360      receives exactly the same response (except for hop-by-hop headers)
361      that it would have received had its request been handled directly
362      by the origin server.
363    </t>
364  </list>
367  <iref item="validator"/>
368  <x:dfn>validator</x:dfn>
369  <list>
370    <t>
371      A protocol element (e.g., an entity tag or a Last-Modified time)
372      that is used to find out whether a cache entry is an equivalent
373      copy of an entity.
374    </t>
375  </list>
379<section title="Delta Seconds" anchor="delta.seconds">
381   Some HTTP header fields allow a time value to be specified as an
382   integer number of seconds, represented in decimal, after the time
383   that the message was received.
385<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="delta-seconds"/>
386    delta-seconds  = 1*DIGIT
391<section title="Caching in HTTP" anchor="caching">
392<section title="Overview" anchor="caching.overview">
394   HTTP is typically used for distributed information systems, where
395   performance can be improved by the use of response caches. The
396   HTTP/1.1 protocol includes a number of elements intended to make
397   caching work as well as possible. Because these elements are
398   inextricable from other aspects of the protocol, and because they
399   interact with each other, it is useful to describe the basic caching
400   design of HTTP separately from the detailed descriptions of methods,
401   headers, response codes, etc.
404   Caching would be useless if it did not significantly improve
405   performance. The goal of caching in HTTP/1.1 is to eliminate the need
406   to send requests in many cases, and to eliminate the need to send
407   full responses in many other cases. The former reduces the number of
408   network round-trips required for many operations; we use an
409   "expiration" mechanism for this purpose (see <xref target="expiration.model"/>). The
410   latter reduces network bandwidth requirements; we use a "validation"
411   mechanism for this purpose (see <xref target="validation.model"/>).
414   Requirements for performance, availability, and disconnected
415   operation require us to be able to relax the goal of semantic
416   transparency. The HTTP/1.1 protocol allows origin servers, caches,
417   and clients to explicitly reduce transparency when necessary.
418   However, because non-transparent operation may confuse non-expert
419   users, and might be incompatible with certain server applications
420   (such as those for ordering merchandise), the protocol requires that
421   transparency be relaxed
422  <list style="symbols">
423     <t>only by an explicit protocol-level request when relaxed by
424        client or origin server</t>
426     <t>only with an explicit warning to the end user when relaxed by
427        cache or client</t>
428  </list>
431   Therefore, the HTTP/1.1 protocol provides these important elements:
432  <list style="numbers">
433      <t>Protocol features that provide full semantic transparency when
434         this is required by all parties.</t>
436      <t>Protocol features that allow an origin server or user agent to
437         explicitly request and control non-transparent operation.</t>
439      <t>Protocol features that allow a cache to attach warnings to
440         responses that do not preserve the requested approximation of
441         semantic transparency.</t>
442  </list>
445   A basic principle is that it must be possible for the clients to
446   detect any potential relaxation of semantic transparency.
447  <list><t>
448      <x:h>Note:</x:h> The server, cache, or client implementor might be faced with
449      design decisions not explicitly discussed in this specification.
450      If a decision might affect semantic transparency, the implementor
451      ought to err on the side of maintaining transparency unless a
452      careful and complete analysis shows significant benefits in
453      breaking transparency.
454    </t></list>
457<section title="Cache Correctness" anchor="cache.correctness">
459   A correct cache &MUST; respond to a request with the most up-to-date
460   response held by the cache that is appropriate to the request (see
461   Sections <xref target="disambiguating.expiration.values" format="counter"/>,
462   <xref target="disambiguating.multiple.responses" format="counter"/>,
463   and <xref target="cache.replacement" format="counter"/>) which meets one of the following
464   conditions:
465  <list style="numbers">
466      <t>It has been checked for equivalence with what the origin server
467         would have returned by revalidating the response with the
468         origin server (<xref target="validation.model"/>);</t>
470      <t>It is "fresh enough" (see <xref target="expiration.model"/>). In the default case,
471         this means it meets the least restrictive freshness requirement
472         of the client, origin server, and cache (see <xref target="header.cache-control"/>); if
473         the origin server so specifies, it is the freshness requirement
474         of the origin server alone.
476         If a stored response is not "fresh enough" by the most
477         restrictive freshness requirement of both the client and the
478         origin server, in carefully considered circumstances the cache
479         &MAY; still return the response with the appropriate Warning
480         header (see Sections <xref target="" format="counter"/>
481         and <xref target="header.warning" format="counter"/>), unless such a response
482         is prohibited (e.g., by a "no-store" cache-directive, or by a
483         "no-cache" cache-request-directive; see <xref target="header.cache-control"/>).</t>
485      <t>It is an appropriate 304 (Not Modified), 305 (Proxy Redirect),
486         or error (4xx or 5xx) response message.</t>
487  </list>
490   If the cache can not communicate with the origin server, then a
491   correct cache &SHOULD; respond as above if the response can be
492   correctly served from the cache; if not it &MUST; return an error or
493   warning indicating that there was a communication failure.
496   If a cache receives a response (either an entire response, or a 304
497   (Not Modified) response) that it would normally forward to the
498   requesting client, and the received response is no longer fresh, the
499   cache &SHOULD; forward it to the requesting client without adding a new
500   Warning (but without removing any existing Warning headers). A cache
501   &SHOULD-NOT;  attempt to revalidate a response simply because that
502   response became stale in transit; this might lead to an infinite
503   loop. A user agent that receives a stale response without a Warning
504   &MAY; display a warning indication to the user.
508<section title="Warnings" anchor="warnings">
510   Whenever a cache returns a response that is neither first-hand nor
511   "fresh enough" (in the sense of condition 2 in <xref target="cache.correctness"/>), it
512   &MUST; attach a warning to that effect, using a Warning general-header.
513   The Warning header and the currently defined warnings are described
514   in <xref target="header.warning"/>. The warning allows clients to take appropriate
515   action.
518   Warnings &MAY; be used for other purposes, both cache-related and
519   otherwise. The use of a warning, rather than an error status code,
520   distinguish these responses from true failures.
523   Warnings are assigned three digit warn-codes. The first digit
524   indicates whether the Warning &MUST; or &MUST-NOT; be deleted from a
525   stored cache entry after a successful revalidation:
528  <list style="hanging">
529    <t hangText="1xx">Warnings that describe the freshness or revalidation status of
530     the response, and so &MUST; be deleted after a successful
531     revalidation. 1XX warn-codes &MAY; be generated by a cache only when
532     validating a cached entry. It &MUST-NOT; be generated by clients.</t>
534    <t hangText="2xx">Warnings that describe some aspect of the entity body or entity
535     headers that is not rectified by a revalidation (for example, a
536     lossy compression of the entity bodies) and which &MUST-NOT; be
537     deleted after a successful revalidation.</t>
538    </list>
541   See <xref target="header.warning"/> for the definitions of the codes themselves.
544   HTTP/1.0 caches will cache all Warnings in responses, without
545   deleting the ones in the first category. Warnings in responses that
546   are passed to HTTP/1.0 caches carry an extra warning-date field,
547   which prevents a future HTTP/1.1 recipient from believing an
548   erroneously cached Warning.
551   Warnings also carry a warning text. The text &MAY; be in any
552   appropriate natural language (perhaps based on the client's Accept
553   headers), and include an &OPTIONAL; indication of what character set is
554   used.
557   Multiple warnings &MAY; be attached to a response (either by the origin
558   server or by a cache), including multiple warnings with the same code
559   number. For example, a server might provide the same warning with
560   texts in both English and Basque.
563   When multiple warnings are attached to a response, it might not be
564   practical or reasonable to display all of them to the user. This
565   version of HTTP does not specify strict priority rules for deciding
566   which warnings to display and in what order, but does suggest some
567   heuristics.
571<section title="Cache-control Mechanisms" anchor="cache-control.mechanisms">
573   The basic cache mechanisms in HTTP/1.1 (server-specified expiration
574   times and validators) are implicit directives to caches. In some
575   cases, a server or client might need to provide explicit directives
576   to the HTTP caches. We use the Cache-Control header for this purpose.
579   The Cache-Control header allows a client or server to transmit a
580   variety of directives in either requests or responses. These
581   directives typically override the default caching algorithms. As a
582   general rule, if there is any apparent conflict between header
583   values, the most restrictive interpretation is applied (that is, the
584   one that is most likely to preserve semantic transparency). However,
585   in some cases, cache-control directives are explicitly specified as
586   weakening the approximation of semantic transparency (for example,
587   "max-stale" or "public").
590   The cache-control directives are described in detail in <xref target="header.cache-control"/>.
594<section title="Explicit User Agent Warnings" anchor="">
596   Many user agents make it possible for users to override the basic
597   caching mechanisms. For example, the user agent might allow the user
598   to specify that cached entities (even explicitly stale ones) are
599   never validated. Or the user agent might habitually add "Cache-Control:
600   max-stale=3600" to every request. The user agent &SHOULD-NOT;
601   default to either non-transparent behavior, or behavior that results
602   in abnormally ineffective caching, but &MAY; be explicitly configured
603   to do so by an explicit action of the user.
606   If the user has overridden the basic caching mechanisms, the user
607   agent &SHOULD; explicitly indicate to the user whenever this results in
608   the display of information that might not meet the server's
609   transparency requirements (in particular, if the displayed entity is
610   known to be stale). Since the protocol normally allows the user agent
611   to determine if responses are stale or not, this indication need only
612   be displayed when this actually happens. The indication need not be a
613   dialog box; it could be an icon (for example, a picture of a rotting
614   fish) or some other indicator.
617   If the user has overridden the caching mechanisms in a way that would
618   abnormally reduce the effectiveness of caches, the user agent &SHOULD;
619   continually indicate this state to the user (for example, by a
620   display of a picture of currency in flames) so that the user does not
621   inadvertently consume excess resources or suffer from excessive
622   latency.
626<section title="Exceptions to the Rules and Warnings" anchor="">
628   In some cases, the operator of a cache &MAY; choose to configure it to
629   return stale responses even when not requested by clients. This
630   decision ought not be made lightly, but may be necessary for reasons
631   of availability or performance, especially when the cache is poorly
632   connected to the origin server. Whenever a cache returns a stale
633   response, it &MUST; mark it as such (using a Warning header) enabling
634   the client software to alert the user that there might be a potential
635   problem.
638   It also allows the user agent to take steps to obtain a first-hand or
639   fresh response. For this reason, a cache &SHOULD-NOT;  return a stale
640   response if the client explicitly requests a first-hand or fresh one,
641   unless it is impossible to comply for technical or policy reasons.
645<section title="Client-controlled Behavior" anchor="client-controlled.behavior">
647   While the origin server (and to a lesser extent, intermediate caches,
648   by their contribution to the age of a response) are the primary
649   source of expiration information, in some cases the client might need
650   to control a cache's decision about whether to return a cached
651   response without validating it. Clients do this using several
652   directives of the Cache-Control header.
655   A client's request &MAY; specify the maximum age it is willing to
656   accept of an unvalidated response; specifying a value of zero forces
657   the cache(s) to revalidate all responses. A client &MAY; also specify
658   the minimum time remaining before a response expires. Both of these
659   options increase constraints on the behavior of caches, and so cannot
660   further relax the cache's approximation of semantic transparency.
663   A client &MAY; also specify that it will accept stale responses, up to
664   some maximum amount of staleness. This loosens the constraints on the
665   caches, and so might violate the origin server's specified
666   constraints on semantic transparency, but might be necessary to
667   support disconnected operation, or high availability in the face of
668   poor connectivity.
673<section title="Expiration Model" anchor="expiration.model">
675<section title="Server-Specified Expiration" anchor="server-specified.expiration">
677   HTTP caching works best when caches can entirely avoid making
678   requests to the origin server. The primary mechanism for avoiding
679   requests is for an origin server to provide an explicit expiration
680   time in the future, indicating that a response &MAY; be used to satisfy
681   subsequent requests. In other words, a cache can return a fresh
682   response without first contacting the server.
685   Our expectation is that servers will assign future explicit
686   expiration times to responses in the belief that the entity is not
687   likely to change, in a semantically significant way, before the
688   expiration time is reached. This normally preserves semantic
689   transparency, as long as the server's expiration times are carefully
690   chosen.
693   The expiration mechanism applies only to responses taken from a cache
694   and not to first-hand responses forwarded immediately to the
695   requesting client.
698   If an origin server wishes to force a semantically transparent cache
699   to validate every request, it &MAY; assign an explicit expiration time
700   in the past. This means that the response is always stale, and so the
701   cache &SHOULD; validate it before using it for subsequent requests. See
702   <xref target="cache.revalidation.and.reload.controls"/> for a more restrictive way to force revalidation.
705   If an origin server wishes to force any HTTP/1.1 cache, no matter how
706   it is configured, to validate every request, it &SHOULD; use the "must-revalidate"
707   cache-control directive (see <xref target="header.cache-control"/>).
710   Servers specify explicit expiration times using either the Expires
711   header, or the max-age directive of the Cache-Control header.
714   An expiration time cannot be used to force a user agent to refresh
715   its display or reload a resource; its semantics apply only to caching
716   mechanisms, and such mechanisms need only check a resource's
717   expiration status when a new request for that resource is initiated.
718   See <xref target="history.lists"/> for an explanation of the difference between caches
719   and history mechanisms.
723<section title="Heuristic Expiration" anchor="heuristic.expiration">
725   Since origin servers do not always provide explicit expiration times,
726   HTTP caches typically assign heuristic expiration times, employing
727   algorithms that use other header values (such as the Last-Modified
728   time) to estimate a plausible expiration time. The HTTP/1.1
729   specification does not provide specific algorithms, but does impose
730   worst-case constraints on their results. Since heuristic expiration
731   times might compromise semantic transparency, they ought to be used
732   cautiously, and we encourage origin servers to provide explicit
733   expiration times as much as possible.
737<section title="Age Calculations" anchor="age.calculations">
739   In order to know if a cached entry is fresh, a cache needs to know if
740   its age exceeds its freshness lifetime. We discuss how to calculate
741   the latter in <xref target="expiration.calculations"/>; this section describes how to calculate
742   the age of a response or cache entry.
745   In this discussion, we use the term "now" to mean "the current value
746   of the clock at the host performing the calculation." Hosts that use
747   HTTP, but especially hosts running origin servers and caches, &SHOULD;
748   use NTP <xref target="RFC1305"/> or some similar protocol to synchronize their clocks to
749   a globally accurate time standard.
752   HTTP/1.1 requires origin servers to send a Date header, if possible,
753   with every response, giving the time at which the response was
754   generated (see &header-date;). We use the term "date_value" to denote
755   the value of the Date header, in a form appropriate for arithmetic
756   operations.
759   HTTP/1.1 uses the Age response-header to convey the estimated age of
760   the response message when obtained from a cache. The Age field value
761   is the cache's estimate of the amount of time since the response was
762   generated or revalidated by the origin server.
765   In essence, the Age value is the sum of the time that the response
766   has been resident in each of the caches along the path from the
767   origin server, plus the amount of time it has been in transit along
768   network paths.
771   We use the term "age_value" to denote the value of the Age header, in
772   a form appropriate for arithmetic operations.
775   A response's age can be calculated in two entirely independent ways:
776  <list style="numbers">
777      <t>now minus date_value, if the local clock is reasonably well
778         synchronized to the origin server's clock. If the result is
779         negative, the result is replaced by zero.</t>
781      <t>age_value, if all of the caches along the response path
782         implement HTTP/1.1.</t>
783  </list>
786   Given that we have two independent ways to compute the age of a
787   response when it is received, we can combine these as
789<figure><artwork type="code">
790    corrected_received_age = max(now - date_value, age_value)
793   and as long as we have either nearly synchronized clocks or all-HTTP/1.1
794   paths, one gets a reliable (conservative) result.
797   Because of network-imposed delays, some significant interval might
798   pass between the time that a server generates a response and the time
799   it is received at the next outbound cache or client. If uncorrected,
800   this delay could result in improperly low ages.
803   Because the request that resulted in the returned Age value must have
804   been initiated prior to that Age value's generation, we can correct
805   for delays imposed by the network by recording the time at which the
806   request was initiated. Then, when an Age value is received, it &MUST;
807   be interpreted relative to the time the request was initiated, not
808   the time that the response was received. This algorithm results in
809   conservative behavior no matter how much delay is experienced. So, we
810   compute:
812<figure><artwork type="code">
813   corrected_initial_age = corrected_received_age
814                         + (now - request_time)
817   where "request_time" is the time (according to the local clock) when
818   the request that elicited this response was sent.
821   Summary of age calculation algorithm, when a cache receives a
822   response:
824<figure><artwork type="code">
825   /*
826    * age_value
827    *      is the value of Age: header received by the cache with
828    *              this response.
829    * date_value
830    *      is the value of the origin server's Date: header
831    * request_time
832    *      is the (local) time when the cache made the request
833    *              that resulted in this cached response
834    * response_time
835    *      is the (local) time when the cache received the
836    *              response
837    * now
838    *      is the current (local) time
839    */
841   apparent_age = max(0, response_time - date_value);
842   corrected_received_age = max(apparent_age, age_value);
843   response_delay = response_time - request_time;
844   corrected_initial_age = corrected_received_age + response_delay;
845   resident_time = now - response_time;
846   current_age   = corrected_initial_age + resident_time;
849   The current_age of a cache entry is calculated by adding the amount
850   of time (in seconds) since the cache entry was last validated by the
851   origin server to the corrected_initial_age. When a response is
852   generated from a cache entry, the cache &MUST; include a single Age
853   header field in the response with a value equal to the cache entry's
854   current_age.
857   The presence of an Age header field in a response implies that a
858   response is not first-hand. However, the converse is not true, since
859   the lack of an Age header field in a response does not imply that the
860   response is first-hand unless all caches along the request path are
861   compliant with HTTP/1.1 (i.e., older HTTP caches did not implement
862   the Age header field).
866<section title="Expiration Calculations" anchor="expiration.calculations">
868   In order to decide whether a response is fresh or stale, we need to
869   compare its freshness lifetime to its age. The age is calculated as
870   described in <xref target="age.calculations"/>; this section describes how to calculate
871   the freshness lifetime, and to determine if a response has expired.
872   In the discussion below, the values can be represented in any form
873   appropriate for arithmetic operations.
876   We use the term "expires_value" to denote the value of the Expires
877   header. We use the term "max_age_value" to denote an appropriate
878   value of the number of seconds carried by the "max-age" directive of
879   the Cache-Control header in a response (see <xref target="modifications.of.the.basic.expiration.mechanism"/>).
882   The max-age directive takes priority over Expires, so if max-age is
883   present in a response, the calculation is simply:
885<figure><artwork type="code">
886   freshness_lifetime = max_age_value
889   Otherwise, if Expires is present in the response, the calculation is:
891<figure><artwork type="code">
892   freshness_lifetime = expires_value - date_value
895   Note that neither of these calculations is vulnerable to clock skew,
896   since all of the information comes from the origin server.
899   If none of Expires, Cache-Control: max-age, or Cache-Control: s-maxage
900   (see <xref target="modifications.of.the.basic.expiration.mechanism"/>) appears in the response, and the response
901   does not include other restrictions on caching, the cache &MAY; compute
902   a freshness lifetime using a heuristic. The cache &MUST; attach Warning
903   113 to any response whose age is more than 24 hours if such warning
904   has not already been added.
907   Also, if the response does have a Last-Modified time, the heuristic
908   expiration value &SHOULD; be no more than some fraction of the interval
909   since that time. A typical setting of this fraction might be 10%.
912   The calculation to determine if a response has expired is quite
913   simple:
915<figure><artwork type="code">
916   response_is_fresh = (freshness_lifetime &gt; current_age)
920<section title="Disambiguating Expiration Values" anchor="disambiguating.expiration.values">
922   Because expiration values are assigned optimistically, it is possible
923   for two caches to contain fresh values for the same resource that are
924   different.
927   If a client performing a retrieval receives a non-first-hand response
928   for a request that was already fresh in its own cache, and the Date
929   header in its existing cache entry is newer than the Date on the new
930   response, then the client &MAY; ignore the response. If so, it &MAY;
931   retry the request with a "Cache-Control: max-age=0" directive (see
932   <xref target="header.cache-control"/>), to force a check with the origin server.
935   If a cache has two fresh responses for the same representation with
936   different validators, it &MUST; use the one with the more recent Date
937   header. This situation might arise because the cache is pooling
938   responses from other caches, or because a client has asked for a
939   reload or a revalidation of an apparently fresh cache entry.
943<section title="Disambiguating Multiple Responses" anchor="disambiguating.multiple.responses">
945   Because a client might be receiving responses via multiple paths, so
946   that some responses flow through one set of caches and other
947   responses flow through a different set of caches, a client might
948   receive responses in an order different from that in which the origin
949   server sent them. We would like the client to use the most recently
950   generated response, even if older responses are still apparently
951   fresh.
954   Neither the entity tag nor the expiration value can impose an
955   ordering on responses, since it is possible that a later response
956   intentionally carries an earlier expiration time. The Date values are
957   ordered to a granularity of one second.
960   When a client tries to revalidate a cache entry, and the response it
961   receives contains a Date header that appears to be older than the one
962   for the existing entry, then the client &SHOULD; repeat the request
963   unconditionally, and include
965<figure><artwork type="example">
966    Cache-Control: max-age=0
969   to force any intermediate caches to validate their copies directly
970   with the origin server, or
972<figure><artwork type="example">
973    Cache-Control: no-cache
976   to force any intermediate caches to obtain a new copy from the origin
977   server.
980   If the Date values are equal, then the client &MAY; use either response
981   (or &MAY;, if it is being extremely prudent, request a new response).
982   Servers &MUST-NOT; depend on clients being able to choose
983   deterministically between responses generated during the same second,
984   if their expiration times overlap.
989<section title="Validation Model" anchor="validation.model">
991   When a cache has a stale entry that it would like to use as a
992   response to a client's request, it first has to check with the origin
993   server (or possibly an intermediate cache with a fresh response) to
994   see if its cached entry is still usable. We call this "validating"
995   the cache entry. Since we do not want to have to pay the overhead of
996   retransmitting the full response if the cached entry is good, and we
997   do not want to pay the overhead of an extra round trip if the cached
998   entry is invalid, the HTTP/1.1 protocol supports the use of
999   conditional methods.
1002   The key protocol features for supporting conditional methods are
1003   those concerned with "cache validators." When an origin server
1004   generates a full response, it attaches some sort of validator to it,
1005   which is kept with the cache entry. When a client (user agent or
1006   proxy cache) makes a conditional request for a resource for which it
1007   has a cache entry, it includes the associated validator in the
1008   request.
1011   The server then checks that validator against the current validator
1012   for the entity, and, if they match (see &weak-and-strong-validators;), it responds
1013   with a special status code (usually, 304 (Not Modified)) and no
1014   entity-body. Otherwise, it returns a full response (including
1015   entity-body). Thus, we avoid transmitting the full response if the
1016   validator matches, and we avoid an extra round trip if it does not
1017   match.
1020   In HTTP/1.1, a conditional request looks exactly the same as a normal
1021   request for the same resource, except that it carries a special
1022   header (which includes the validator) that implicitly turns the
1023   method (usually, GET) into a conditional.
1026   The protocol includes both positive and negative senses of cache-validating
1027   conditions. That is, it is possible to request either that
1028   a method be performed if and only if a validator matches or if and
1029   only if no validators match.
1030  <list><t>
1031      <x:h>Note:</x:h> a response that lacks a validator may still be cached, and
1032      served from cache until it expires, unless this is explicitly
1033      prohibited by a cache-control directive. However, a cache cannot
1034      do a conditional retrieval if it does not have a validator for the
1035      entity, which means it will not be refreshable after it expires.
1036  </t></list>
1039<section title="Last-Modified Dates" anchor="last-modified.dates">
1041   The Last-Modified entity-header field value is often used as a cache
1042   validator. In simple terms, a cache entry is considered to be valid
1043   if the entity has not been modified since the Last-Modified value.
1047<section title="Entity Tag Cache Validators" anchor="entity.tag.cache.validators">
1049   The ETag response-header field value, an entity tag, provides for an
1050   "opaque" cache validator. This might allow more reliable validation
1051   in situations where it is inconvenient to store modification dates,
1052   where the one-second resolution of HTTP date values is not
1053   sufficient, or where the origin server wishes to avoid certain
1054   paradoxes that might arise from the use of modification dates.
1057   Entity Tags are described in &entity-tags;.
1061<section title="Non-validating Conditionals" anchor="non-validating.conditionals">
1063   The principle behind entity tags is that only the service author
1064   knows the semantics of a resource well enough to select an
1065   appropriate cache validation mechanism, and the specification of any
1066   validator comparison function more complex than byte-equality would
1067   open up a can of worms. Thus, comparisons of any other headers
1068   (except Last-Modified, for compatibility with HTTP/1.0) are never
1069   used for purposes of validating a cache entry.
1074<section title="Response Cacheability" anchor="response.cacheability">
1076   Unless specifically constrained by a cache-control (<xref target="header.cache-control"/>)
1077   directive, a caching system &MAY; always store a successful response
1078   (see <xref target="errors.or.incomplete.response.cache.behavior"/>) as a cache entry, &MAY; return it without validation
1079   if it is fresh, and &MAY; return it after successful validation. If
1080   there is neither a cache validator nor an explicit expiration time
1081   associated with a response, we do not expect it to be cached, but
1082   certain caches &MAY; violate this expectation (for example, when little
1083   or no network connectivity is available). A client can usually detect
1084   that such a response was taken from a cache by comparing the Date
1085   header to the current time.
1086  <list><t>
1087      <x:h>Note:</x:h> some HTTP/1.0 caches are known to violate this expectation
1088      without providing any Warning.
1089  </t></list>
1092   However, in some cases it might be inappropriate for a cache to
1093   retain an entity, or to return it in response to a subsequent
1094   request. This might be because absolute semantic transparency is
1095   deemed necessary by the service author, or because of security or
1096   privacy considerations. Certain cache-control directives are
1097   therefore provided so that the server can indicate that certain
1098   resource entities, or portions thereof, are not to be cached
1099   regardless of other considerations.
1102   Note that &header-authorization; normally prevents a shared cache from saving
1103   and returning a response to a previous request if that request
1104   included an Authorization header.
1107   A response received with a status code of 200, 203, 206, 300, 301 or
1108   410 &MAY; be stored by a cache and used in reply to a subsequent
1109   request, subject to the expiration mechanism, unless a cache-control
1110   directive prohibits caching. However, a cache that does not support
1111   the Range and Content-Range headers &MUST-NOT; cache 206 (Partial
1112   Content) responses.
1115   A response received with any other status code (e.g. status codes 302
1116   and 307) &MUST-NOT; be returned in a reply to a subsequent request
1117   unless there are cache-control directives or another header(s) that
1118   explicitly allow it. For example, these include the following: an
1119   Expires header (<xref target="header.expires"/>); a "max-age", "s-maxage",  "must-revalidate",
1120   "proxy-revalidate", "public" or "private" cache-control
1121   directive (<xref target="header.cache-control"/>).
1125<section title="Constructing Responses From Caches" anchor="constructing.responses.from.caches">
1127   The purpose of an HTTP cache is to store information received in
1128   response to requests for use in responding to future requests. In
1129   many cases, a cache simply returns the appropriate parts of a
1130   response to the requester. However, if the cache holds a cache entry
1131   based on a previous response, it might have to combine parts of a new
1132   response with what is held in the cache entry.
1135<section title="End-to-end and Hop-by-hop Headers" anchor="end-to-end.and.hop-by-hop.headers">
1137   For the purpose of defining the behavior of caches and non-caching
1138   proxies, we divide HTTP headers into two categories:
1139  <list style="symbols">
1140      <t>End-to-end headers, which are  transmitted to the ultimate
1141        recipient of a request or response. End-to-end headers in
1142        responses &MUST; be stored as part of a cache entry and &MUST; be
1143        transmitted in any response formed from a cache entry.</t>
1145      <t>Hop-by-hop headers, which are meaningful only for a single
1146        transport-level connection, and are not stored by caches or
1147        forwarded by proxies.</t>
1148  </list>
1151   The following HTTP/1.1 headers are hop-by-hop headers:
1152  <list style="symbols">
1153      <t>Connection</t>
1154      <t>Keep-Alive</t>
1155      <t>Proxy-Authenticate</t>
1156      <t>Proxy-Authorization</t>
1157      <t>TE</t>
1158      <t>Trailer</t>
1159      <t>Transfer-Encoding</t>
1160      <t>Upgrade</t>
1161  </list>
1164   All other headers defined by HTTP/1.1 are end-to-end headers.
1167   Other hop-by-hop headers &MUST; be listed in a Connection header
1168   (&header-connection;).
1172<section title="Non-modifiable Headers" anchor="non-modifiable.headers">
1174   Some features of the HTTP/1.1 protocol, such as Digest
1175   Authentication, depend on the value of certain end-to-end headers. A
1176   transparent proxy &SHOULD-NOT;  modify an end-to-end header unless the
1177   definition of that header requires or specifically allows that.
1180   A transparent proxy &MUST-NOT; modify any of the following fields in a
1181   request or response, and it &MUST-NOT; add any of these fields if not
1182   already present:
1183  <list style="symbols">
1184      <t>Content-Location</t>
1185      <t>Content-MD5</t>
1186      <t>ETag</t>
1187      <t>Last-Modified</t>
1188  </list>
1191   A transparent proxy &MUST-NOT; modify any of the following fields in a
1192   response:
1193  <list style="symbols">
1194    <t>Expires</t>
1195  </list>
1198   but it &MAY; add any of these fields if not already present. If an
1199   Expires header is added, it &MUST; be given a field-value identical to
1200   that of the Date header in that response.
1203   A  proxy &MUST-NOT; modify or add any of the following fields in a
1204   message that contains the no-transform cache-control directive, or in
1205   any request:
1206  <list style="symbols">
1207    <t>Content-Encoding</t>
1208    <t>Content-Range</t>
1209    <t>Content-Type</t>
1210  </list>
1213   A non-transparent proxy &MAY; modify or add these fields to a message
1214   that does not include no-transform, but if it does so, it &MUST; add a
1215   Warning 214 (Transformation applied) if one does not already appear
1216   in the message (see <xref target="header.warning"/>).
1217  <list><t>
1218      Warning: unnecessary modification of end-to-end headers might
1219      cause authentication failures if stronger authentication
1220      mechanisms are introduced in later versions of HTTP. Such
1221      authentication mechanisms &MAY; rely on the values of header fields
1222      not listed here.
1223    </t></list>
1226   The Content-Length field of a request or response is added or deleted
1227   according to the rules in &message-length;. A transparent proxy &MUST;
1228   preserve the entity-length (&entity-length;) of the entity-body,
1229   although it &MAY; change the transfer-length (&message-length;).
1233<section title="Combining Headers" anchor="combining.headers">
1235   When a cache makes a validating request to a server, and the server
1236   provides a 304 (Not Modified) response or a 206 (Partial Content)
1237   response, the cache then constructs a response to send to the
1238   requesting client.
1241   If the status code is 304 (Not Modified), the cache uses the entity-body
1242   stored in the cache entry as the entity-body of this outgoing
1243   response. If the status code is 206 (Partial Content) and the ETag or
1244   Last-Modified headers match exactly, the cache &MAY; combine the
1245   contents stored in the cache entry with the new contents received in
1246   the response and use the result as the entity-body of this outgoing
1247   response, (see &combining-byte-ranges;).
1250   The end-to-end headers stored in the cache entry are used for the
1251   constructed response, except that
1252  <list style="symbols">
1253    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
1254      &MUST; be deleted from the cache entry and the forwarded response.</t>
1255    <t>any stored Warning headers with warn-code 2xx &MUST; be retained
1256        in the cache entry and the forwarded response.</t>
1257    <t>any end-to-end headers provided in the 304 or 206 response &MUST;
1258        replace the corresponding headers from the cache entry.</t>
1259  </list>
1262   Unless the cache decides to remove the cache entry, it &MUST; also
1263   replace the end-to-end headers stored with the cache entry with
1264   corresponding headers received in the incoming response, except for
1265   Warning headers as described immediately above. If a header field-name
1266   in the incoming response matches more than one header in the
1267   cache entry, all such old headers &MUST; be replaced.
1270   In other words, the set of end-to-end headers received in the
1271   incoming response overrides all corresponding end-to-end headers
1272   stored with the cache entry (except for stored Warning headers with
1273   warn-code 1xx, which are deleted even if not overridden).
1274  <list><t>
1275      <x:h>Note:</x:h> this rule allows an origin server to use a 304 (Not
1276      Modified) or a 206 (Partial Content) response to update any header
1277      associated with a previous response for the same entity or sub-ranges
1278      thereof, although it might not always be meaningful or
1279      correct to do so. This rule does not allow an origin server to use
1280      a 304 (Not Modified) or a 206 (Partial Content) response to
1281      entirely delete a header that it had provided with a previous
1282      response.
1283  </t></list>
1289<section title="Caching Negotiated Responses" anchor="caching.negotiated.responses">
1291   Use of server-driven content negotiation (&server-driven-negotiation;), as indicated
1292   by the presence of a Vary header field in a response, alters the
1293   conditions and procedure by which a cache can use the response for
1294   subsequent requests. See <xref target="header.vary"/> for use of the Vary header
1295   field by servers.
1298   A server &SHOULD; use the Vary header field to inform a cache of what
1299   request-header fields were used to select among multiple
1300   representations of a cacheable response subject to server-driven
1301   negotiation. The set of header fields named by the Vary field value
1302   is known as the "selecting" request-headers.
1305   When the cache receives a subsequent request whose Request-URI
1306   specifies one or more cache entries including a Vary header field,
1307   the cache &MUST-NOT; use such a cache entry to construct a response to
1308   the new request unless all of the selecting request-headers present
1309   in the new request match the corresponding stored request-headers in
1310   the original request.
1313   The selecting request-headers from two requests are defined to match
1314   if and only if the selecting request-headers in the first request can
1315   be transformed to the selecting request-headers in the second request
1316   by adding or removing linear white space (LWS) at places where this
1317   is allowed by the corresponding BNF, and/or combining multiple
1318   message-header fields with the same field name following the rules
1319   about message headers in &message-headers;.
1322   A Vary header field-value of "*" always fails to match and subsequent
1323   requests on that resource can only be properly interpreted by the
1324   origin server.
1327   If the selecting request header fields for the cached entry do not
1328   match the selecting request header fields of the new request, then
1329   the cache &MUST-NOT; use a cached entry to satisfy the request unless
1330   it first relays the new request to the origin server in a conditional
1331   request and the server responds with 304 (Not Modified), including an
1332   entity tag or Content-Location that indicates the entity to be used.
1335   If an entity tag was assigned to a cached representation, the
1336   forwarded request &SHOULD; be conditional and include the entity tags
1337   in an If-None-Match header field from all its cache entries for the
1338   resource. This conveys to the server the set of entities currently
1339   held by the cache, so that if any one of these entities matches the
1340   requested entity, the server can use the ETag header field in its 304
1341   (Not Modified) response to tell the cache which entry is appropriate.
1342   If the entity-tag of the new response matches that of an existing
1343   entry, the new response &SHOULD; be used to update the header fields of
1344   the existing entry, and the result &MUST; be returned to the client.
1347   If any of the existing cache entries contains only partial content
1348   for the associated entity, its entity-tag &SHOULD-NOT;  be included in
1349   the If-None-Match header field unless the request is for a range that
1350   would be fully satisfied by that entry.
1353   If a cache receives a successful response whose Content-Location
1354   field matches that of an existing cache entry for the same Request-URI,
1355   whose entity-tag differs from that of the existing entry, and
1356   whose Date is more recent than that of the existing entry, the
1357   existing entry &SHOULD-NOT;  be returned in response to future requests
1358   and &SHOULD; be deleted from the cache.
1362<section title="Shared and Non-Shared Caches" anchor="shared.and.non-shared.caches">
1364   For reasons of security and privacy, it is necessary to make a
1365   distinction between "shared" and "non-shared" caches. A non-shared
1366   cache is one that is accessible only to a single user. Accessibility
1367   in this case &SHOULD; be enforced by appropriate security mechanisms.
1368   All other caches are considered to be "shared." Other sections of
1369   this specification place certain constraints on the operation of
1370   shared caches in order to prevent loss of privacy or failure of
1371   access controls.
1375<section title="Errors or Incomplete Response Cache Behavior" anchor="errors.or.incomplete.response.cache.behavior">
1377   A cache that receives an incomplete response (for example, with fewer
1378   bytes of data than specified in a Content-Length header) &MAY; store
1379   the response. However, the cache &MUST; treat this as a partial
1380   response. Partial responses &MAY; be combined as described in &combining-byte-ranges;;
1381   the result might be a full response or might still be
1382   partial. A cache &MUST-NOT; return a partial response to a client
1383   without explicitly marking it as such, using the 206 (Partial
1384   Content) status code. A cache &MUST-NOT; return a partial response
1385   using a status code of 200 (OK).
1388   If a cache receives a 5xx response while attempting to revalidate an
1389   entry, it &MAY; either forward this response to the requesting client,
1390   or act as if the server failed to respond. In the latter case, it &MAY;
1391   return a previously received response unless the cached entry
1392   includes the "must-revalidate" cache-control directive (see <xref target="header.cache-control"/>).
1396<section title="Side Effects of GET and HEAD" anchor="side.effects.of.get.and.head">
1398   Unless the origin server explicitly prohibits the caching of their
1399   responses, the application of GET and HEAD methods to any resources
1400   &SHOULD-NOT;  have side effects that would lead to erroneous behavior if
1401   these responses are taken from a cache. They &MAY; still have side
1402   effects, but a cache is not required to consider such side effects in
1403   its caching decisions. Caches are always expected to observe an
1404   origin server's explicit restrictions on caching.
1407   We note one exception to this rule: since some applications have
1408   traditionally used GETs and HEADs with query URLs (those containing a
1409   "?" in the rel_path part) to perform operations with significant side
1410   effects, caches &MUST-NOT; treat responses to such URIs as fresh unless
1411   the server provides an explicit expiration time. This specifically
1412   means that responses from HTTP/1.0 servers for such URIs &SHOULD-NOT;
1413   be taken from a cache. See &safe-methods; for related information.
1417<section title="Invalidation After Updates or Deletions" anchor="invalidation.after.updates.or.deletions">
1419   The effect of certain methods performed on a resource at the origin
1420   server might cause one or more existing cache entries to become non-transparently
1421   invalid. That is, although they might continue to be
1422   "fresh," they do not accurately reflect what the origin server would
1423   return for a new request on that resource.
1426   There is no way for the HTTP protocol to guarantee that all such
1427   cache entries are marked invalid. For example, the request that
1428   caused the change at the origin server might not have gone through
1429   the proxy where a cache entry is stored. However, several rules help
1430   reduce the likelihood of erroneous behavior.
1433   In this section, the phrase "invalidate an entity" means that the
1434   cache will either remove all instances of that entity from its
1435   storage, or will mark these as "invalid" and in need of a mandatory
1436   revalidation before they can be returned in response to a subsequent
1437   request.
1440   Some HTTP methods &MUST; cause a cache to invalidate an entity. This is
1441   either the entity referred to by the Request-URI, or by the Location
1442   or Content-Location headers (if present). These methods are:
1443  <list style="symbols">
1444      <t>PUT</t>
1445      <t>DELETE</t>
1446      <t>POST</t>
1447  </list>
1450   An invalidation based
1451   on the URI in a Location or Content-Location header &MUST-NOT; be
1452   performed if the host part of that URI differs from the host part
1453   in the Request-URI. This helps prevent denial of service attacks.
1456   A cache that passes through requests for methods it does not
1457   understand &SHOULD; invalidate any entities referred to by the
1458   Request-URI.
1462<section title="Write-Through Mandatory" anchor="write-through.mandatory">
1464   All methods that might be expected to cause modifications to the
1465   origin server's resources &MUST; be written through to the origin
1466   server. This currently includes all methods except for GET and HEAD.
1467   A cache &MUST-NOT; reply to such a request from a client before having
1468   transmitted the request to the inbound server, and having received a
1469   corresponding response from the inbound server. This does not prevent
1470   a proxy cache from sending a 100 (Continue) response before the
1471   inbound server has sent its final reply.
1474   The alternative (known as "write-back" or "copy-back" caching) is not
1475   allowed in HTTP/1.1, due to the difficulty of providing consistent
1476   updates and the problems arising from server, cache, or network
1477   failure prior to write-back.
1481<section title="Cache Replacement" anchor="cache.replacement">
1483   If a new cacheable (see Sections <xref target="" format="counter"/>,
1484   <xref target="disambiguating.expiration.values" format="counter"/>,
1485   <xref target="disambiguating.multiple.responses" format="counter"/>
1486   and <xref target="errors.or.incomplete.response.cache.behavior" format="counter"/>)
1487   response is received from a resource while any existing responses for
1488   the same resource are cached, the cache &SHOULD; use the new response
1489   to reply to the current request. It &MAY; insert it into cache storage
1490   and &MAY;, if it meets all other requirements, use it to respond to any
1491   future requests that would previously have caused the old response to
1492   be returned. If it inserts the new response into cache storage  the
1493   rules in <xref target="combining.headers"/> apply.
1494  <list><t>
1495      <x:h>Note:</x:h> a new response that has an older Date header value than
1496      existing cached responses is not cacheable.
1497  </t></list>
1501<section title="History Lists" anchor="history.lists">
1503   User agents often have history mechanisms, such as "Back" buttons and
1504   history lists, which can be used to redisplay an entity retrieved
1505   earlier in a session.
1508   History mechanisms and caches are different. In particular history
1509   mechanisms &SHOULD-NOT;  try to show a semantically transparent view of
1510   the current state of a resource. Rather, a history mechanism is meant
1511   to show exactly what the user saw at the time when the resource was
1512   retrieved.
1515   By default, an expiration time does not apply to history mechanisms.
1516   If the entity is still in storage, a history mechanism &SHOULD; display
1517   it even if the entity has expired, unless the user has specifically
1518   configured the agent to refresh expired history documents.
1521   This is not to be construed to prohibit the history mechanism from
1522   telling the user that a view might be stale.
1523  <list><t>
1524      <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from
1525      viewing stale resources, this will tend to force service authors
1526      to avoid using HTTP expiration controls and cache controls when
1527      they would otherwise like to. Service authors may consider it
1528      important that users not be presented with error messages or
1529      warning messages when they use navigation controls (such as BACK)
1530      to view previously fetched resources. Even though sometimes such
1531      resources ought not to cached, or ought to expire quickly, user
1532      interface considerations may force service authors to resort to
1533      other means of preventing caching (e.g. "once-only" URLs) in order
1534      not to suffer the effects of improperly functioning history
1535      mechanisms.
1536  </t></list>
1541<section title="Header Field Definitions" anchor="header.fields">
1543   This section defines the syntax and semantics of all standard
1544   HTTP/1.1 header fields. For entity-header fields, both sender and
1545   recipient refer to either the client or the server, depending on who
1546   sends and who receives the entity.
1549<section title="Age" anchor="header.age">
1550  <iref primary="true" item="Age header" x:for-anchor=""/>
1551  <iref primary="true" item="Headers" subitem="Age" x:for-anchor=""/>
1553      The Age response-header field conveys the sender's estimate of the
1554      amount of time since the response (or its revalidation) was
1555      generated at the origin server. A cached response is "fresh" if
1556      its age does not exceed its freshness lifetime. Age values are
1557      calculated as specified in <xref target="age.calculations"/>.
1559<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="age-value"/>
1560        Age = "Age" ":" age-value
1561        age-value = delta-seconds
1564      Age values are non-negative decimal integers, representing time in
1565      seconds.
1568      If a cache receives a value larger than the largest positive
1569      integer it can represent, or if any of its age calculations
1570      overflows, it &MUST; transmit an Age header with a value of
1571      2147483648 (2^31). An HTTP/1.1 server that includes a cache &MUST;
1572      include an Age header field in every response generated from its
1573      own cache. Caches &SHOULD; use an arithmetic type of at least 31
1574      bits of range.
1578<section title="Cache-Control" anchor="header.cache-control">
1579  <iref primary="true" item="Cache-Control header" x:for-anchor=""/>
1580  <iref primary="true" item="Headers" subitem="Cache-Control" x:for-anchor=""/>
1582   The Cache-Control general-header field is used to specify directives
1583   that &MUST; be obeyed by all caching mechanisms along the
1584   request/response chain. The directives specify behavior intended to
1585   prevent caches from adversely interfering with the request or
1586   response. These directives typically override the default caching
1587   algorithms. Cache directives are unidirectional in that the presence
1588   of a directive in a request does not imply that the same directive is
1589   to be given in the response.
1590  <list><t>
1591      Note that HTTP/1.0 caches might not implement Cache-Control and
1592      might only implement Pragma: no-cache (see <xref target="header.pragma"/>).
1593  </t></list>
1596   Cache directives &MUST; be passed through by a proxy or gateway
1597   application, regardless of their significance to that application,
1598   since the directives might be applicable to all recipients along the
1599   request/response chain. It is not possible to specify a cache-directive
1600   for a specific cache.
1602<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"/>
1603   Cache-Control   = "Cache-Control" ":" 1#cache-directive
1605   cache-directive = cache-request-directive
1606        | cache-response-directive
1608   cache-request-directive =
1609          "no-cache"                          ; <xref target=""/>
1610        | "no-store"                          ; <xref target=""/>
1611        | "max-age" "=" delta-seconds         ; <xref target="modifications.of.the.basic.expiration.mechanism"/>, <xref format="counter" target="cache.revalidation.and.reload.controls"/>
1612        | "max-stale" [ "=" delta-seconds ]   ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1613        | "min-fresh" "=" delta-seconds       ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1614        | "no-transform"                      ; <xref target="no-transform.directive"/>
1615        | "only-if-cached"                    ; <xref target="cache.revalidation.and.reload.controls"/>
1616        | cache-extension                     ; <xref target="cache.control.extensions"/>
1618    cache-response-directive =
1619          "public"                               ; <xref target=""/>
1620        | "private" [ "=" &lt;"&gt; 1#field-name &lt;"&gt; ] ; <xref target=""/>
1621        | "no-cache" [ "=" &lt;"&gt; 1#field-name &lt;"&gt; ]; <xref target=""/>
1622        | "no-store"                             ; <xref target=""/>
1623        | "no-transform"                         ; <xref target="no-transform.directive"/>
1624        | "must-revalidate"                      ; <xref target="cache.revalidation.and.reload.controls"/>
1625        | "proxy-revalidate"                     ; <xref target="cache.revalidation.and.reload.controls"/>
1626        | "max-age" "=" delta-seconds            ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1627        | "s-maxage" "=" delta-seconds           ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1628        | cache-extension                        ; <xref target="cache.control.extensions"/>
1630   cache-extension = token [ "=" ( token | quoted-string ) ]
1633   When a directive appears without any 1#field-name parameter, the
1634   directive applies to the entire request or response. When such a
1635   directive appears with a 1#field-name parameter, it applies only to
1636   the named field or fields, and not to the rest of the request or
1637   response. This mechanism supports extensibility; implementations of
1638   future versions of the HTTP protocol might apply these directives to
1639   header fields not defined in HTTP/1.1.
1642   The cache-control directives can be broken down into these general
1643   categories:
1644  <list style="symbols">
1645     <t>Restrictions on what are cacheable; these may only be imposed by
1646        the origin server.</t>
1648     <t>Restrictions on what may be stored by a cache; these may be
1649        imposed by either the origin server or the user agent.</t>
1651     <t>Modifications of the basic expiration mechanism; these may be
1652        imposed by either the origin server or the user agent.</t>
1654     <t>Controls over cache revalidation and reload; these may only be
1655        imposed by a user agent.</t>
1657     <t>Control over transformation of entities.</t>
1659     <t>Extensions to the caching system.</t>
1660  </list>
1663<section title="What is Cacheable" anchor="">
1665   By default, a response is cacheable if the requirements of the
1666   request method, request header fields, and the response status
1667   indicate that it is cacheable. <xref target="response.cacheability"/> summarizes these defaults
1668   for cacheability. The following Cache-Control response directives
1669   allow an origin server to override the default cacheability of a
1670   response:
1673  <iref item="Cache Directives" subitem="public" primary="true"/>
1674  <iref item="public" subitem="Cache Directive" primary="true"/>
1675   public
1676  <list><t>
1677      Indicates that the response &MAY; be cached by any cache, even if it
1678      would normally be non-cacheable or cacheable only within a non-shared
1679      cache. (See also Authorization, &header-authorization;, for
1680      additional details.)
1681  </t></list>
1684  <iref item="Cache Directives" subitem="private" primary="true"/>
1685  <iref item="private" subitem="Cache Directive" primary="true"/>
1686   private
1687  <list><t>
1688      Indicates that all or part of the response message is intended for
1689      a single user and &MUST-NOT; be cached by a shared cache. This
1690      allows an origin server to state that the specified parts of the
1691      response are intended for only one user and are not a valid
1692      response for requests by other users. A private (non-shared) cache
1693      &MAY; cache the response.
1694    </t><t>
1695       <x:h>Note:</x:h> This usage of the word private only controls where the
1696       response may be cached, and cannot ensure the privacy of the
1697       message content.
1698  </t></list>
1701  <iref item="Cache Directives" subitem="no-cache" primary="true"/>
1702  <iref item="no-cache" subitem="Cache Directive" primary="true"/>
1703   no-cache
1704  <list><t>
1705       If the no-cache directive does not specify a field-name, then a
1706      cache &MUST-NOT; use the response to satisfy a subsequent request
1707      without successful revalidation with the origin server. This
1708      allows an origin server to prevent caching even by caches that
1709      have been configured to return stale responses to client requests.
1710    </t><t>
1711      If the no-cache directive does specify one or more field-names,
1712      then a cache &MAY; use the response to satisfy a subsequent request,
1713      subject to any other restrictions on caching. However, the
1714      specified field-name(s) &MUST-NOT; be sent in the response to a
1715      subsequent request without successful revalidation with the origin
1716      server. This allows an origin server to prevent the re-use of
1717      certain header fields in a response, while still allowing caching
1718      of the rest of the response.
1719    <list><t>
1720       <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this
1721       directive.
1722    </t></list>
1723  </t></list>
1727<section title="What May be Stored by Caches" anchor="">
1729  <iref item="Cache Directives" subitem="no-store" primary="true"/>
1730  <iref item="no-store" subitem="Cache Directive" primary="true"/>
1731   no-store
1732  <list><t>   
1733      The purpose of the no-store directive is to prevent the
1734      inadvertent release or retention of sensitive information (for
1735      example, on backup tapes). The no-store directive applies to the
1736      entire message, and &MAY; be sent either in a response or in a
1737      request. If sent in a request, a cache &MUST-NOT; store any part of
1738      either this request or any response to it. If sent in a response,
1739      a cache &MUST-NOT; store any part of either this response or the
1740      request that elicited it. This directive applies to both non-shared
1741      and shared caches. "&MUST-NOT; store" in this context means
1742      that the cache &MUST-NOT; intentionally store the information in
1743      non-volatile storage, and &MUST; make a best-effort attempt to
1744      remove the information from volatile storage as promptly as
1745      possible after forwarding it.
1746  </t><t>
1747      Even when this directive is associated with a response, users
1748      might explicitly store such a response outside of the caching
1749      system (e.g., with a "Save As" dialog). History buffers &MAY; store
1750      such responses as part of their normal operation.
1751  </t><t>
1752      The purpose of this directive is to meet the stated requirements
1753      of certain users and service authors who are concerned about
1754      accidental releases of information via unanticipated accesses to
1755      cache data structures. While the use of this directive might
1756      improve privacy in some cases, we caution that it is NOT in any
1757      way a reliable or sufficient mechanism for ensuring privacy. In
1758      particular, malicious or compromised caches might not recognize or
1759      obey this directive, and communications networks might be
1760      vulnerable to eavesdropping.
1761  </t></list>
1765<section title="Modifications of the Basic Expiration Mechanism" anchor="modifications.of.the.basic.expiration.mechanism">
1767   The expiration time of an entity &MAY; be specified by the origin
1768   server using the Expires header (see <xref target="header.expires"/>). Alternatively,
1769   it &MAY; be specified using the max-age directive in a response. When
1770   the max-age cache-control directive is present in a cached response,
1771   the response is stale if its current age is greater than the age
1772   value given (in seconds) at the time of a new request for that
1773   resource. The max-age directive on a response implies that the
1774   response is cacheable (i.e., "public") unless some other, more
1775   restrictive cache directive is also present.
1778   If a response includes both an Expires header and a max-age
1779   directive, the max-age directive overrides the Expires header, even
1780   if the Expires header is more restrictive. This rule allows an origin
1781   server to provide, for a given response, a longer expiration time to
1782   an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be
1783   useful if certain HTTP/1.0 caches improperly calculate ages or
1784   expiration times, perhaps due to desynchronized clocks.
1787   Many HTTP/1.0 cache implementations will treat an Expires value that
1788   is less than or equal to the response Date value as being equivalent
1789   to the Cache-Control response directive "no-cache". If an HTTP/1.1
1790   cache receives such a response, and the response does not include a
1791   Cache-Control header field, it &SHOULD; consider the response to be
1792   non-cacheable in order to retain compatibility with HTTP/1.0 servers.
1793  <list><t>
1794       <x:h>Note:</x:h> An origin server might wish to use a relatively new HTTP
1795       cache control feature, such as the "private" directive, on a
1796       network including older caches that do not understand that
1797       feature. The origin server will need to combine the new feature
1798       with an Expires field whose value is less than or equal to the
1799       Date value. This will prevent older caches from improperly
1800       caching the response.
1801  </t></list>
1804  <iref item="Cache Directives" subitem="s-maxage" primary="true"/>
1805  <iref item="s-maxage" subitem="Cache Directive" primary="true"/>
1806   s-maxage
1807  <list><t>
1808       If a response includes an s-maxage directive, then for a shared
1809       cache (but not for a private cache), the maximum age specified by
1810       this directive overrides the maximum age specified by either the
1811       max-age directive or the Expires header. The s-maxage directive
1812       also implies the semantics of the proxy-revalidate directive (see
1813       <xref target="cache.revalidation.and.reload.controls"/>), i.e., that the shared cache must not use the
1814       entry after it becomes stale to respond to a subsequent request
1815       without first revalidating it with the origin server. The s-maxage
1816       directive is always ignored by a private cache.
1817  </t></list>
1820   Note that most older caches, not compliant with this specification,
1821   do not implement any cache-control directives. An origin server
1822   wishing to use a cache-control directive that restricts, but does not
1823   prevent, caching by an HTTP/1.1-compliant cache &MAY; exploit the
1824   requirement that the max-age directive overrides the Expires header,
1825   and the fact that pre-HTTP/1.1-compliant caches do not observe the
1826   max-age directive.
1829   Other directives allow a user agent to modify the basic expiration
1830   mechanism. These directives &MAY; be specified on a request:
1833  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1834  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1835   max-age
1836  <list><t>
1837      Indicates that the client is willing to accept a response whose
1838      age is no greater than the specified time in seconds. Unless max-stale
1839      directive is also included, the client is not willing to
1840      accept a stale response.
1841  </t></list>
1844  <iref item="Cache Directives" subitem="min-fresh" primary="true"/>
1845  <iref item="min-fresh" subitem="Cache Directive" primary="true"/>
1846   min-fresh
1847  <list><t>
1848      Indicates that the client is willing to accept a response whose
1849      freshness lifetime is no less than its current age plus the
1850      specified time in seconds. That is, the client wants a response
1851      that will still be fresh for at least the specified number of
1852      seconds.
1853  </t></list>
1856  <iref item="Cache Directives" subitem="max-stale" primary="true"/>
1857  <iref item="max-stale" subitem="Cache Directive" primary="true"/>
1858   max-stale
1859  <list><t>
1860      Indicates that the client is willing to accept a response that has
1861      exceeded its expiration time. If max-stale is assigned a value,
1862      then the client is willing to accept a response that has exceeded
1863      its expiration time by no more than the specified number of
1864      seconds. If no value is assigned to max-stale, then the client is
1865      willing to accept a stale response of any age.
1866  </t></list>
1869   If a cache returns a stale response, either because of a max-stale
1870   directive on a request, or because the cache is configured to
1871   override the expiration time of a response, the cache &MUST; attach a
1872   Warning header to the stale response, using Warning 110 (Response is
1873   stale).
1876   A cache &MAY; be configured to return stale responses without
1877   validation, but only if this does not conflict with any "MUST"-level
1878   requirements concerning cache validation (e.g., a "must-revalidate"
1879   cache-control directive).
1882   If both the new request and the cached entry include "max-age"
1883   directives, then the lesser of the two values is used for determining
1884   the freshness of the cached entry for that request.
1888<section title="Cache Revalidation and Reload Controls" anchor="cache.revalidation.and.reload.controls">
1890   Sometimes a user agent might want or need to insist that a cache
1891   revalidate its cache entry with the origin server (and not just with
1892   the next cache along the path to the origin server), or to reload its
1893   cache entry from the origin server. End-to-end revalidation might be
1894   necessary if either the cache or the origin server has overestimated
1895   the expiration time of the cached response. End-to-end reload may be
1896   necessary if the cache entry has become corrupted for some reason.
1899   End-to-end revalidation may be requested either when the client does
1900   not have its own local cached copy, in which case we call it
1901   "unspecified end-to-end revalidation", or when the client does have a
1902   local cached copy, in which case we call it "specific end-to-end
1903   revalidation."
1906   The client can specify these three kinds of action using Cache-Control
1907   request directives:
1910   End-to-end reload
1911  <list><t>
1912      The request includes a "no-cache" cache-control directive or, for
1913      compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field
1914      names &MUST-NOT; be included with the no-cache directive in a
1915      request. The server &MUST-NOT; use a cached copy when responding to
1916      such a request.
1917  </t></list>
1920   Specific end-to-end revalidation
1921  <list><t>
1922      The request includes a "max-age=0" cache-control directive, which
1923      forces each cache along the path to the origin server to
1924      revalidate its own entry, if any, with the next cache or server.
1925      The initial request includes a cache-validating conditional with
1926      the client's current validator.
1927  </t></list>
1930   Unspecified end-to-end revalidation
1931  <list><t>
1932      The request includes "max-age=0" cache-control directive, which
1933      forces each cache along the path to the origin server to
1934      revalidate its own entry, if any, with the next cache or server.
1935      The initial request does not include a cache-validating
1936      conditional; the first cache along the path (if any) that holds a
1937      cache entry for this resource includes a cache-validating
1938      conditional with its current validator.
1939  </t></list>
1942  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1943  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1944   max-age
1945  <list><t>
1946      When an intermediate cache is forced, by means of a max-age=0
1947      directive, to revalidate its own cache entry, and the client has
1948      supplied its own validator in the request, the supplied validator
1949      might differ from the validator currently stored with the cache
1950      entry. In this case, the cache &MAY; use either validator in making
1951      its own request without affecting semantic transparency.
1952  </t><t>
1953      However, the choice of validator might affect performance. The
1954      best approach is for the intermediate cache to use its own
1955      validator when making its request. If the server replies with 304
1956      (Not Modified), then the cache can return its now validated copy
1957      to the client with a 200 (OK) response. If the server replies with
1958      a new entity and cache validator, however, the intermediate cache
1959      can compare the returned validator with the one provided in the
1960      client's request, using the strong comparison function. If the
1961      client's validator is equal to the origin server's, then the
1962      intermediate cache simply returns 304 (Not Modified). Otherwise,
1963      it returns the new entity with a 200 (OK) response.
1964  </t><t>
1965      If a request includes the no-cache directive, it &SHOULD-NOT;
1966      include min-fresh, max-stale, or max-age.
1967  </t></list>
1970  <iref item="Cache Directives" subitem="only-if-cached" primary="true"/>
1971  <iref item="only-if-cached" subitem="Cache Directive" primary="true"/>
1972   only-if-cached
1973  <list><t>
1974      In some cases, such as times of extremely poor network
1975      connectivity, a client may want a cache to return only those
1976      responses that it currently has stored, and not to reload or
1977      revalidate with the origin server. To do this, the client may
1978      include the only-if-cached directive in a request. If it receives
1979      this directive, a cache &SHOULD; either respond using a cached entry
1980      that is consistent with the other constraints of the request, or
1981      respond with a 504 (Gateway Timeout) status. However, if a group
1982      of caches is being operated as a unified system with good internal
1983      connectivity, such a request &MAY; be forwarded within that group of
1984      caches.
1985  </t></list>
1988  <iref item="Cache Directives" subitem="must-revalidate" primary="true"/>
1989  <iref item="must-revalidate" subitem="Cache Directive" primary="true"/>
1990   must-revalidate
1991  <list><t>
1992      Because a cache &MAY; be configured to ignore a server's specified
1993      expiration time, and because a client request &MAY; include a max-stale
1994      directive (which has a similar effect), the protocol also
1995      includes a mechanism for the origin server to require revalidation
1996      of a cache entry on any subsequent use. When the must-revalidate
1997      directive is present in a response received by a cache, that cache
1998      &MUST-NOT; use the entry after it becomes stale to respond to a
1999      subsequent request without first revalidating it with the origin
2000      server. (I.e., the cache &MUST; do an end-to-end revalidation every
2001      time, if, based solely on the origin server's Expires or max-age
2002      value, the cached response is stale.)
2003  </t><t>
2004      The must-revalidate directive is necessary to support reliable
2005      operation for certain protocol features. In all circumstances an
2006      HTTP/1.1 cache &MUST; obey the must-revalidate directive; in
2007      particular, if the cache cannot reach the origin server for any
2008      reason, it &MUST; generate a 504 (Gateway Timeout) response.
2009  </t><t>
2010      Servers &SHOULD; send the must-revalidate directive if and only if
2011      failure to revalidate a request on the entity could result in
2012      incorrect operation, such as a silently unexecuted financial
2013      transaction. Recipients &MUST-NOT; take any automated action that
2014      violates this directive, and &MUST-NOT; automatically provide an
2015      unvalidated copy of the entity if revalidation fails.
2016  </t><t>
2017      Although this is not recommended, user agents operating under
2018      severe connectivity constraints &MAY; violate this directive but, if
2019      so, &MUST; explicitly warn the user that an unvalidated response has
2020      been provided. The warning &MUST; be provided on each unvalidated
2021      access, and &SHOULD; require explicit user confirmation.
2022  </t></list>
2025  <iref item="Cache Directives" subitem="proxy-revalidate" primary="true"/>
2026  <iref item="proxy-revalidate" subitem="Cache Directive" primary="true"/>
2027   proxy-revalidate
2028  <list><t>
2029      The proxy-revalidate directive has the same meaning as the must-revalidate
2030      directive, except that it does not apply to non-shared
2031      user agent caches. It can be used on a response to an
2032      authenticated request to permit the user's cache to store and
2033      later return the response without needing to revalidate it (since
2034      it has already been authenticated once by that user), while still
2035      requiring proxies that service many users to revalidate each time
2036      (in order to make sure that each user has been authenticated).
2037      Note that such authenticated responses also need the public cache
2038      control directive in order to allow them to be cached at all.
2039  </t></list>
2043<section title="No-Transform Directive" anchor="no-transform.directive">
2045  <iref item="Cache Directives" subitem="no-transform" primary="true"/>
2046  <iref item="no-transform" subitem="Cache Directive" primary="true"/>
2047   no-transform
2048  <list><t>
2049      Implementors of intermediate caches (proxies) have found it useful
2050      to convert the media type of certain entity bodies. A non-transparent
2051      proxy might, for example, convert between image
2052      formats in order to save cache space or to reduce the amount of
2053      traffic on a slow link.
2054  </t><t>
2055      Serious operational problems occur, however, when these
2056      transformations are applied to entity bodies intended for certain
2057      kinds of applications. For example, applications for medical
2058      imaging, scientific data analysis and those using end-to-end
2059      authentication, all depend on receiving an entity body that is bit
2060      for bit identical to the original entity-body.
2061  </t><t>
2062      Therefore, if a message includes the no-transform directive, an
2063      intermediate cache or proxy &MUST-NOT; change those headers that are
2064      listed in <xref target="non-modifiable.headers"/> as being subject to the no-transform
2065      directive. This implies that the cache or proxy &MUST-NOT; change
2066      any aspect of the entity-body that is specified by these headers,
2067      including the value of the entity-body itself.
2068  </t></list>
2072<section title="Cache Control Extensions" anchor="cache.control.extensions">
2074   The Cache-Control header field can be extended through the use of one
2075   or more cache-extension tokens, each with an optional assigned value.
2076   Informational extensions (those which do not require a change in
2077   cache behavior) &MAY; be added without changing the semantics of other
2078   directives. Behavioral extensions are designed to work by acting as
2079   modifiers to the existing base of cache directives. Both the new
2080   directive and the standard directive are supplied, such that
2081   applications which do not understand the new directive will default
2082   to the behavior specified by the standard directive, and those that
2083   understand the new directive will recognize it as modifying the
2084   requirements associated with the standard directive. In this way,
2085   extensions to the cache-control directives can be made without
2086   requiring changes to the base protocol.
2089   This extension mechanism depends on an HTTP cache obeying all of the
2090   cache-control directives defined for its native HTTP-version, obeying
2091   certain extensions, and ignoring all directives that it does not
2092   understand.
2095   For example, consider a hypothetical new response directive called
2096   community which acts as a modifier to the private directive. We
2097   define this new directive to mean that, in addition to any non-shared
2098   cache, any cache which is shared only by members of the community
2099   named within its value may cache the response. An origin server
2100   wishing to allow the UCI community to use an otherwise private
2101   response in their shared cache(s) could do so by including
2103<figure><artwork type="example">
2104    Cache-Control: private, community="UCI"
2107   A cache seeing this header field will act correctly even if the cache
2108   does not understand the community cache-extension, since it will also
2109   see and understand the private directive and thus default to the safe
2110   behavior.
2113   Unrecognized cache-directives &MUST; be ignored; it is assumed that any
2114   cache-directive likely to be unrecognized by an HTTP/1.1 cache will
2115   be combined with standard directives (or the response's default
2116   cacheability) such that the cache behavior will remain minimally
2117   correct even if the cache does not understand the extension(s).
2122<section title="Expires" anchor="header.expires">
2123  <iref primary="true" item="Expires header" x:for-anchor=""/>
2124  <iref primary="true" item="Headers" subitem="Expires" x:for-anchor=""/>
2126   The Expires entity-header field gives the date/time after which the
2127   response is considered stale. A stale cache entry may not normally be
2128   returned by a cache (either a proxy cache or a user agent cache)
2129   unless it is first validated with the origin server (or with an
2130   intermediate cache that has a fresh copy of the entity). See <xref target="expiration.model"/>
2131   for further discussion of the expiration model.
2134   The presence of an Expires field does not imply that the original
2135   resource will change or cease to exist at, before, or after that
2136   time.
2139   The format is an absolute date and time as defined by HTTP-date in
2140   &full-date;; it &MUST; be sent in rfc1123-date format.
2142<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
2143   Expires = "Expires" ":" HTTP-date
2146   An example of its use is
2148<figure><artwork type="example">
2149   Expires: Thu, 01 Dec 1994 16:00:00 GMT
2152  <list><t>
2153      <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
2154      directive (see <xref target="modifications.of.the.basic.expiration.mechanism"/>), that directive overrides the
2155      Expires field.
2156  </t></list>
2159   HTTP/1.1 clients and caches &MUST; treat other invalid date formats,
2160   especially including the value "0", as in the past (i.e., "already
2161   expired").
2164   To mark a response as "already expired," an origin server sends an
2165   Expires date that is equal to the Date header value. (See the rules
2166   for expiration calculations in <xref target="expiration.calculations"/>.)
2169   To mark a response as "never expires," an origin server sends an
2170   Expires date approximately one year from the time the response is
2171   sent. HTTP/1.1 servers &SHOULD-NOT;  send Expires dates more than one
2172   year in the future.
2175   The presence of an Expires header field with a date value of some
2176   time in the future on a response that otherwise would by default be
2177   non-cacheable indicates that the response is cacheable, unless
2178   indicated otherwise by a Cache-Control header field (<xref target="header.cache-control"/>).
2182<section title="Pragma" anchor="header.pragma">
2183  <iref primary="true" item="Pragma header" x:for-anchor=""/>
2184  <iref primary="true" item="Headers" subitem="Pragma" x:for-anchor=""/>
2186   The Pragma general-header field is used to include implementation-specific
2187   directives that might apply to any recipient along the
2188   request/response chain. All pragma directives specify optional
2189   behavior from the viewpoint of the protocol; however, some systems
2190   &MAY; require that behavior be consistent with the directives.
2192<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"/>
2193    Pragma            = "Pragma" ":" 1#pragma-directive
2194    pragma-directive  = "no-cache" | extension-pragma
2195    extension-pragma  = token [ "=" ( token | quoted-string ) ]
2198   When the no-cache directive is present in a request message, an
2199   application &SHOULD; forward the request toward the origin server even
2200   if it has a cached copy of what is being requested. This pragma
2201   directive has the same semantics as the no-cache cache-directive (see
2202   <xref target="header.cache-control"/>) and is defined here for backward compatibility with
2203   HTTP/1.0. Clients &SHOULD; include both header fields when a no-cache
2204   request is sent to a server not known to be HTTP/1.1 compliant.
2207   Pragma directives &MUST; be passed through by a proxy or gateway
2208   application, regardless of their significance to that application,
2209   since the directives might be applicable to all recipients along the
2210   request/response chain. It is not possible to specify a pragma for a
2211   specific recipient; however, any pragma directive not relevant to a
2212   recipient &SHOULD; be ignored by that recipient.
2215   HTTP/1.1 caches &SHOULD; treat "Pragma: no-cache" as if the client had
2216   sent "Cache-Control: no-cache". No new Pragma directives will be
2217   defined in HTTP.
2218  <list><t>
2219      <x:h>Note:</x:h> because the meaning of "Pragma: no-cache as a response
2220      header field is not actually specified, it does not provide a
2221      reliable replacement for "Cache-Control: no-cache" in a response
2222  </t></list>
2226<section title="Vary" anchor="header.vary">
2227  <iref primary="true" item="Vary header" x:for-anchor=""/>
2228  <iref primary="true" item="Headers" subitem="Vary" x:for-anchor=""/>
2230   The Vary field value indicates the set of request-header fields that
2231   fully determines, while the response is fresh, whether a cache is
2232   permitted to use the response to reply to a subsequent request
2233   without revalidation. For uncacheable or stale responses, the Vary
2234   field value advises the user agent about the criteria that were used
2235   to select the representation. A Vary field value of "*" implies that
2236   a cache cannot determine from the request headers of a subsequent
2237   request whether this response is the appropriate representation. See
2238   <xref target="caching.negotiated.responses"/> for use of the Vary header field by caches.
2240<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/>
2241    Vary  = "Vary" ":" ( "*" | 1#field-name )
2244   An HTTP/1.1 server &SHOULD; include a Vary header field with any
2245   cacheable response that is subject to server-driven negotiation.
2246   Doing so allows a cache to properly interpret future requests on that
2247   resource and informs the user agent about the presence of negotiation
2248   on that resource. A server &MAY; include a Vary header field with a
2249   non-cacheable response that is subject to server-driven negotiation,
2250   since this might provide the user agent with useful information about
2251   the dimensions over which the response varies at the time of the
2252   response.
2255   A Vary field value consisting of a list of field-names signals that
2256   the representation selected for the response is based on a selection
2257   algorithm which considers ONLY the listed request-header field values
2258   in selecting the most appropriate representation. A cache &MAY; assume
2259   that the same selection will be made for future requests with the
2260   same values for the listed field names, for the duration of time for
2261   which the response is fresh.
2264   The field-names given are not limited to the set of standard
2265   request-header fields defined by this specification. Field names are
2266   case-insensitive.
2269   A Vary field value of "*" signals that unspecified parameters not
2270   limited to the request-headers (e.g., the network address of the
2271   client), play a role in the selection of the response representation.
2272   The "*" value &MUST-NOT; be generated by a proxy server; it may only be
2273   generated by an origin server.
2277<section title="Warning" anchor="header.warning">
2278  <iref primary="true" item="Warning header" x:for-anchor=""/>
2279  <iref primary="true" item="Headers" subitem="Warning" x:for-anchor=""/>
2281   The Warning general-header field is used to carry additional
2282   information about the status or transformation of a message which
2283   might not be reflected in the message. This information is typically
2284   used to warn about a possible lack of semantic transparency from
2285   caching operations or transformations applied to the entity body of
2286   the message.
2289   Warning headers are sent with responses using:
2291<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"/>
2292    Warning    = "Warning" ":" 1#warning-value
2294    warning-value = warn-code SP warn-agent SP warn-text
2295                                          [SP warn-date]
2297    warn-code  = 3DIGIT
2298    warn-agent = ( host [ ":" port ] ) | pseudonym
2299                    ; the name or pseudonym of the server adding
2300                    ; the Warning header, for use in debugging
2301    warn-text  = quoted-string
2302    warn-date  = &lt;"&gt; HTTP-date &lt;"&gt;
2305   A response &MAY; carry more than one Warning header.
2308   The warn-text &SHOULD; be in a natural language and character set that
2309   is most likely to be intelligible to the human user receiving the
2310   response. This decision &MAY; be based on any available knowledge, such
2311   as the location of the cache or user, the Accept-Language field in a
2312   request, the Content-Language field in a response, etc. The default
2313   language is English and the default character set is ISO-8859-1.
2316   If a character set other than ISO-8859-1 is used, it &MUST; be encoded
2317   in the warn-text using the method described in <xref target="RFC2047"/>.
2320   Warning headers can in general be applied to any message, however
2321   some specific warn-codes are specific to caches and can only be
2322   applied to response messages. New Warning headers &SHOULD; be added
2323   after any existing Warning headers. A cache &MUST-NOT; delete any
2324   Warning header that it received with a message. However, if a cache
2325   successfully validates a cache entry, it &SHOULD; remove any Warning
2326   headers previously attached to that entry except as specified for
2327   specific Warning codes. It &MUST; then add any Warning headers received
2328   in the validating response. In other words, Warning headers are those
2329   that would be attached to the most recent relevant response.
2332   When multiple Warning headers are attached to a response, the user
2333   agent ought to inform the user of as many of them as possible, in the
2334   order that they appear in the response. If it is not possible to
2335   inform the user of all of the warnings, the user agent &SHOULD; follow
2336   these heuristics:
2337  <list style="symbols">
2338    <t>Warnings that appear early in the response take priority over
2339        those appearing later in the response.</t>
2341    <t>Warnings in the user's preferred character set take priority
2342        over warnings in other character sets but with identical warn-codes
2343        and warn-agents.</t>
2344  </list>
2347   Systems that generate multiple Warning headers &SHOULD; order them with
2348   this user agent behavior in mind.
2351   Requirements for the behavior of caches with respect to Warnings are
2352   stated in <xref target="warnings"/>.
2355   This is a list of the currently-defined warn-codes, each with a
2356   recommended warn-text in English, and a description of its meaning.
2359   110 Response is stale
2360  <list><t>
2361     &MUST; be included whenever the returned response is stale.
2362  </t></list>
2365   111 Revalidation failed
2366  <list><t>
2367     &MUST; be included if a cache returns a stale response because an
2368     attempt to revalidate the response failed, due to an inability to
2369     reach the server.
2370  </t></list>
2373   112 Disconnected operation
2374  <list><t>
2375     &SHOULD; be included if the cache is intentionally disconnected from
2376     the rest of the network for a period of time.
2377  </t></list>
2380   113 Heuristic expiration
2381  <list><t>
2382     &MUST; be included if the cache heuristically chose a freshness
2383     lifetime greater than 24 hours and the response's age is greater
2384     than 24 hours.
2385  </t></list>
2388   199 Miscellaneous warning
2389  <list><t>
2390     The warning text &MAY; include arbitrary information to be presented
2391     to a human user, or logged. A system receiving this warning &MUST-NOT;
2392     take any automated action, besides presenting the warning to
2393     the user.
2394  </t></list>
2397   214 Transformation applied
2398  <list><t>
2399     &MUST; be added by an intermediate cache or proxy if it applies any
2400     transformation changing the content-coding (as specified in the
2401     Content-Encoding header) or media-type (as specified in the
2402     Content-Type header) of the response, or the entity-body of the
2403     response, unless this Warning code already appears in the response.
2404  </t></list>
2407   299 Miscellaneous persistent warning
2408  <list><t>
2409     The warning text &MAY; include arbitrary information to be presented
2410     to a human user, or logged. A system receiving this warning &MUST-NOT;
2411     take any automated action.
2412  </t></list>
2415   If an implementation sends a message with one or more Warning headers
2416   whose version is HTTP/1.0 or lower, then the sender &MUST; include in
2417   each warning-value a warn-date that matches the date in the response.
2420   If an implementation receives a message with a warning-value that
2421   includes a warn-date, and that warn-date is different from the Date
2422   value in the response, then that warning-value &MUST; be deleted from
2423   the message before storing, forwarding, or using it. (This prevents
2424   bad consequences of naive caching of Warning header fields.) If all
2425   of the warning-values are deleted for this reason, the Warning header
2426   &MUST; be deleted as well.
2432<section title="IANA Considerations" anchor="IANA.considerations">
2434   TBD.
2438<section title="Security Considerations" anchor="security.considerations">
2440   Caching proxies provide additional potential vulnerabilities, since
2441   the contents of the cache represent an attractive target for
2442   malicious exploitation. Because cache contents persist after an HTTP
2443   request is complete, an attack on the cache can reveal information
2444   long after a user believes that the information has been removed from
2445   the network. Therefore, cache contents should be protected as
2446   sensitive information.
2450<section title="Acknowledgments" anchor="ack">
2452   Much of the content and presentation of the caching design is due to
2453   suggestions and comments from individuals including: Shel Kaphan,
2454   Paul Leach, Koen Holtman, David Morris, and Larry Masinter.
2461<reference anchor="Part1">
2462   <front>
2463      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2464      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2465         <organization abbrev="Day Software">Day Software</organization>
2466         <address><email></email></address>
2467      </author>
2468      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2469         <organization>One Laptop per Child</organization>
2470         <address><email></email></address>
2471      </author>
2472      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2473         <organization abbrev="HP">Hewlett-Packard Company</organization>
2474         <address><email></email></address>
2475      </author>
2476      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2477         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2478         <address><email></email></address>
2479      </author>
2480      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2481         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2482         <address><email></email></address>
2483      </author>
2484      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2485         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2486         <address><email></email></address>
2487      </author>
2488      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2489         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2490         <address><email></email></address>
2491      </author>
2492      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2493         <organization abbrev="W3C">World Wide Web Consortium</organization>
2494         <address><email></email></address>
2495      </author>
2496      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2497         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2498         <address><email></email></address>
2499      </author>
2500      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2501   </front>
2502   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
2503   <x:source href="p1-messaging.xml" basename="p1-messaging"/>
2506<reference anchor="Part2">
2507   <front>
2508      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2509      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2510         <organization abbrev="Day Software">Day Software</organization>
2511         <address><email></email></address>
2512      </author>
2513      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2514         <organization>One Laptop per Child</organization>
2515         <address><email></email></address>
2516      </author>
2517      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2518         <organization abbrev="HP">Hewlett-Packard Company</organization>
2519         <address><email></email></address>
2520      </author>
2521      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2522         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2523         <address><email></email></address>
2524      </author>
2525      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2526         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2527         <address><email></email></address>
2528      </author>
2529      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2530         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2531         <address><email></email></address>
2532      </author>
2533      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2534         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2535         <address><email></email></address>
2536      </author>
2537      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2538         <organization abbrev="W3C">World Wide Web Consortium</organization>
2539         <address><email></email></address>
2540      </author>
2541      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2542         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2543         <address><email></email></address>
2544      </author>
2545      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2546   </front>
2547   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
2548   <x:source href="p2-semantics.xml" basename="p2-semantics"/>
2551<reference anchor="Part3">
2552   <front>
2553      <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2554      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2555         <organization abbrev="Day Software">Day Software</organization>
2556         <address><email></email></address>
2557      </author>
2558      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2559         <organization>One Laptop per Child</organization>
2560         <address><email></email></address>
2561      </author>
2562      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2563         <organization abbrev="HP">Hewlett-Packard Company</organization>
2564         <address><email></email></address>
2565      </author>
2566      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2567         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2568         <address><email></email></address>
2569      </author>
2570      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2571         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2572         <address><email></email></address>
2573      </author>
2574      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2575         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2576         <address><email></email></address>
2577      </author>
2578      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2579         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2580         <address><email></email></address>
2581      </author>
2582      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2583         <organization abbrev="W3C">World Wide Web Consortium</organization>
2584         <address><email></email></address>
2585      </author>
2586      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2587         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2588         <address><email></email></address>
2589      </author>
2590      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2591   </front>
2592   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
2593   <x:source href="p3-payload.xml" basename="p3-payload"/>
2596<reference anchor="Part4">
2597   <front>
2598      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2599      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2600         <organization abbrev="Day Software">Day Software</organization>
2601         <address><email></email></address>
2602      </author>
2603      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2604         <organization>One Laptop per Child</organization>
2605         <address><email></email></address>
2606      </author>
2607      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2608         <organization abbrev="HP">Hewlett-Packard Company</organization>
2609         <address><email></email></address>
2610      </author>
2611      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2612         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2613         <address><email></email></address>
2614      </author>
2615      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2616         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2617         <address><email></email></address>
2618      </author>
2619      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2620         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2621         <address><email></email></address>
2622      </author>
2623      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2624         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2625         <address><email></email></address>
2626      </author>
2627      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2628         <organization abbrev="W3C">World Wide Web Consortium</organization>
2629         <address><email></email></address>
2630      </author>
2631      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2632         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2633         <address><email></email></address>
2634      </author>
2635      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2636   </front>
2637   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
2638   <x:source href="p4-conditional.xml" basename="p4-conditional"/>
2641<reference anchor="Part5">
2642   <front>
2643      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2644      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2645         <organization abbrev="Day Software">Day Software</organization>
2646         <address><email></email></address>
2647      </author>
2648      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2649         <organization>One Laptop per Child</organization>
2650         <address><email></email></address>
2651      </author>
2652      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2653         <organization abbrev="HP">Hewlett-Packard Company</organization>
2654         <address><email></email></address>
2655      </author>
2656      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2657         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2658         <address><email></email></address>
2659      </author>
2660      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2661         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2662         <address><email></email></address>
2663      </author>
2664      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2665         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2666         <address><email></email></address>
2667      </author>
2668      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2669         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2670         <address><email></email></address>
2671      </author>
2672      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2673         <organization abbrev="W3C">World Wide Web Consortium</organization>
2674         <address><email></email></address>
2675      </author>
2676      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2677         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2678         <address><email></email></address>
2679      </author>
2680      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2681   </front>
2682   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
2683   <x:source href="p5-range.xml" basename="p5-range"/>
2686<reference anchor="Part7">
2687   <front>
2688      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2689      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2690         <organization abbrev="Day Software">Day Software</organization>
2691         <address><email></email></address>
2692      </author>
2693      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2694         <organization>One Laptop per Child</organization>
2695         <address><email></email></address>
2696      </author>
2697      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2698         <organization abbrev="HP">Hewlett-Packard Company</organization>
2699         <address><email></email></address>
2700      </author>
2701      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2702         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2703         <address><email></email></address>
2704      </author>
2705      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2706         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2707         <address><email></email></address>
2708      </author>
2709      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2710         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2711         <address><email></email></address>
2712      </author>
2713      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2714         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2715         <address><email></email></address>
2716      </author>
2717      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2718         <organization abbrev="W3C">World Wide Web Consortium</organization>
2719         <address><email></email></address>
2720      </author>
2721      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2722         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2723         <address><email></email></address>
2724      </author>
2725      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2726   </front>
2727   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;"/>
2728   <x:source href="p7-auth.xml" basename="p7-auth"/>
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"/>
2744<reference anchor="RFC2616">
2745   <front>
2746      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2747      <author initials="R." surname="Fielding" fullname="R. Fielding">
2748         <organization>University of California, Irvine</organization>
2749         <address><email></email></address>
2750      </author>
2751      <author initials="J." surname="Gettys" fullname="J. Gettys">
2752         <organization>W3C</organization>
2753         <address><email></email></address>
2754      </author>
2755      <author initials="J." surname="Mogul" fullname="J. Mogul">
2756         <organization>Compaq Computer Corporation</organization>
2757         <address><email></email></address>
2758      </author>
2759      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2760         <organization>MIT Laboratory for Computer Science</organization>
2761         <address><email></email></address>
2762      </author>
2763      <author initials="L." surname="Masinter" fullname="L. Masinter">
2764         <organization>Xerox Corporation</organization>
2765         <address><email></email></address>
2766      </author>
2767      <author initials="P." surname="Leach" fullname="P. Leach">
2768         <organization>Microsoft Corporation</organization>
2769         <address><email></email></address>
2770      </author>
2771      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2772         <organization>W3C</organization>
2773         <address><email></email></address>
2774      </author>
2775      <date month="June" year="1999"/>
2776   </front>
2777   <seriesInfo name="RFC" value="2616"/>
2780<reference anchor="RFC2047">
2781  <front>
2782    <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
2783    <author initials="K." surname="Moore" fullname="Keith Moore">
2784      <organization>University of Tennessee</organization>
2785      <address><email></email></address>
2786    </author>
2787    <date month="November" year="1996"/>
2788  </front>
2789  <seriesInfo name="RFC" value="2047"/>
2792<reference anchor="RFC1305">
2794<title>Network Time Protocol (Version 3) Specification, Implementation</title>
2795<author initials="D." surname="Mills" fullname="David L. Mills">
2796<organization>University of Delaware, Electrical Engineering Department</organization>
2804<phone>+1 302 451 8247</phone>
2806<date month="March" year="1992"/>
2808<t>This document describes the Network Time Protocol (NTP), specifies its normal structure and summarizes information useful for its implementation. NTP provides the mechanisms to synchronize time and coordinate time distribution in a large, diverse internet operating at rates from mundane to lightwave. It uses a returnable-time design in which a distributed subnet of time servers operating in a self-organizing, hierarchical-master-slave configuration synchronizes local clocks within the subnet and to national time standards via wire or radio. The servers can also redistribute reference time via local routing algorithms and time daemons.</t></abstract></front>
2809<seriesInfo name="RFC" value="1305"/>
2814<section title="Compatibility with Previous Versions" anchor="compatibility">
2816<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2818   A case was missed in the Cache-Control model of HTTP/1.1; s-maxage
2819   was introduced to add this missing case. (Sections <xref target="response.cacheability" format="counter"/>,
2820   <xref target="header.cache-control" format="counter"/>,
2821   <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>)
2824   The Cache-Control: max-age directive was not properly defined for
2825   responses. (<xref target="modifications.of.the.basic.expiration.mechanism"/>)
2828   Warnings could be cached incorrectly, or not updated appropriately.
2829   (Section <xref target="warnings" format="counter"/>, <xref target="expiration.calculations" format="counter"/>, <xref target="non-modifiable.headers" format="counter"/>,
2830   <xref target="combining.headers" format="counter"/>, <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>,
2831   and <xref target="header.warning" format="counter"/>) Warning
2832   also needed to be a general header, as PUT or other methods may have
2833   need for it in requests.
2837<section title="Changes from RFC 2616" anchor="changes.from.rfc.2616">
Note: See TracBrowser for help on using the repository browser.