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

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

List Yves Lafon & Julian Reschke as Editors everywhere, remove specific ack for Julian.

  • Property svn:eol-style set to native
File size: 125.4 KB
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE rfc [
3  <!ENTITY MAY "<bcp14 xmlns=''>MAY</bcp14>">
4  <!ENTITY MUST "<bcp14 xmlns=''>MUST</bcp14>">
5  <!ENTITY MUST-NOT "<bcp14 xmlns=''>MUST NOT</bcp14>">
6  <!ENTITY OPTIONAL "<bcp14 xmlns=''>OPTIONAL</bcp14>">
7  <!ENTITY RECOMMENDED "<bcp14 xmlns=''>RECOMMENDED</bcp14>">
8  <!ENTITY REQUIRED "<bcp14 xmlns=''>REQUIRED</bcp14>">
9  <!ENTITY SHALL "<bcp14 xmlns=''>SHALL</bcp14>">
10  <!ENTITY SHALL-NOT "<bcp14 xmlns=''>SHALL NOT</bcp14>">
11  <!ENTITY SHOULD "<bcp14 xmlns=''>SHOULD</bcp14>">
12  <!ENTITY SHOULD-NOT "<bcp14 xmlns=''>SHOULD NOT</bcp14>">
13  <!ENTITY ID-VERSION "latest">
14  <!ENTITY ID-MONTH "December">
15  <!ENTITY ID-YEAR "2007">
16  <!ENTITY messaging                   "<xref target='Part1' xmlns:x=''/>">
17  <!ENTITY combining-byte-ranges       "<xref target='Part5' x:rel='#combining.byte.ranges' xmlns:x=''/>">
18  <!ENTITY entity-length               "<xref target='Part3' x:rel='#entity.length' xmlns:x=''/>">
19  <!ENTITY entity-tags                 "<xref target='Part4' x:rel='#entity.tags' xmlns:x=''/>">
20  <!ENTITY full-date                   "<xref target='Part1' x:rel='' xmlns:x=''/>">
21  <!ENTITY header-authorization        "<xref target='Part7' x:rel='#header.authorization' xmlns:x=''/>">
22  <!ENTITY header-connection           "<xref target='Part1' x:rel='#header.connection' xmlns:x=''/>">
23  <!ENTITY header-date                 "<xref target='Part1' x:rel='' xmlns:x=''/>">
24  <!ENTITY weak-and-strong-validators  "<xref target='Part4' x:rel='#weak.and.strong.validators' xmlns:x=''/>">
25  <!ENTITY message-headers             "<xref target='Part1' x:rel='#message.headers' xmlns:x=''/>">
26  <!ENTITY message-length              "<xref target='Part1' x:rel='#message.length' xmlns:x=''/>">
27  <!ENTITY safe-methods                "<xref target='Part2' x:rel='#safe.methods' xmlns:x=''/>">
28  <!ENTITY server-driven-negotiation   "<xref target='Part3' x:rel='#server-driven.negotiation' xmlns:x=''/>">
30<?rfc toc="yes" ?>
31<?rfc symrefs="yes" ?>
32<?rfc sortrefs="yes" ?>
33<?rfc compact="yes"?>
34<?rfc subcompact="no" ?>
35<?rfc linkmailto="no" ?>
36<?rfc editing="no" ?>
37<?rfc-ext allow-markup-in-artwork="yes" ?>
38<?rfc-ext include-references-in-index="yes" ?>
39<rfc obsoletes="2068, 2616" category="std"
40     ipr="full3978" docName="draft-ietf-httpbis-p6-cache-&ID-VERSION;"
41     xmlns:x='' xmlns:ed="">
44  <title abbrev="HTTP/1.1, part 6">HTTP/1.1, part 6: Caching</title>
46  <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
47    <organization abbrev="Day Software">Day Software</organization>
48    <address>
49      <postal>
50        <street>23 Corporate Plaza DR, Suite 280</street>
51        <city>Newport Beach</city>
52        <region>CA</region>
53        <code>92660</code>
54        <country>USA</country>
55      </postal>
56      <phone>+1-949-706-5300</phone>
57      <facsimile>+1-949-706-5305</facsimile>
58      <email></email>
59      <uri></uri>
60    </address>
61  </author>
63  <author initials="J." surname="Gettys" fullname="Jim Gettys">
64    <organization>One Laptop per Child</organization>
65    <address>
66      <postal>
67        <street>21 Oak Knoll Road</street>
68        <city>Carlisle</city>
69        <region>MA</region>
70        <code>01741</code>
71        <country>USA</country>
72      </postal>
73      <email></email>
74      <uri></uri>
75    </address>
76  </author>
78  <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
79    <organization abbrev="HP">Hewlett-Packard Company</organization>
80    <address>
81      <postal>
82        <street>HP Labs, Large Scale Systems Group</street>
83        <street>1501 Page Mill Road, MS 1177</street>
84        <city>Palo Alto</city>
85        <region>CA</region>
86        <code>94304</code>
87        <country>USA</country>
88      </postal>
89      <email></email>
90    </address>
91  </author>
93  <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
94    <organization abbrev="Microsoft">Microsoft Corporation</organization>
95    <address>
96      <postal>
97        <street>1 Microsoft Way</street>
98        <city>Redmond</city>
99        <region>WA</region>
100        <code>98052</code>
101        <country>USA</country>
102      </postal>
103      <email></email>
104    </address>
105  </author>
107  <author initials="L." surname="Masinter" fullname="Larry Masinter">
108    <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
109    <address>
110      <postal>
111        <street>345 Park Ave</street>
112        <city>San Jose</city>
113        <region>CA</region>
114        <code>95110</code>
115        <country>USA</country>
116      </postal>
117      <email></email>
118      <uri></uri>
119    </address>
120  </author>
122  <author initials="P." surname="Leach" fullname="Paul J. Leach">
123    <organization abbrev="Microsoft">Microsoft Corporation</organization>
124    <address>
125      <postal>
126        <street>1 Microsoft Way</street>
127        <city>Redmond</city>
128        <region>WA</region>
129        <code>98052</code>
130      </postal>
131      <email></email>
132    </address>
133  </author>
135  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
136    <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
137    <address>
138      <postal>
139        <street>MIT Computer Science and Artificial Intelligence Laboratory</street>
140        <street>The Stata Center, Building 32</street>
141        <street>32 Vassar Street</street>
142        <city>Cambridge</city>
143        <region>MA</region>
144        <code>02139</code>
145        <country>USA</country>
146      </postal>
147      <email></email>
148      <uri></uri>
149    </address>
150  </author>
152  <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
153    <organization abbrev="W3C">World Wide Web Consortium</organization>
154    <address>
155      <postal>
156        <street>W3C / ERCIM</street>
157        <street>2004, rte des Lucioles</street>
158        <city>Sophia-Antipolis</city>
159        <region>AM</region>
160        <code>06902</code>
161        <country>France</country>
162      </postal>
163      <email></email>
164      <uri></uri>
165    </address>
166  </author>
168  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
169    <organization abbrev="greenbytes">greenbytes GmbH</organization>
170    <address>
171      <postal>
172        <street>Hafenweg 16</street>
173        <city>Muenster</city><region>NW</region><code>48155</code>
174        <country>Germany</country>
175      </postal>
176      <phone>+49 251 2807760</phone>   
177      <facsimile>+49 251 2807761</facsimile>   
178      <email></email>       
179      <uri></uri>     
180    </address>
181  </author>
183  <date month="&ID-MONTH;" year="&ID-YEAR;"/>
187   The Hypertext Transfer Protocol (HTTP) is an application-level
188   protocol for distributed, collaborative, hypermedia information
189   systems. HTTP has been in use by the World Wide Web global information
190   initiative since 1990. This document is Part 6 of the seven-part specification
191   that defines the protocol referred to as "HTTP/1.1" and, taken together,
192   obsoletes RFC 2616.  Part 6 defines requirements on HTTP caches
193   and the associated header fields that control cache behavior or indicate
194   cacheable response messages.
198<note title="Editorial Note (To be removed by RFC Editor)">
199  <t>
200    This version of the HTTP specification contains only minimal editorial
201    changes from <xref target="RFC2616"/> (abstract, introductory paragraph,
202    and authors' addresses).  All other changes are due to partitioning the
203    original into seven mostly independent parts.  The intent is for readers
204    of future drafts to able to use draft 00 as the basis for comparison
205    when the WG makes later changes to the specification text.  This draft
206    will shortly be followed by draft 01 (containing the first round of changes
207    that have already been agreed to on the mailing list). There is no point in
208    reviewing this draft other than to verify that the partitioning has been
209    done correctly.  Roy T. Fielding, Yves Lafon, and Julian Reschke
210    will be the editors after draft 00 is submitted.
211  </t>
212  <t>
213    Discussion of this draft should take place on the HTTPBIS working group
214    mailing list ( The current issues list is
215    at <eref target=""/>
216    and related documents (including fancy diffs) can be found at
217    <eref target=""/>.
218  </t>
222<section title="Introduction" anchor="introduction">
224   This document will define aspects of HTTP related to caching response
225   messages.  Right now it only includes the extracted relevant sections
226   of <xref target="RFC2616">RFC 2616</xref> without edit.
229<section title="Terminology" anchor="intro.terminology">
231   This specification uses a number of terms to refer to the roles
232   played by participants in, and objects of, the HTTP communication.
235  <iref item="cache"/>
236  <x:dfn>cache</x:dfn>
237  <list>
238    <t>
239      A program's local store of response messages and the subsystem
240      that controls its message storage, retrieval, and deletion. A
241      cache stores cacheable responses in order to reduce the response
242      time and network bandwidth consumption on future, equivalent
243      requests. Any client or server may include a cache, though a cache
244      cannot be used by a server that is acting as a tunnel.
245    </t>
246  </list>
249  <iref item="cacheable"/>
250  <x:dfn>cacheable</x:dfn>
251  <list>
252    <t>
253      A response is cacheable if a cache is allowed to store a copy of
254      the response message for use in answering subsequent requests. The
255      rules for determining the cacheability of HTTP responses are
256      defined in <xref target="caching"/>. Even if a resource is cacheable, there may
257      be additional constraints on whether a cache can use the cached
258      copy for a particular request.
259    </t>
260  </list>
263  <iref item="first-hand"/>
264  <x:dfn>first-hand</x:dfn>
265  <list>
266    <t>
267      A response is first-hand if it comes directly and without
268      unnecessary delay from the origin server, perhaps via one or more
269      proxies. A response is also first-hand if its validity has just
270      been checked directly with the origin server.
271    </t>
272  </list>
275  <iref item="explicit expiration time"/>
276  <x:dfn>explicit expiration time</x:dfn>
277  <list>
278    <t>
279      The time at which the origin server intends that an entity should
280      no longer be returned by a cache without further validation.
281    </t>
282  </list>
285  <iref item="heuristic expiration time"/>
286  <x:dfn>heuristic expiration time</x:dfn>
287  <list>
288    <t>
289      An expiration time assigned by a cache when no explicit expiration
290      time is available.
291    </t>
292  </list>
295  <iref item="age"/>
296  <x:dfn>age</x:dfn>
297  <list>
298    <t>
299      The age of a response is the time since it was sent by, or
300      successfully validated with, the origin server.
301    </t>
302  </list>
305  <iref item="freshness lifetime"/>
306  <x:dfn>freshness lifetime</x:dfn>
307  <list>
308    <t>
309      The length of time between the generation of a response and its
310      expiration time.
311    </t>
312  </list>
315  <iref item="fresh"/>
316  <x:dfn>fresh</x:dfn>
317  <list>
318    <t>
319      A response is fresh if its age has not yet exceeded its freshness
320      lifetime.
321    </t>
322  </list>
325  <iref item="stale"/>
326  <x:dfn>stale</x:dfn>
327  <list>
328    <t>
329      A response is stale if its age has passed its freshness lifetime.
330    </t>
331  </list>
334  <iref item="semantically transparent"/>
335  <x:dfn>semantically transparent</x:dfn>
336  <list>
337    <t>
338      A cache behaves in a "semantically transparent" manner, with
339      respect to a particular response, when its use affects neither the
340      requesting client nor the origin server, except to improve
341      performance. When a cache is semantically transparent, the client
342      receives exactly the same response (except for hop-by-hop headers)
343      that it would have received had its request been handled directly
344      by the origin server.
345    </t>
346  </list>
349  <iref item="validator"/>
350  <x:dfn>validator</x:dfn>
351  <list>
352    <t>
353      A protocol element (e.g., an entity tag or a Last-Modified time)
354      that is used to find out whether a cache entry is an equivalent
355      copy of an entity.
356    </t>
357  </list>
361<section title="Delta Seconds" anchor="delta.seconds">
363   Some HTTP header fields allow a time value to be specified as an
364   integer number of seconds, represented in decimal, after the time
365   that the message was received.
367<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="delta-seconds"/>
368    delta-seconds  = 1*DIGIT
373<section title="Caching in HTTP" anchor="caching">
374<section title="Overview" anchor="caching.overview">
376   HTTP is typically used for distributed information systems, where
377   performance can be improved by the use of response caches. The
378   HTTP/1.1 protocol includes a number of elements intended to make
379   caching work as well as possible. Because these elements are
380   inextricable from other aspects of the protocol, and because they
381   interact with each other, it is useful to describe the basic caching
382   design of HTTP separately from the detailed descriptions of methods,
383   headers, response codes, etc.
386   Caching would be useless if it did not significantly improve
387   performance. The goal of caching in HTTP/1.1 is to eliminate the need
388   to send requests in many cases, and to eliminate the need to send
389   full responses in many other cases. The former reduces the number of
390   network round-trips required for many operations; we use an
391   "expiration" mechanism for this purpose (see <xref target="expiration.model"/>). The
392   latter reduces network bandwidth requirements; we use a "validation"
393   mechanism for this purpose (see <xref target="validation.model"/>).
396   Requirements for performance, availability, and disconnected
397   operation require us to be able to relax the goal of semantic
398   transparency. The HTTP/1.1 protocol allows origin servers, caches,
399   and clients to explicitly reduce transparency when necessary.
400   However, because non-transparent operation may confuse non-expert
401   users, and might be incompatible with certain server applications
402   (such as those for ordering merchandise), the protocol requires that
403   transparency be relaxed
404  <list style="symbols">
405     <t>only by an explicit protocol-level request when relaxed by
406        client or origin server</t>
408     <t>only with an explicit warning to the end user when relaxed by
409        cache or client</t>
410  </list>
413   Therefore, the HTTP/1.1 protocol provides these important elements:
414  <list style="numbers">
415      <t>Protocol features that provide full semantic transparency when
416         this is required by all parties.</t>
418      <t>Protocol features that allow an origin server or user agent to
419         explicitly request and control non-transparent operation.</t>
421      <t>Protocol features that allow a cache to attach warnings to
422         responses that do not preserve the requested approximation of
423         semantic transparency.</t>
424  </list>
427   A basic principle is that it must be possible for the clients to
428   detect any potential relaxation of semantic transparency.
429  <list><t>
430      <x:h>Note:</x:h> The server, cache, or client implementor might be faced with
431      design decisions not explicitly discussed in this specification.
432      If a decision might affect semantic transparency, the implementor
433      ought to err on the side of maintaining transparency unless a
434      careful and complete analysis shows significant benefits in
435      breaking transparency.
436    </t></list>
439<section title="Cache Correctness" anchor="cache.correctness">
441   A correct cache &MUST; respond to a request with the most up-to-date
442   response held by the cache that is appropriate to the request (see
443   sections <xref target="disambiguating.expiration.values" format="counter"/>,
444   <xref target="disambiguating.multiple.responses" format="counter"/>,
445   and <xref target="cache.replacement" format="counter"/>) which meets one of the following
446   conditions:
447  <list style="numbers">
448      <t>It has been checked for equivalence with what the origin server
449         would have returned by revalidating the response with the
450         origin server (<xref target="validation.model"/>);</t>
452      <t>It is "fresh enough" (see <xref target="expiration.model"/>). In the default case,
453         this means it meets the least restrictive freshness requirement
454         of the client, origin server, and cache (see <xref target="header.cache-control"/>); if
455         the origin server so specifies, it is the freshness requirement
456         of the origin server alone.
458         If a stored response is not "fresh enough" by the most
459         restrictive freshness requirement of both the client and the
460         origin server, in carefully considered circumstances the cache
461         &MAY; still return the response with the appropriate Warning
462         header (see section <xref target="" format="counter"/>
463         and <xref target="header.warning" format="counter"/>), unless such a response
464         is prohibited (e.g., by a "no-store" cache-directive, or by a
465         "no-cache" cache-request-directive; see <xref target="header.cache-control"/>).</t>
467      <t>It is an appropriate 304 (Not Modified), 305 (Proxy Redirect),
468         or error (4xx or 5xx) response message.</t>
469  </list>
472   If the cache can not communicate with the origin server, then a
473   correct cache &SHOULD; respond as above if the response can be
474   correctly served from the cache; if not it &MUST; return an error or
475   warning indicating that there was a communication failure.
478   If a cache receives a response (either an entire response, or a 304
479   (Not Modified) response) that it would normally forward to the
480   requesting client, and the received response is no longer fresh, the
481   cache &SHOULD; forward it to the requesting client without adding a new
482   Warning (but without removing any existing Warning headers). A cache
483   &SHOULD-NOT;  attempt to revalidate a response simply because that
484   response became stale in transit; this might lead to an infinite
485   loop. A user agent that receives a stale response without a Warning
486   &MAY; display a warning indication to the user.
490<section title="Warnings" anchor="warnings">
492   Whenever a cache returns a response that is neither first-hand nor
493   "fresh enough" (in the sense of condition 2 in <xref target="cache.correctness"/>), it
494   &MUST; attach a warning to that effect, using a Warning general-header.
495   The Warning header and the currently defined warnings are described
496   in <xref target="header.warning"/>. The warning allows clients to take appropriate
497   action.
500   Warnings &MAY; be used for other purposes, both cache-related and
501   otherwise. The use of a warning, rather than an error status code,
502   distinguish these responses from true failures.
505   Warnings are assigned three digit warn-codes. The first digit
506   indicates whether the Warning &MUST; or &MUST-NOT; be deleted from a
507   stored cache entry after a successful revalidation:
510  <list style="hanging">
511    <t hangText="1xx">Warnings that describe the freshness or revalidation status of
512     the response, and so &MUST; be deleted after a successful
513     revalidation. 1XX warn-codes &MAY; be generated by a cache only when
514     validating a cached entry. It &MUST-NOT; be generated by clients.</t>
516    <t hangText="2xx">Warnings that describe some aspect of the entity body or entity
517     headers that is not rectified by a revalidation (for example, a
518     lossy compression of the entity bodies) and which &MUST-NOT; be
519     deleted after a successful revalidation.</t>
520    </list>
523   See <xref target="header.warning"/> for the definitions of the codes themselves.
526   HTTP/1.0 caches will cache all Warnings in responses, without
527   deleting the ones in the first category. Warnings in responses that
528   are passed to HTTP/1.0 caches carry an extra warning-date field,
529   which prevents a future HTTP/1.1 recipient from believing an
530   erroneously cached Warning.
533   Warnings also carry a warning text. The text &MAY; be in any
534   appropriate natural language (perhaps based on the client's Accept
535   headers), and include an &OPTIONAL; indication of what character set is
536   used.
539   Multiple warnings &MAY; be attached to a response (either by the origin
540   server or by a cache), including multiple warnings with the same code
541   number. For example, a server might provide the same warning with
542   texts in both English and Basque.
545   When multiple warnings are attached to a response, it might not be
546   practical or reasonable to display all of them to the user. This
547   version of HTTP does not specify strict priority rules for deciding
548   which warnings to display and in what order, but does suggest some
549   heuristics.
553<section title="Cache-control Mechanisms" anchor="cache-control.mechanisms">
555   The basic cache mechanisms in HTTP/1.1 (server-specified expiration
556   times and validators) are implicit directives to caches. In some
557   cases, a server or client might need to provide explicit directives
558   to the HTTP caches. We use the Cache-Control header for this purpose.
561   The Cache-Control header allows a client or server to transmit a
562   variety of directives in either requests or responses. These
563   directives typically override the default caching algorithms. As a
564   general rule, if there is any apparent conflict between header
565   values, the most restrictive interpretation is applied (that is, the
566   one that is most likely to preserve semantic transparency). However,
567   in some cases, cache-control directives are explicitly specified as
568   weakening the approximation of semantic transparency (for example,
569   "max-stale" or "public").
572   The cache-control directives are described in detail in <xref target="header.cache-control"/>.
576<section title="Explicit User Agent Warnings" anchor="">
578   Many user agents make it possible for users to override the basic
579   caching mechanisms. For example, the user agent might allow the user
580   to specify that cached entities (even explicitly stale ones) are
581   never validated. Or the user agent might habitually add "Cache-Control:
582   max-stale=3600" to every request. The user agent &SHOULD-NOT;
583   default to either non-transparent behavior, or behavior that results
584   in abnormally ineffective caching, but &MAY; be explicitly configured
585   to do so by an explicit action of the user.
588   If the user has overridden the basic caching mechanisms, the user
589   agent &SHOULD; explicitly indicate to the user whenever this results in
590   the display of information that might not meet the server's
591   transparency requirements (in particular, if the displayed entity is
592   known to be stale). Since the protocol normally allows the user agent
593   to determine if responses are stale or not, this indication need only
594   be displayed when this actually happens. The indication need not be a
595   dialog box; it could be an icon (for example, a picture of a rotting
596   fish) or some other indicator.
599   If the user has overridden the caching mechanisms in a way that would
600   abnormally reduce the effectiveness of caches, the user agent &SHOULD;
601   continually indicate this state to the user (for example, by a
602   display of a picture of currency in flames) so that the user does not
603   inadvertently consume excess resources or suffer from excessive
604   latency.
608<section title="Exceptions to the Rules and Warnings" anchor="">
610   In some cases, the operator of a cache &MAY; choose to configure it to
611   return stale responses even when not requested by clients. This
612   decision ought not be made lightly, but may be necessary for reasons
613   of availability or performance, especially when the cache is poorly
614   connected to the origin server. Whenever a cache returns a stale
615   response, it &MUST; mark it as such (using a Warning header) enabling
616   the client software to alert the user that there might be a potential
617   problem.
620   It also allows the user agent to take steps to obtain a first-hand or
621   fresh response. For this reason, a cache &SHOULD-NOT;  return a stale
622   response if the client explicitly requests a first-hand or fresh one,
623   unless it is impossible to comply for technical or policy reasons.
627<section title="Client-controlled Behavior" anchor="client-controlled.behavior">
629   While the origin server (and to a lesser extent, intermediate caches,
630   by their contribution to the age of a response) are the primary
631   source of expiration information, in some cases the client might need
632   to control a cache's decision about whether to return a cached
633   response without validating it. Clients do this using several
634   directives of the Cache-Control header.
637   A client's request &MAY; specify the maximum age it is willing to
638   accept of an unvalidated response; specifying a value of zero forces
639   the cache(s) to revalidate all responses. A client &MAY; also specify
640   the minimum time remaining before a response expires. Both of these
641   options increase constraints on the behavior of caches, and so cannot
642   further relax the cache's approximation of semantic transparency.
645   A client &MAY; also specify that it will accept stale responses, up to
646   some maximum amount of staleness. This loosens the constraints on the
647   caches, and so might violate the origin server's specified
648   constraints on semantic transparency, but might be necessary to
649   support disconnected operation, or high availability in the face of
650   poor connectivity.
655<section title="Expiration Model" anchor="expiration.model">
657<section title="Server-Specified Expiration" anchor="server-specified.expiration">
659   HTTP caching works best when caches can entirely avoid making
660   requests to the origin server. The primary mechanism for avoiding
661   requests is for an origin server to provide an explicit expiration
662   time in the future, indicating that a response &MAY; be used to satisfy
663   subsequent requests. In other words, a cache can return a fresh
664   response without first contacting the server.
667   Our expectation is that servers will assign future explicit
668   expiration times to responses in the belief that the entity is not
669   likely to change, in a semantically significant way, before the
670   expiration time is reached. This normally preserves semantic
671   transparency, as long as the server's expiration times are carefully
672   chosen.
675   The expiration mechanism applies only to responses taken from a cache
676   and not to first-hand responses forwarded immediately to the
677   requesting client.
680   If an origin server wishes to force a semantically transparent cache
681   to validate every request, it &MAY; assign an explicit expiration time
682   in the past. This means that the response is always stale, and so the
683   cache &SHOULD; validate it before using it for subsequent requests. See
684   <xref target="cache.revalidation.and.reload.controls"/> for a more restrictive way to force revalidation.
687   If an origin server wishes to force any HTTP/1.1 cache, no matter how
688   it is configured, to validate every request, it &SHOULD; use the "must-revalidate"
689   cache-control directive (see <xref target="header.cache-control"/>).
692   Servers specify explicit expiration times using either the Expires
693   header, or the max-age directive of the Cache-Control header.
696   An expiration time cannot be used to force a user agent to refresh
697   its display or reload a resource; its semantics apply only to caching
698   mechanisms, and such mechanisms need only check a resource's
699   expiration status when a new request for that resource is initiated.
700   See <xref target="history.lists"/> for an explanation of the difference between caches
701   and history mechanisms.
705<section title="Heuristic Expiration" anchor="heuristic.expiration">
707   Since origin servers do not always provide explicit expiration times,
708   HTTP caches typically assign heuristic expiration times, employing
709   algorithms that use other header values (such as the Last-Modified
710   time) to estimate a plausible expiration time. The HTTP/1.1
711   specification does not provide specific algorithms, but does impose
712   worst-case constraints on their results. Since heuristic expiration
713   times might compromise semantic transparency, they ought to be used
714   cautiously, and we encourage origin servers to provide explicit
715   expiration times as much as possible.
719<section title="Age Calculations" anchor="age.calculations">
721   In order to know if a cached entry is fresh, a cache needs to know if
722   its age exceeds its freshness lifetime. We discuss how to calculate
723   the latter in <xref target="expiration.calculations"/>; this section describes how to calculate
724   the age of a response or cache entry.
727   In this discussion, we use the term "now" to mean "the current value
728   of the clock at the host performing the calculation." Hosts that use
729   HTTP, but especially hosts running origin servers and caches, &SHOULD;
730   use NTP <xref target="RFC1305"/> or some similar protocol to synchronize their clocks to
731   a globally accurate time standard.
734   HTTP/1.1 requires origin servers to send a Date header, if possible,
735   with every response, giving the time at which the response was
736   generated (see &header-date;). We use the term "date_value" to denote
737   the value of the Date header, in a form appropriate for arithmetic
738   operations.
741   HTTP/1.1 uses the Age response-header to convey the estimated age of
742   the response message when obtained from a cache. The Age field value
743   is the cache's estimate of the amount of time since the response was
744   generated or revalidated by the origin server.
747   In essence, the Age value is the sum of the time that the response
748   has been resident in each of the caches along the path from the
749   origin server, plus the amount of time it has been in transit along
750   network paths.
753   We use the term "age_value" to denote the value of the Age header, in
754   a form appropriate for arithmetic operations.
757   A response's age can be calculated in two entirely independent ways:
758  <list style="numbers">
759      <t>now minus date_value, if the local clock is reasonably well
760         synchronized to the origin server's clock. If the result is
761         negative, the result is replaced by zero.</t>
763      <t>age_value, if all of the caches along the response path
764         implement HTTP/1.1.</t>
765  </list>
768   Given that we have two independent ways to compute the age of a
769   response when it is received, we can combine these as
771<figure><artwork type="code">
772    corrected_received_age = max(now - date_value, age_value)
775   and as long as we have either nearly synchronized clocks or all-HTTP/1.1
776   paths, one gets a reliable (conservative) result.
779   Because of network-imposed delays, some significant interval might
780   pass between the time that a server generates a response and the time
781   it is received at the next outbound cache or client. If uncorrected,
782   this delay could result in improperly low ages.
785   Because the request that resulted in the returned Age value must have
786   been initiated prior to that Age value's generation, we can correct
787   for delays imposed by the network by recording the time at which the
788   request was initiated. Then, when an Age value is received, it &MUST;
789   be interpreted relative to the time the request was initiated, not
790   the time that the response was received. This algorithm results in
791   conservative behavior no matter how much delay is experienced. So, we
792   compute:
794<figure><artwork type="code">
795   corrected_initial_age = corrected_received_age
796                         + (now - request_time)
799   where "request_time" is the time (according to the local clock) when
800   the request that elicited this response was sent.
803   Summary of age calculation algorithm, when a cache receives a
804   response:
806<figure><artwork type="code">
807   /*
808    * age_value
809    *      is the value of Age: header received by the cache with
810    *              this response.
811    * date_value
812    *      is the value of the origin server's Date: header
813    * request_time
814    *      is the (local) time when the cache made the request
815    *              that resulted in this cached response
816    * response_time
817    *      is the (local) time when the cache received the
818    *              response
819    * now
820    *      is the current (local) time
821    */
823   apparent_age = max(0, response_time - date_value);
824   corrected_received_age = max(apparent_age, age_value);
825   response_delay = response_time - request_time;
826   corrected_initial_age = corrected_received_age + response_delay;
827   resident_time = now - response_time;
828   current_age   = corrected_initial_age + resident_time;
831   The current_age of a cache entry is calculated by adding the amount
832   of time (in seconds) since the cache entry was last validated by the
833   origin server to the corrected_initial_age. When a response is
834   generated from a cache entry, the cache &MUST; include a single Age
835   header field in the response with a value equal to the cache entry's
836   current_age.
839   The presence of an Age header field in a response implies that a
840   response is not first-hand. However, the converse is not true, since
841   the lack of an Age header field in a response does not imply that the
842   response is first-hand unless all caches along the request path are
843   compliant with HTTP/1.1 (i.e., older HTTP caches did not implement
844   the Age header field).
848<section title="Expiration Calculations" anchor="expiration.calculations">
850   In order to decide whether a response is fresh or stale, we need to
851   compare its freshness lifetime to its age. The age is calculated as
852   described in <xref target="age.calculations"/>; this section describes how to calculate
853   the freshness lifetime, and to determine if a response has expired.
854   In the discussion below, the values can be represented in any form
855   appropriate for arithmetic operations.
858   We use the term "expires_value" to denote the value of the Expires
859   header. We use the term "max_age_value" to denote an appropriate
860   value of the number of seconds carried by the "max-age" directive of
861   the Cache-Control header in a response (see <xref target="modifications.of.the.basic.expiration.mechanism"/>).
864   The max-age directive takes priority over Expires, so if max-age is
865   present in a response, the calculation is simply:
867<figure><artwork type="code">
868   freshness_lifetime = max_age_value
871   Otherwise, if Expires is present in the response, the calculation is:
873<figure><artwork type="code">
874   freshness_lifetime = expires_value - date_value
877   Note that neither of these calculations is vulnerable to clock skew,
878   since all of the information comes from the origin server.
881   If none of Expires, Cache-Control: max-age, or Cache-Control: s-maxage
882   (see <xref target="modifications.of.the.basic.expiration.mechanism"/>) appears in the response, and the response
883   does not include other restrictions on caching, the cache &MAY; compute
884   a freshness lifetime using a heuristic. The cache &MUST; attach Warning
885   113 to any response whose age is more than 24 hours if such warning
886   has not already been added.
889   Also, if the response does have a Last-Modified time, the heuristic
890   expiration value &SHOULD; be no more than some fraction of the interval
891   since that time. A typical setting of this fraction might be 10%.
894   The calculation to determine if a response has expired is quite
895   simple:
897<figure><artwork type="code">
898   response_is_fresh = (freshness_lifetime &gt; current_age)
902<section title="Disambiguating Expiration Values" anchor="disambiguating.expiration.values">
904   Because expiration values are assigned optimistically, it is possible
905   for two caches to contain fresh values for the same resource that are
906   different.
909   If a client performing a retrieval receives a non-first-hand response
910   for a request that was already fresh in its own cache, and the Date
911   header in its existing cache entry is newer than the Date on the new
912   response, then the client &MAY; ignore the response. If so, it &MAY;
913   retry the request with a "Cache-Control: max-age=0" directive (see
914   <xref target="header.cache-control"/>), to force a check with the origin server.
917   If a cache has two fresh responses for the same representation with
918   different validators, it &MUST; use the one with the more recent Date
919   header. This situation might arise because the cache is pooling
920   responses from other caches, or because a client has asked for a
921   reload or a revalidation of an apparently fresh cache entry.
925<section title="Disambiguating Multiple Responses" anchor="disambiguating.multiple.responses">
927   Because a client might be receiving responses via multiple paths, so
928   that some responses flow through one set of caches and other
929   responses flow through a different set of caches, a client might
930   receive responses in an order different from that in which the origin
931   server sent them. We would like the client to use the most recently
932   generated response, even if older responses are still apparently
933   fresh.
936   Neither the entity tag nor the expiration value can impose an
937   ordering on responses, since it is possible that a later response
938   intentionally carries an earlier expiration time. The Date values are
939   ordered to a granularity of one second.
942   When a client tries to revalidate a cache entry, and the response it
943   receives contains a Date header that appears to be older than the one
944   for the existing entry, then the client &SHOULD; repeat the request
945   unconditionally, and include
947<figure><artwork type="example">
948    Cache-Control: max-age=0
951   to force any intermediate caches to validate their copies directly
952   with the origin server, or
954<figure><artwork type="example">
955    Cache-Control: no-cache
958   to force any intermediate caches to obtain a new copy from the origin
959   server.
962   If the Date values are equal, then the client &MAY; use either response
963   (or &MAY;, if it is being extremely prudent, request a new response).
964   Servers &MUST-NOT; depend on clients being able to choose
965   deterministically between responses generated during the same second,
966   if their expiration times overlap.
971<section title="Validation Model" anchor="validation.model">
973   When a cache has a stale entry that it would like to use as a
974   response to a client's request, it first has to check with the origin
975   server (or possibly an intermediate cache with a fresh response) to
976   see if its cached entry is still usable. We call this "validating"
977   the cache entry. Since we do not want to have to pay the overhead of
978   retransmitting the full response if the cached entry is good, and we
979   do not want to pay the overhead of an extra round trip if the cached
980   entry is invalid, the HTTP/1.1 protocol supports the use of
981   conditional methods.
984   The key protocol features for supporting conditional methods are
985   those concerned with "cache validators." When an origin server
986   generates a full response, it attaches some sort of validator to it,
987   which is kept with the cache entry. When a client (user agent or
988   proxy cache) makes a conditional request for a resource for which it
989   has a cache entry, it includes the associated validator in the
990   request.
993   The server then checks that validator against the current validator
994   for the entity, and, if they match (see &weak-and-strong-validators;), it responds
995   with a special status code (usually, 304 (Not Modified)) and no
996   entity-body. Otherwise, it returns a full response (including
997   entity-body). Thus, we avoid transmitting the full response if the
998   validator matches, and we avoid an extra round trip if it does not
999   match.
1002   In HTTP/1.1, a conditional request looks exactly the same as a normal
1003   request for the same resource, except that it carries a special
1004   header (which includes the validator) that implicitly turns the
1005   method (usually, GET) into a conditional.
1008   The protocol includes both positive and negative senses of cache-validating
1009   conditions. That is, it is possible to request either that
1010   a method be performed if and only if a validator matches or if and
1011   only if no validators match.
1012  <list><t>
1013      <x:h>Note:</x:h> a response that lacks a validator may still be cached, and
1014      served from cache until it expires, unless this is explicitly
1015      prohibited by a cache-control directive. However, a cache cannot
1016      do a conditional retrieval if it does not have a validator for the
1017      entity, which means it will not be refreshable after it expires.
1018  </t></list>
1021<section title="Last-Modified Dates" anchor="last-modified.dates">
1023   The Last-Modified entity-header field value is often used as a cache
1024   validator. In simple terms, a cache entry is considered to be valid
1025   if the entity has not been modified since the Last-Modified value.
1029<section title="Entity Tag Cache Validators" anchor="entity.tag.cache.validators">
1031   The ETag response-header field value, an entity tag, provides for an
1032   "opaque" cache validator. This might allow more reliable validation
1033   in situations where it is inconvenient to store modification dates,
1034   where the one-second resolution of HTTP date values is not
1035   sufficient, or where the origin server wishes to avoid certain
1036   paradoxes that might arise from the use of modification dates.
1039   Entity Tags are described in &entity-tags;.
1043<section title="Non-validating Conditionals" anchor="non-validating.conditionals">
1045   The principle behind entity tags is that only the service author
1046   knows the semantics of a resource well enough to select an
1047   appropriate cache validation mechanism, and the specification of any
1048   validator comparison function more complex than byte-equality would
1049   open up a can of worms. Thus, comparisons of any other headers
1050   (except Last-Modified, for compatibility with HTTP/1.0) are never
1051   used for purposes of validating a cache entry.
1056<section title="Response Cacheability" anchor="response.cacheability">
1058   Unless specifically constrained by a cache-control (<xref target="header.cache-control"/>)
1059   directive, a caching system &MAY; always store a successful response
1060   (see <xref target="errors.or.incomplete.response.cache.behavior"/>) as a cache entry, &MAY; return it without validation
1061   if it is fresh, and &MAY; return it after successful validation. If
1062   there is neither a cache validator nor an explicit expiration time
1063   associated with a response, we do not expect it to be cached, but
1064   certain caches &MAY; violate this expectation (for example, when little
1065   or no network connectivity is available). A client can usually detect
1066   that such a response was taken from a cache by comparing the Date
1067   header to the current time.
1068  <list><t>
1069      <x:h>Note:</x:h> some HTTP/1.0 caches are known to violate this expectation
1070      without providing any Warning.
1071  </t></list>
1074   However, in some cases it might be inappropriate for a cache to
1075   retain an entity, or to return it in response to a subsequent
1076   request. This might be because absolute semantic transparency is
1077   deemed necessary by the service author, or because of security or
1078   privacy considerations. Certain cache-control directives are
1079   therefore provided so that the server can indicate that certain
1080   resource entities, or portions thereof, are not to be cached
1081   regardless of other considerations.
1084   Note that &header-authorization; normally prevents a shared cache from saving
1085   and returning a response to a previous request if that request
1086   included an Authorization header.
1089   A response received with a status code of 200, 203, 206, 300, 301 or
1090   410 &MAY; be stored by a cache and used in reply to a subsequent
1091   request, subject to the expiration mechanism, unless a cache-control
1092   directive prohibits caching. However, a cache that does not support
1093   the Range and Content-Range headers &MUST-NOT; cache 206 (Partial
1094   Content) responses.
1097   A response received with any other status code (e.g. status codes 302
1098   and 307) &MUST-NOT; be returned in a reply to a subsequent request
1099   unless there are cache-control directives or another header(s) that
1100   explicitly allow it. For example, these include the following: an
1101   Expires header (<xref target="header.expires"/>); a "max-age", "s-maxage",  "must-revalidate",
1102   "proxy-revalidate", "public" or "private" cache-control
1103   directive (<xref target="header.cache-control"/>).
1107<section title="Constructing Responses From Caches" anchor="constructing.responses.from.caches">
1109   The purpose of an HTTP cache is to store information received in
1110   response to requests for use in responding to future requests. In
1111   many cases, a cache simply returns the appropriate parts of a
1112   response to the requester. However, if the cache holds a cache entry
1113   based on a previous response, it might have to combine parts of a new
1114   response with what is held in the cache entry.
1117<section title="End-to-end and Hop-by-hop Headers" anchor="end-to-end.and.hop-by-hop.headers">
1119   For the purpose of defining the behavior of caches and non-caching
1120   proxies, we divide HTTP headers into two categories:
1121  <list style="symbols">
1122      <t>End-to-end headers, which are  transmitted to the ultimate
1123        recipient of a request or response. End-to-end headers in
1124        responses &MUST; be stored as part of a cache entry and &MUST; be
1125        transmitted in any response formed from a cache entry.</t>
1127      <t>Hop-by-hop headers, which are meaningful only for a single
1128        transport-level connection, and are not stored by caches or
1129        forwarded by proxies.</t>
1130  </list>
1133   The following HTTP/1.1 headers are hop-by-hop headers:
1134  <list style="symbols">
1135      <t>Connection</t>
1136      <t>Keep-Alive</t>
1137      <t>Proxy-Authenticate</t>
1138      <t>Proxy-Authorization</t>
1139      <t>TE</t>
1140      <t>Trailer</t>
1141      <t>Transfer-Encoding</t>
1142      <t>Upgrade</t>
1143  </list>
1146   All other headers defined by HTTP/1.1 are end-to-end headers.
1149   Other hop-by-hop headers &MUST; be listed in a Connection header
1150   (&header-connection;).
1154<section title="Non-modifiable Headers" anchor="non-modifiable.headers">
1156   Some features of the HTTP/1.1 protocol, such as Digest
1157   Authentication, depend on the value of certain end-to-end headers. A
1158   transparent proxy &SHOULD-NOT;  modify an end-to-end header unless the
1159   definition of that header requires or specifically allows that.
1162   A transparent proxy &MUST-NOT; modify any of the following fields in a
1163   request or response, and it &MUST-NOT; add any of these fields if not
1164   already present:
1165  <list style="symbols">
1166      <t>Content-Location</t>
1167      <t>Content-MD5</t>
1168      <t>ETag</t>
1169      <t>Last-Modified</t>
1170  </list>
1173   A transparent proxy &MUST-NOT; modify any of the following fields in a
1174   response:
1175  <list style="symbols">
1176    <t>Expires</t>
1177  </list>
1180   but it &MAY; add any of these fields if not already present. If an
1181   Expires header is added, it &MUST; be given a field-value identical to
1182   that of the Date header in that response.
1185   A  proxy &MUST-NOT; modify or add any of the following fields in a
1186   message that contains the no-transform cache-control directive, or in
1187   any request:
1188  <list style="symbols">
1189    <t>Content-Encoding</t>
1190    <t>Content-Range</t>
1191    <t>Content-Type</t>
1192  </list>
1195   A non-transparent proxy &MAY; modify or add these fields to a message
1196   that does not include no-transform, but if it does so, it &MUST; add a
1197   Warning 214 (Transformation applied) if one does not already appear
1198   in the message (see <xref target="header.warning"/>).
1199  <list><t>
1200      Warning: unnecessary modification of end-to-end headers might
1201      cause authentication failures if stronger authentication
1202      mechanisms are introduced in later versions of HTTP. Such
1203      authentication mechanisms &MAY; rely on the values of header fields
1204      not listed here.
1205    </t></list>
1208   The Content-Length field of a request or response is added or deleted
1209   according to the rules in &message-length;. A transparent proxy &MUST;
1210   preserve the entity-length (&entity-length;) of the entity-body,
1211   although it &MAY; change the transfer-length (&message-length;).
1215<section title="Combining Headers" anchor="combining.headers">
1217   When a cache makes a validating request to a server, and the server
1218   provides a 304 (Not Modified) response or a 206 (Partial Content)
1219   response, the cache then constructs a response to send to the
1220   requesting client.
1223   If the status code is 304 (Not Modified), the cache uses the entity-body
1224   stored in the cache entry as the entity-body of this outgoing
1225   response. If the status code is 206 (Partial Content) and the ETag or
1226   Last-Modified headers match exactly, the cache &MAY; combine the
1227   contents stored in the cache entry with the new contents received in
1228   the response and use the result as the entity-body of this outgoing
1229   response, (see &combining-byte-ranges;).
1232   The end-to-end headers stored in the cache entry are used for the
1233   constructed response, except that
1234  <list style="symbols">
1235    <t>any stored Warning headers with warn-code 1xx (see <xref target="header.warning"/>)
1236      &MUST; be deleted from the cache entry and the forwarded response.</t>
1237    <t>any stored Warning headers with warn-code 2xx &MUST; be retained
1238        in the cache entry and the forwarded response.</t>
1239    <t>any end-to-end headers provided in the 304 or 206 response &MUST;
1240        replace the corresponding headers from the cache entry.</t>
1241  </list>
1244   Unless the cache decides to remove the cache entry, it &MUST; also
1245   replace the end-to-end headers stored with the cache entry with
1246   corresponding headers received in the incoming response, except for
1247   Warning headers as described immediately above. If a header field-name
1248   in the incoming response matches more than one header in the
1249   cache entry, all such old headers &MUST; be replaced.
1252   In other words, the set of end-to-end headers received in the
1253   incoming response overrides all corresponding end-to-end headers
1254   stored with the cache entry (except for stored Warning headers with
1255   warn-code 1xx, which are deleted even if not overridden).
1256  <list><t>
1257      <x:h>Note:</x:h> this rule allows an origin server to use a 304 (Not
1258      Modified) or a 206 (Partial Content) response to update any header
1259      associated with a previous response for the same entity or sub-ranges
1260      thereof, although it might not always be meaningful or
1261      correct to do so. This rule does not allow an origin server to use
1262      a 304 (Not Modified) or a 206 (Partial Content) response to
1263      entirely delete a header that it had provided with a previous
1264      response.
1265  </t></list>
1271<section title="Caching Negotiated Responses" anchor="caching.negotiated.responses">
1273   Use of server-driven content negotiation (&server-driven-negotiation;), as indicated
1274   by the presence of a Vary header field in a response, alters the
1275   conditions and procedure by which a cache can use the response for
1276   subsequent requests. See <xref target="header.vary"/> for use of the Vary header
1277   field by servers.
1280   A server &SHOULD; use the Vary header field to inform a cache of what
1281   request-header fields were used to select among multiple
1282   representations of a cacheable response subject to server-driven
1283   negotiation. The set of header fields named by the Vary field value
1284   is known as the "selecting" request-headers.
1287   When the cache receives a subsequent request whose Request-URI
1288   specifies one or more cache entries including a Vary header field,
1289   the cache &MUST-NOT; use such a cache entry to construct a response to
1290   the new request unless all of the selecting request-headers present
1291   in the new request match the corresponding stored request-headers in
1292   the original request.
1295   The selecting request-headers from two requests are defined to match
1296   if and only if the selecting request-headers in the first request can
1297   be transformed to the selecting request-headers in the second request
1298   by adding or removing linear white space (LWS) at places where this
1299   is allowed by the corresponding BNF, and/or combining multiple
1300   message-header fields with the same field name following the rules
1301   about message headers in &message-headers;.
1304   A Vary header field-value of "*" always fails to match and subsequent
1305   requests on that resource can only be properly interpreted by the
1306   origin server.
1309   If the selecting request header fields for the cached entry do not
1310   match the selecting request header fields of the new request, then
1311   the cache &MUST-NOT; use a cached entry to satisfy the request unless
1312   it first relays the new request to the origin server in a conditional
1313   request and the server responds with 304 (Not Modified), including an
1314   entity tag or Content-Location that indicates the entity to be used.
1317   If an entity tag was assigned to a cached representation, the
1318   forwarded request &SHOULD; be conditional and include the entity tags
1319   in an If-None-Match header field from all its cache entries for the
1320   resource. This conveys to the server the set of entities currently
1321   held by the cache, so that if any one of these entities matches the
1322   requested entity, the server can use the ETag header field in its 304
1323   (Not Modified) response to tell the cache which entry is appropriate.
1324   If the entity-tag of the new response matches that of an existing
1325   entry, the new response &SHOULD; be used to update the header fields of
1326   the existing entry, and the result &MUST; be returned to the client.
1329   If any of the existing cache entries contains only partial content
1330   for the associated entity, its entity-tag &SHOULD-NOT;  be included in
1331   the If-None-Match header field unless the request is for a range that
1332   would be fully satisfied by that entry.
1335   If a cache receives a successful response whose Content-Location
1336   field matches that of an existing cache entry for the same Request-URI,
1337   whose entity-tag differs from that of the existing entry, and
1338   whose Date is more recent than that of the existing entry, the
1339   existing entry &SHOULD-NOT;  be returned in response to future requests
1340   and &SHOULD; be deleted from the cache.
1344<section title="Shared and Non-Shared Caches" anchor="shared.and.non-shared.caches">
1346   For reasons of security and privacy, it is necessary to make a
1347   distinction between "shared" and "non-shared" caches. A non-shared
1348   cache is one that is accessible only to a single user. Accessibility
1349   in this case &SHOULD; be enforced by appropriate security mechanisms.
1350   All other caches are considered to be "shared." Other sections of
1351   this specification place certain constraints on the operation of
1352   shared caches in order to prevent loss of privacy or failure of
1353   access controls.
1357<section title="Errors or Incomplete Response Cache Behavior" anchor="errors.or.incomplete.response.cache.behavior">
1359   A cache that receives an incomplete response (for example, with fewer
1360   bytes of data than specified in a Content-Length header) &MAY; store
1361   the response. However, the cache &MUST; treat this as a partial
1362   response. Partial responses &MAY; be combined as described in &combining-byte-ranges;;
1363   the result might be a full response or might still be
1364   partial. A cache &MUST-NOT; return a partial response to a client
1365   without explicitly marking it as such, using the 206 (Partial
1366   Content) status code. A cache &MUST-NOT; return a partial response
1367   using a status code of 200 (OK).
1370   If a cache receives a 5xx response while attempting to revalidate an
1371   entry, it &MAY; either forward this response to the requesting client,
1372   or act as if the server failed to respond. In the latter case, it &MAY;
1373   return a previously received response unless the cached entry
1374   includes the "must-revalidate" cache-control directive (see <xref target="header.cache-control"/>).
1378<section title="Side Effects of GET and HEAD" anchor="side.effects.of.get.and.head">
1380   Unless the origin server explicitly prohibits the caching of their
1381   responses, the application of GET and HEAD methods to any resources
1382   &SHOULD-NOT;  have side effects that would lead to erroneous behavior if
1383   these responses are taken from a cache. They &MAY; still have side
1384   effects, but a cache is not required to consider such side effects in
1385   its caching decisions. Caches are always expected to observe an
1386   origin server's explicit restrictions on caching.
1389   We note one exception to this rule: since some applications have
1390   traditionally used GETs and HEADs with query URLs (those containing a
1391   "?" in the rel_path part) to perform operations with significant side
1392   effects, caches &MUST-NOT; treat responses to such URIs as fresh unless
1393   the server provides an explicit expiration time. This specifically
1394   means that responses from HTTP/1.0 servers for such URIs &SHOULD-NOT;
1395   be taken from a cache. See &safe-methods; for related information.
1399<section title="Invalidation After Updates or Deletions" anchor="invalidation.after.updates.or.deletions">
1401   The effect of certain methods performed on a resource at the origin
1402   server might cause one or more existing cache entries to become non-transparently
1403   invalid. That is, although they might continue to be
1404   "fresh," they do not accurately reflect what the origin server would
1405   return for a new request on that resource.
1408   There is no way for the HTTP protocol to guarantee that all such
1409   cache entries are marked invalid. For example, the request that
1410   caused the change at the origin server might not have gone through
1411   the proxy where a cache entry is stored. However, several rules help
1412   reduce the likelihood of erroneous behavior.
1415   In this section, the phrase "invalidate an entity" means that the
1416   cache will either remove all instances of that entity from its
1417   storage, or will mark these as "invalid" and in need of a mandatory
1418   revalidation before they can be returned in response to a subsequent
1419   request.
1422   Some HTTP methods &MUST; cause a cache to invalidate an entity. This is
1423   either the entity referred to by the Request-URI, or by the Location
1424   or Content-Location headers (if present). These methods are:
1425  <list style="symbols">
1426      <t>PUT</t>
1427      <t>DELETE</t>
1428      <t>POST</t>
1429  </list>
1432   An invalidation based
1433   on the URI in a Location or Content-Location header &MUST-NOT; be
1434   performed if the host part of that URI differs from the host part
1435   in the Request-URI. This helps prevent denial of service attacks.
1438   A cache that passes through requests for methods it does not
1439   understand &SHOULD; invalidate any entities referred to by the
1440   Request-URI.
1444<section title="Write-Through Mandatory" anchor="write-through.mandatory">
1446   All methods that might be expected to cause modifications to the
1447   origin server's resources &MUST; be written through to the origin
1448   server. This currently includes all methods except for GET and HEAD.
1449   A cache &MUST-NOT; reply to such a request from a client before having
1450   transmitted the request to the inbound server, and having received a
1451   corresponding response from the inbound server. This does not prevent
1452   a proxy cache from sending a 100 (Continue) response before the
1453   inbound server has sent its final reply.
1456   The alternative (known as "write-back" or "copy-back" caching) is not
1457   allowed in HTTP/1.1, due to the difficulty of providing consistent
1458   updates and the problems arising from server, cache, or network
1459   failure prior to write-back.
1463<section title="Cache Replacement" anchor="cache.replacement">
1465   If a new cacheable (see sections <xref target="" format="counter"/>,
1466   <xref target="disambiguating.expiration.values" format="counter"/>,
1467   <xref target="disambiguating.multiple.responses" format="counter"/>
1468   and <xref target="errors.or.incomplete.response.cache.behavior" format="counter"/>)
1469   response is received from a resource while any existing responses for
1470   the same resource are cached, the cache &SHOULD; use the new response
1471   to reply to the current request. It &MAY; insert it into cache storage
1472   and &MAY;, if it meets all other requirements, use it to respond to any
1473   future requests that would previously have caused the old response to
1474   be returned. If it inserts the new response into cache storage  the
1475   rules in <xref target="combining.headers"/> apply.
1476  <list><t>
1477      <x:h>Note:</x:h> a new response that has an older Date header value than
1478      existing cached responses is not cacheable.
1479  </t></list>
1483<section title="History Lists" anchor="history.lists">
1485   User agents often have history mechanisms, such as "Back" buttons and
1486   history lists, which can be used to redisplay an entity retrieved
1487   earlier in a session.
1490   History mechanisms and caches are different. In particular history
1491   mechanisms &SHOULD-NOT;  try to show a semantically transparent view of
1492   the current state of a resource. Rather, a history mechanism is meant
1493   to show exactly what the user saw at the time when the resource was
1494   retrieved.
1497   By default, an expiration time does not apply to history mechanisms.
1498   If the entity is still in storage, a history mechanism &SHOULD; display
1499   it even if the entity has expired, unless the user has specifically
1500   configured the agent to refresh expired history documents.
1503   This is not to be construed to prohibit the history mechanism from
1504   telling the user that a view might be stale.
1505  <list><t>
1506      <x:h>Note:</x:h> if history list mechanisms unnecessarily prevent users from
1507      viewing stale resources, this will tend to force service authors
1508      to avoid using HTTP expiration controls and cache controls when
1509      they would otherwise like to. Service authors may consider it
1510      important that users not be presented with error messages or
1511      warning messages when they use navigation controls (such as BACK)
1512      to view previously fetched resources. Even though sometimes such
1513      resources ought not to cached, or ought to expire quickly, user
1514      interface considerations may force service authors to resort to
1515      other means of preventing caching (e.g. "once-only" URLs) in order
1516      not to suffer the effects of improperly functioning history
1517      mechanisms.
1518  </t></list>
1523<section title="Header Field Definitions" anchor="header.fields">
1525   This section defines the syntax and semantics of all standard
1526   HTTP/1.1 header fields. For entity-header fields, both sender and
1527   recipient refer to either the client or the server, depending on who
1528   sends and who receives the entity.
1531<section title="Age" anchor="header.age">
1532  <iref primary="true" item="Age header" x:for-anchor=""/>
1533  <iref primary="true" item="Headers" subitem="Age" x:for-anchor=""/>
1535      The Age response-header field conveys the sender's estimate of the
1536      amount of time since the response (or its revalidation) was
1537      generated at the origin server. A cached response is "fresh" if
1538      its age does not exceed its freshness lifetime. Age values are
1539      calculated as specified in <xref target="age.calculations"/>.
1541<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Age"/><iref primary="true" item="Grammar" subitem="age-value"/>
1542        Age = "Age" ":" age-value
1543        age-value = delta-seconds
1546      Age values are non-negative decimal integers, representing time in
1547      seconds.
1550      If a cache receives a value larger than the largest positive
1551      integer it can represent, or if any of its age calculations
1552      overflows, it &MUST; transmit an Age header with a value of
1553      2147483648 (2^31). An HTTP/1.1 server that includes a cache &MUST;
1554      include an Age header field in every response generated from its
1555      own cache. Caches &SHOULD; use an arithmetic type of at least 31
1556      bits of range.
1560<section title="Cache-Control" anchor="header.cache-control">
1561  <iref primary="true" item="Cache-Control header" x:for-anchor=""/>
1562  <iref primary="true" item="Headers" subitem="Cache-Control" x:for-anchor=""/>
1564   The Cache-Control general-header field is used to specify directives
1565   that &MUST; be obeyed by all caching mechanisms along the
1566   request/response chain. The directives specify behavior intended to
1567   prevent caches from adversely interfering with the request or
1568   response. These directives typically override the default caching
1569   algorithms. Cache directives are unidirectional in that the presence
1570   of a directive in a request does not imply that the same directive is
1571   to be given in the response.
1572  <list><t>
1573      Note that HTTP/1.0 caches might not implement Cache-Control and
1574      might only implement Pragma: no-cache (see <xref target="header.pragma"/>).
1575  </t></list>
1578   Cache directives &MUST; be passed through by a proxy or gateway
1579   application, regardless of their significance to that application,
1580   since the directives might be applicable to all recipients along the
1581   request/response chain. It is not possible to specify a cache-directive
1582   for a specific cache.
1584<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"/>
1585   Cache-Control   = "Cache-Control" ":" 1#cache-directive
1587   cache-directive = cache-request-directive
1588        | cache-response-directive
1590   cache-request-directive =
1591          "no-cache"                          ; <xref target=""/>
1592        | "no-store"                          ; <xref target=""/>
1593        | "max-age" "=" delta-seconds         ; <xref target="modifications.of.the.basic.expiration.mechanism"/>, <xref format="counter" target="cache.revalidation.and.reload.controls"/>
1594        | "max-stale" [ "=" delta-seconds ]   ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1595        | "min-fresh" "=" delta-seconds       ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1596        | "no-transform"                      ; <xref target="no-transform.directive"/>
1597        | "only-if-cached"                    ; <xref target="cache.revalidation.and.reload.controls"/>
1598        | cache-extension                     ; <xref target="cache.control.extensions"/>
1600    cache-response-directive =
1601          "public"                               ; <xref target=""/>
1602        | "private" [ "=" &lt;"&gt; 1#field-name &lt;"&gt; ] ; <xref target=""/>
1603        | "no-cache" [ "=" &lt;"&gt; 1#field-name &lt;"&gt; ]; <xref target=""/>
1604        | "no-store"                             ; <xref target=""/>
1605        | "no-transform"                         ; <xref target="no-transform.directive"/>
1606        | "must-revalidate"                      ; <xref target="cache.revalidation.and.reload.controls"/>
1607        | "proxy-revalidate"                     ; <xref target="cache.revalidation.and.reload.controls"/>
1608        | "max-age" "=" delta-seconds            ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1609        | "s-maxage" "=" delta-seconds           ; <xref target="modifications.of.the.basic.expiration.mechanism"/>
1610        | cache-extension                        ; <xref target="cache.control.extensions"/>
1612   cache-extension = token [ "=" ( token | quoted-string ) ]
1615   When a directive appears without any 1#field-name parameter, the
1616   directive applies to the entire request or response. When such a
1617   directive appears with a 1#field-name parameter, it applies only to
1618   the named field or fields, and not to the rest of the request or
1619   response. This mechanism supports extensibility; implementations of
1620   future versions of the HTTP protocol might apply these directives to
1621   header fields not defined in HTTP/1.1.
1624   The cache-control directives can be broken down into these general
1625   categories:
1626  <list style="symbols">
1627     <t>Restrictions on what are cacheable; these may only be imposed by
1628        the origin server.</t>
1630     <t>Restrictions on what may be stored by a cache; these may be
1631        imposed by either the origin server or the user agent.</t>
1633     <t>Modifications of the basic expiration mechanism; these may be
1634        imposed by either the origin server or the user agent.</t>
1636     <t>Controls over cache revalidation and reload; these may only be
1637        imposed by a user agent.</t>
1639     <t>Control over transformation of entities.</t>
1641     <t>Extensions to the caching system.</t>
1642  </list>
1645<section title="What is Cacheable" anchor="">
1647   By default, a response is cacheable if the requirements of the
1648   request method, request header fields, and the response status
1649   indicate that it is cacheable. <xref target="response.cacheability"/> summarizes these defaults
1650   for cacheability. The following Cache-Control response directives
1651   allow an origin server to override the default cacheability of a
1652   response:
1655  <iref item="Cache Directives" subitem="public" primary="true"/>
1656  <iref item="public" subitem="Cache Directive" primary="true"/>
1657   public
1658  <list><t>
1659      Indicates that the response &MAY; be cached by any cache, even if it
1660      would normally be non-cacheable or cacheable only within a non-shared
1661      cache. (See also Authorization, &header-authorization;, for
1662      additional details.)
1663  </t></list>
1666  <iref item="Cache Directives" subitem="private" primary="true"/>
1667  <iref item="private" subitem="Cache Directive" primary="true"/>
1668   private
1669  <list><t>
1670      Indicates that all or part of the response message is intended for
1671      a single user and &MUST-NOT; be cached by a shared cache. This
1672      allows an origin server to state that the specified parts of the
1673      response are intended for only one user and are not a valid
1674      response for requests by other users. A private (non-shared) cache
1675      &MAY; cache the response.
1676    </t><t>
1677       <x:h>Note:</x:h> This usage of the word private only controls where the
1678       response may be cached, and cannot ensure the privacy of the
1679       message content.
1680  </t></list>
1683  <iref item="Cache Directives" subitem="no-cache" primary="true"/>
1684  <iref item="no-cache" subitem="Cache Directive" primary="true"/>
1685   no-cache
1686  <list><t>
1687       If the no-cache directive does not specify a field-name, then a
1688      cache &MUST-NOT; use the response to satisfy a subsequent request
1689      without successful revalidation with the origin server. This
1690      allows an origin server to prevent caching even by caches that
1691      have been configured to return stale responses to client requests.
1692    </t><t>
1693      If the no-cache directive does specify one or more field-names,
1694      then a cache &MAY; use the response to satisfy a subsequent request,
1695      subject to any other restrictions on caching. However, the
1696      specified field-name(s) &MUST-NOT; be sent in the response to a
1697      subsequent request without successful revalidation with the origin
1698      server. This allows an origin server to prevent the re-use of
1699      certain header fields in a response, while still allowing caching
1700      of the rest of the response.
1701    <list><t>
1702       <x:h>Note:</x:h> Most HTTP/1.0 caches will not recognize or obey this
1703       directive.
1704    </t></list>
1705  </t></list>
1709<section title="What May be Stored by Caches" anchor="">
1711  <iref item="Cache Directives" subitem="no-store" primary="true"/>
1712  <iref item="no-store" subitem="Cache Directive" primary="true"/>
1713   no-store
1714  <list><t>   
1715      The purpose of the no-store directive is to prevent the
1716      inadvertent release or retention of sensitive information (for
1717      example, on backup tapes). The no-store directive applies to the
1718      entire message, and &MAY; be sent either in a response or in a
1719      request. If sent in a request, a cache &MUST-NOT; store any part of
1720      either this request or any response to it. If sent in a response,
1721      a cache &MUST-NOT; store any part of either this response or the
1722      request that elicited it. This directive applies to both non-shared
1723      and shared caches. "&MUST-NOT; store" in this context means
1724      that the cache &MUST-NOT; intentionally store the information in
1725      non-volatile storage, and &MUST; make a best-effort attempt to
1726      remove the information from volatile storage as promptly as
1727      possible after forwarding it.
1728  </t><t>
1729      Even when this directive is associated with a response, users
1730      might explicitly store such a response outside of the caching
1731      system (e.g., with a "Save As" dialog). History buffers &MAY; store
1732      such responses as part of their normal operation.
1733  </t><t>
1734      The purpose of this directive is to meet the stated requirements
1735      of certain users and service authors who are concerned about
1736      accidental releases of information via unanticipated accesses to
1737      cache data structures. While the use of this directive might
1738      improve privacy in some cases, we caution that it is NOT in any
1739      way a reliable or sufficient mechanism for ensuring privacy. In
1740      particular, malicious or compromised caches might not recognize or
1741      obey this directive, and communications networks might be
1742      vulnerable to eavesdropping.
1743  </t></list>
1747<section title="Modifications of the Basic Expiration Mechanism" anchor="modifications.of.the.basic.expiration.mechanism">
1749   The expiration time of an entity &MAY; be specified by the origin
1750   server using the Expires header (see <xref target="header.expires"/>). Alternatively,
1751   it &MAY; be specified using the max-age directive in a response. When
1752   the max-age cache-control directive is present in a cached response,
1753   the response is stale if its current age is greater than the age
1754   value given (in seconds) at the time of a new request for that
1755   resource. The max-age directive on a response implies that the
1756   response is cacheable (i.e., "public") unless some other, more
1757   restrictive cache directive is also present.
1760   If a response includes both an Expires header and a max-age
1761   directive, the max-age directive overrides the Expires header, even
1762   if the Expires header is more restrictive. This rule allows an origin
1763   server to provide, for a given response, a longer expiration time to
1764   an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be
1765   useful if certain HTTP/1.0 caches improperly calculate ages or
1766   expiration times, perhaps due to desynchronized clocks.
1769   Many HTTP/1.0 cache implementations will treat an Expires value that
1770   is less than or equal to the response Date value as being equivalent
1771   to the Cache-Control response directive "no-cache". If an HTTP/1.1
1772   cache receives such a response, and the response does not include a
1773   Cache-Control header field, it &SHOULD; consider the response to be
1774   non-cacheable in order to retain compatibility with HTTP/1.0 servers.
1775  <list><t>
1776       <x:h>Note:</x:h> An origin server might wish to use a relatively new HTTP
1777       cache control feature, such as the "private" directive, on a
1778       network including older caches that do not understand that
1779       feature. The origin server will need to combine the new feature
1780       with an Expires field whose value is less than or equal to the
1781       Date value. This will prevent older caches from improperly
1782       caching the response.
1783  </t></list>
1786  <iref item="Cache Directives" subitem="s-maxage" primary="true"/>
1787  <iref item="s-maxage" subitem="Cache Directive" primary="true"/>
1788   s-maxage
1789  <list><t>
1790       If a response includes an s-maxage directive, then for a shared
1791       cache (but not for a private cache), the maximum age specified by
1792       this directive overrides the maximum age specified by either the
1793       max-age directive or the Expires header. The s-maxage directive
1794       also implies the semantics of the proxy-revalidate directive (see
1795       <xref target="cache.revalidation.and.reload.controls"/>), i.e., that the shared cache must not use the
1796       entry after it becomes stale to respond to a subsequent request
1797       without first revalidating it with the origin server. The s-maxage
1798       directive is always ignored by a private cache.
1799  </t></list>
1802   Note that most older caches, not compliant with this specification,
1803   do not implement any cache-control directives. An origin server
1804   wishing to use a cache-control directive that restricts, but does not
1805   prevent, caching by an HTTP/1.1-compliant cache &MAY; exploit the
1806   requirement that the max-age directive overrides the Expires header,
1807   and the fact that pre-HTTP/1.1-compliant caches do not observe the
1808   max-age directive.
1811   Other directives allow a user agent to modify the basic expiration
1812   mechanism. These directives &MAY; be specified on a request:
1815  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1816  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1817   max-age
1818  <list><t>
1819      Indicates that the client is willing to accept a response whose
1820      age is no greater than the specified time in seconds. Unless max-stale
1821      directive is also included, the client is not willing to
1822      accept a stale response.
1823  </t></list>
1826  <iref item="Cache Directives" subitem="min-fresh" primary="true"/>
1827  <iref item="min-fresh" subitem="Cache Directive" primary="true"/>
1828   min-fresh
1829  <list><t>
1830      Indicates that the client is willing to accept a response whose
1831      freshness lifetime is no less than its current age plus the
1832      specified time in seconds. That is, the client wants a response
1833      that will still be fresh for at least the specified number of
1834      seconds.
1835  </t></list>
1838  <iref item="Cache Directives" subitem="max-stale" primary="true"/>
1839  <iref item="max-stale" subitem="Cache Directive" primary="true"/>
1840   max-stale
1841  <list><t>
1842      Indicates that the client is willing to accept a response that has
1843      exceeded its expiration time. If max-stale is assigned a value,
1844      then the client is willing to accept a response that has exceeded
1845      its expiration time by no more than the specified number of
1846      seconds. If no value is assigned to max-stale, then the client is
1847      willing to accept a stale response of any age.
1848  </t></list>
1851   If a cache returns a stale response, either because of a max-stale
1852   directive on a request, or because the cache is configured to
1853   override the expiration time of a response, the cache &MUST; attach a
1854   Warning header to the stale response, using Warning 110 (Response is
1855   stale).
1858   A cache &MAY; be configured to return stale responses without
1859   validation, but only if this does not conflict with any "MUST"-level
1860   requirements concerning cache validation (e.g., a "must-revalidate"
1861   cache-control directive).
1864   If both the new request and the cached entry include "max-age"
1865   directives, then the lesser of the two values is used for determining
1866   the freshness of the cached entry for that request.
1870<section title="Cache Revalidation and Reload Controls" anchor="cache.revalidation.and.reload.controls">
1872   Sometimes a user agent might want or need to insist that a cache
1873   revalidate its cache entry with the origin server (and not just with
1874   the next cache along the path to the origin server), or to reload its
1875   cache entry from the origin server. End-to-end revalidation might be
1876   necessary if either the cache or the origin server has overestimated
1877   the expiration time of the cached response. End-to-end reload may be
1878   necessary if the cache entry has become corrupted for some reason.
1881   End-to-end revalidation may be requested either when the client does
1882   not have its own local cached copy, in which case we call it
1883   "unspecified end-to-end revalidation", or when the client does have a
1884   local cached copy, in which case we call it "specific end-to-end
1885   revalidation."
1888   The client can specify these three kinds of action using Cache-Control
1889   request directives:
1892   End-to-end reload
1893  <list><t>
1894      The request includes a "no-cache" cache-control directive or, for
1895      compatibility with HTTP/1.0 clients, "Pragma: no-cache". Field
1896      names &MUST-NOT; be included with the no-cache directive in a
1897      request. The server &MUST-NOT; use a cached copy when responding to
1898      such a request.
1899  </t></list>
1902   Specific end-to-end revalidation
1903  <list><t>
1904      The request includes a "max-age=0" cache-control directive, which
1905      forces each cache along the path to the origin server to
1906      revalidate its own entry, if any, with the next cache or server.
1907      The initial request includes a cache-validating conditional with
1908      the client's current validator.
1909  </t></list>
1912   Unspecified end-to-end revalidation
1913  <list><t>
1914      The request includes "max-age=0" cache-control directive, which
1915      forces each cache along the path to the origin server to
1916      revalidate its own entry, if any, with the next cache or server.
1917      The initial request does not include a cache-validating
1918      conditional; the first cache along the path (if any) that holds a
1919      cache entry for this resource includes a cache-validating
1920      conditional with its current validator.
1921  </t></list>
1924  <iref item="Cache Directives" subitem="max-age" primary="true"/>
1925  <iref item="max-age" subitem="Cache Directive" primary="true"/>
1926   max-age
1927  <list><t>
1928      When an intermediate cache is forced, by means of a max-age=0
1929      directive, to revalidate its own cache entry, and the client has
1930      supplied its own validator in the request, the supplied validator
1931      might differ from the validator currently stored with the cache
1932      entry. In this case, the cache &MAY; use either validator in making
1933      its own request without affecting semantic transparency.
1934  </t><t>
1935      However, the choice of validator might affect performance. The
1936      best approach is for the intermediate cache to use its own
1937      validator when making its request. If the server replies with 304
1938      (Not Modified), then the cache can return its now validated copy
1939      to the client with a 200 (OK) response. If the server replies with
1940      a new entity and cache validator, however, the intermediate cache
1941      can compare the returned validator with the one provided in the
1942      client's request, using the strong comparison function. If the
1943      client's validator is equal to the origin server's, then the
1944      intermediate cache simply returns 304 (Not Modified). Otherwise,
1945      it returns the new entity with a 200 (OK) response.
1946  </t><t>
1947      If a request includes the no-cache directive, it &SHOULD-NOT;
1948      include min-fresh, max-stale, or max-age.
1949  </t></list>
1952  <iref item="Cache Directives" subitem="only-if-cached" primary="true"/>
1953  <iref item="only-if-cached" subitem="Cache Directive" primary="true"/>
1954   only-if-cached
1955  <list><t>
1956      In some cases, such as times of extremely poor network
1957      connectivity, a client may want a cache to return only those
1958      responses that it currently has stored, and not to reload or
1959      revalidate with the origin server. To do this, the client may
1960      include the only-if-cached directive in a request. If it receives
1961      this directive, a cache &SHOULD; either respond using a cached entry
1962      that is consistent with the other constraints of the request, or
1963      respond with a 504 (Gateway Timeout) status. However, if a group
1964      of caches is being operated as a unified system with good internal
1965      connectivity, such a request &MAY; be forwarded within that group of
1966      caches.
1967  </t></list>
1970  <iref item="Cache Directives" subitem="must-revalidate" primary="true"/>
1971  <iref item="must-revalidate" subitem="Cache Directive" primary="true"/>
1972   must-revalidate
1973  <list><t>
1974      Because a cache &MAY; be configured to ignore a server's specified
1975      expiration time, and because a client request &MAY; include a max-stale
1976      directive (which has a similar effect), the protocol also
1977      includes a mechanism for the origin server to require revalidation
1978      of a cache entry on any subsequent use. When the must-revalidate
1979      directive is present in a response received by a cache, that cache
1980      &MUST-NOT; use the entry after it becomes stale to respond to a
1981      subsequent request without first revalidating it with the origin
1982      server. (I.e., the cache &MUST; do an end-to-end revalidation every
1983      time, if, based solely on the origin server's Expires or max-age
1984      value, the cached response is stale.)
1985  </t><t>
1986      The must-revalidate directive is necessary to support reliable
1987      operation for certain protocol features. In all circumstances an
1988      HTTP/1.1 cache &MUST; obey the must-revalidate directive; in
1989      particular, if the cache cannot reach the origin server for any
1990      reason, it &MUST; generate a 504 (Gateway Timeout) response.
1991  </t><t>
1992      Servers &SHOULD; send the must-revalidate directive if and only if
1993      failure to revalidate a request on the entity could result in
1994      incorrect operation, such as a silently unexecuted financial
1995      transaction. Recipients &MUST-NOT; take any automated action that
1996      violates this directive, and &MUST-NOT; automatically provide an
1997      unvalidated copy of the entity if revalidation fails.
1998  </t><t>
1999      Although this is not recommended, user agents operating under
2000      severe connectivity constraints &MAY; violate this directive but, if
2001      so, &MUST; explicitly warn the user that an unvalidated response has
2002      been provided. The warning &MUST; be provided on each unvalidated
2003      access, and &SHOULD; require explicit user confirmation.
2004  </t></list>
2007  <iref item="Cache Directives" subitem="proxy-revalidate" primary="true"/>
2008  <iref item="proxy-revalidate" subitem="Cache Directive" primary="true"/>
2009   proxy-revalidate
2010  <list><t>
2011      The proxy-revalidate directive has the same meaning as the must-revalidate
2012      directive, except that it does not apply to non-shared
2013      user agent caches. It can be used on a response to an
2014      authenticated request to permit the user's cache to store and
2015      later return the response without needing to revalidate it (since
2016      it has already been authenticated once by that user), while still
2017      requiring proxies that service many users to revalidate each time
2018      (in order to make sure that each user has been authenticated).
2019      Note that such authenticated responses also need the public cache
2020      control directive in order to allow them to be cached at all.
2021  </t></list>
2025<section title="No-Transform Directive" anchor="no-transform.directive">
2027  <iref item="Cache Directives" subitem="no-transform" primary="true"/>
2028  <iref item="no-transform" subitem="Cache Directive" primary="true"/>
2029   no-transform
2030  <list><t>
2031      Implementors of intermediate caches (proxies) have found it useful
2032      to convert the media type of certain entity bodies. A non-transparent
2033      proxy might, for example, convert between image
2034      formats in order to save cache space or to reduce the amount of
2035      traffic on a slow link.
2036  </t><t>
2037      Serious operational problems occur, however, when these
2038      transformations are applied to entity bodies intended for certain
2039      kinds of applications. For example, applications for medical
2040      imaging, scientific data analysis and those using end-to-end
2041      authentication, all depend on receiving an entity body that is bit
2042      for bit identical to the original entity-body.
2043  </t><t>
2044      Therefore, if a message includes the no-transform directive, an
2045      intermediate cache or proxy &MUST-NOT; change those headers that are
2046      listed in <xref target="non-modifiable.headers"/> as being subject to the no-transform
2047      directive. This implies that the cache or proxy &MUST-NOT; change
2048      any aspect of the entity-body that is specified by these headers,
2049      including the value of the entity-body itself.
2050  </t></list>
2054<section title="Cache Control Extensions" anchor="cache.control.extensions">
2056   The Cache-Control header field can be extended through the use of one
2057   or more cache-extension tokens, each with an optional assigned value.
2058   Informational extensions (those which do not require a change in
2059   cache behavior) &MAY; be added without changing the semantics of other
2060   directives. Behavioral extensions are designed to work by acting as
2061   modifiers to the existing base of cache directives. Both the new
2062   directive and the standard directive are supplied, such that
2063   applications which do not understand the new directive will default
2064   to the behavior specified by the standard directive, and those that
2065   understand the new directive will recognize it as modifying the
2066   requirements associated with the standard directive. In this way,
2067   extensions to the cache-control directives can be made without
2068   requiring changes to the base protocol.
2071   This extension mechanism depends on an HTTP cache obeying all of the
2072   cache-control directives defined for its native HTTP-version, obeying
2073   certain extensions, and ignoring all directives that it does not
2074   understand.
2077   For example, consider a hypothetical new response directive called
2078   community which acts as a modifier to the private directive. We
2079   define this new directive to mean that, in addition to any non-shared
2080   cache, any cache which is shared only by members of the community
2081   named within its value may cache the response. An origin server
2082   wishing to allow the UCI community to use an otherwise private
2083   response in their shared cache(s) could do so by including
2085<figure><artwork type="example">
2086    Cache-Control: private, community="UCI"
2089   A cache seeing this header field will act correctly even if the cache
2090   does not understand the community cache-extension, since it will also
2091   see and understand the private directive and thus default to the safe
2092   behavior.
2095   Unrecognized cache-directives &MUST; be ignored; it is assumed that any
2096   cache-directive likely to be unrecognized by an HTTP/1.1 cache will
2097   be combined with standard directives (or the response's default
2098   cacheability) such that the cache behavior will remain minimally
2099   correct even if the cache does not understand the extension(s).
2104<section title="Expires" anchor="header.expires">
2105  <iref primary="true" item="Expires header" x:for-anchor=""/>
2106  <iref primary="true" item="Headers" subitem="Expires" x:for-anchor=""/>
2108   The Expires entity-header field gives the date/time after which the
2109   response is considered stale. A stale cache entry may not normally be
2110   returned by a cache (either a proxy cache or a user agent cache)
2111   unless it is first validated with the origin server (or with an
2112   intermediate cache that has a fresh copy of the entity). See <xref target="expiration.model"/>
2113   for further discussion of the expiration model.
2116   The presence of an Expires field does not imply that the original
2117   resource will change or cease to exist at, before, or after that
2118   time.
2121   The format is an absolute date and time as defined by HTTP-date in
2122   &full-date;; it &MUST; be in RFC 1123 date format:
2124<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Expires"/>
2125   Expires = "Expires" ":" HTTP-date
2128   An example of its use is
2130<figure><artwork type="example">
2131   Expires: Thu, 01 Dec 1994 16:00:00 GMT
2134  <list><t>
2135      <x:h>Note:</x:h> if a response includes a Cache-Control field with the max-age
2136      directive (see <xref target="modifications.of.the.basic.expiration.mechanism"/>), that directive overrides the
2137      Expires field.
2138  </t></list>
2141   HTTP/1.1 clients and caches &MUST; treat other invalid date formats,
2142   especially including the value "0", as in the past (i.e., "already
2143   expired").
2146   To mark a response as "already expired," an origin server sends an
2147   Expires date that is equal to the Date header value. (See the rules
2148   for expiration calculations in <xref target="expiration.calculations"/>.)
2151   To mark a response as "never expires," an origin server sends an
2152   Expires date approximately one year from the time the response is
2153   sent. HTTP/1.1 servers &SHOULD-NOT;  send Expires dates more than one
2154   year in the future.
2157   The presence of an Expires header field with a date value of some
2158   time in the future on a response that otherwise would by default be
2159   non-cacheable indicates that the response is cacheable, unless
2160   indicated otherwise by a Cache-Control header field (<xref target="header.cache-control"/>).
2164<section title="Pragma" anchor="header.pragma">
2165  <iref primary="true" item="Pragma header" x:for-anchor=""/>
2166  <iref primary="true" item="Headers" subitem="Pragma" x:for-anchor=""/>
2168   The Pragma general-header field is used to include implementation-specific
2169   directives that might apply to any recipient along the
2170   request/response chain. All pragma directives specify optional
2171   behavior from the viewpoint of the protocol; however, some systems
2172   &MAY; require that behavior be consistent with the directives.
2174<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"/>
2175    Pragma            = "Pragma" ":" 1#pragma-directive
2176    pragma-directive  = "no-cache" | extension-pragma
2177    extension-pragma  = token [ "=" ( token | quoted-string ) ]
2180   When the no-cache directive is present in a request message, an
2181   application &SHOULD; forward the request toward the origin server even
2182   if it has a cached copy of what is being requested. This pragma
2183   directive has the same semantics as the no-cache cache-directive (see
2184   <xref target="header.cache-control"/>) and is defined here for backward compatibility with
2185   HTTP/1.0. Clients &SHOULD; include both header fields when a no-cache
2186   request is sent to a server not known to be HTTP/1.1 compliant.
2189   Pragma directives &MUST; be passed through by a proxy or gateway
2190   application, regardless of their significance to that application,
2191   since the directives might be applicable to all recipients along the
2192   request/response chain. It is not possible to specify a pragma for a
2193   specific recipient; however, any pragma directive not relevant to a
2194   recipient &SHOULD; be ignored by that recipient.
2197   HTTP/1.1 caches &SHOULD; treat "Pragma: no-cache" as if the client had
2198   sent "Cache-Control: no-cache". No new Pragma directives will be
2199   defined in HTTP.
2200  <list><t>
2201      <x:h>Note:</x:h> because the meaning of "Pragma: no-cache as a response
2202      header field is not actually specified, it does not provide a
2203      reliable replacement for "Cache-Control: no-cache" in a response
2204  </t></list>
2208<section title="Vary" anchor="header.vary">
2209  <iref primary="true" item="Vary header" x:for-anchor=""/>
2210  <iref primary="true" item="Headers" subitem="Vary" x:for-anchor=""/>
2212   The Vary field value indicates the set of request-header fields that
2213   fully determines, while the response is fresh, whether a cache is
2214   permitted to use the response to reply to a subsequent request
2215   without revalidation. For uncacheable or stale responses, the Vary
2216   field value advises the user agent about the criteria that were used
2217   to select the representation. A Vary field value of "*" implies that
2218   a cache cannot determine from the request headers of a subsequent
2219   request whether this response is the appropriate representation. See
2220   <xref target="caching.negotiated.responses"/> for use of the Vary header field by caches.
2222<figure><artwork type="abnf2616"><iref primary="true" item="Grammar" subitem="Vary"/>
2223    Vary  = "Vary" ":" ( "*" | 1#field-name )
2226   An HTTP/1.1 server &SHOULD; include a Vary header field with any
2227   cacheable response that is subject to server-driven negotiation.
2228   Doing so allows a cache to properly interpret future requests on that
2229   resource and informs the user agent about the presence of negotiation
2230   on that resource. A server &MAY; include a Vary header field with a
2231   non-cacheable response that is subject to server-driven negotiation,
2232   since this might provide the user agent with useful information about
2233   the dimensions over which the response varies at the time of the
2234   response.
2237   A Vary field value consisting of a list of field-names signals that
2238   the representation selected for the response is based on a selection
2239   algorithm which considers ONLY the listed request-header field values
2240   in selecting the most appropriate representation. A cache &MAY; assume
2241   that the same selection will be made for future requests with the
2242   same values for the listed field names, for the duration of time for
2243   which the response is fresh.
2246   The field-names given are not limited to the set of standard
2247   request-header fields defined by this specification. Field names are
2248   case-insensitive.
2251   A Vary field value of "*" signals that unspecified parameters not
2252   limited to the request-headers (e.g., the network address of the
2253   client), play a role in the selection of the response representation.
2254   The "*" value &MUST-NOT; be generated by a proxy server; it may only be
2255   generated by an origin server.
2259<section title="Warning" anchor="header.warning">
2260  <iref primary="true" item="Warning header" x:for-anchor=""/>
2261  <iref primary="true" item="Headers" subitem="Warning" x:for-anchor=""/>
2263   The Warning general-header field is used to carry additional
2264   information about the status or transformation of a message which
2265   might not be reflected in the message. This information is typically
2266   used to warn about a possible lack of semantic transparency from
2267   caching operations or transformations applied to the entity body of
2268   the message.
2271   Warning headers are sent with responses using:
2273<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"/>
2274    Warning    = "Warning" ":" 1#warning-value
2276    warning-value = warn-code SP warn-agent SP warn-text
2277                                          [SP warn-date]
2279    warn-code  = 3DIGIT
2280    warn-agent = ( host [ ":" port ] ) | pseudonym
2281                    ; the name or pseudonym of the server adding
2282                    ; the Warning header, for use in debugging
2283    warn-text  = quoted-string
2284    warn-date  = &lt;"&gt; HTTP-date &lt;"&gt;
2287   A response &MAY; carry more than one Warning header.
2290   The warn-text &SHOULD; be in a natural language and character set that
2291   is most likely to be intelligible to the human user receiving the
2292   response. This decision &MAY; be based on any available knowledge, such
2293   as the location of the cache or user, the Accept-Language field in a
2294   request, the Content-Language field in a response, etc. The default
2295   language is English and the default character set is ISO-8859-1.
2298   If a character set other than ISO-8859-1 is used, it &MUST; be encoded
2299   in the warn-text using the method described in RFC 2047 <xref target="RFC2047"/>.
2302   Warning headers can in general be applied to any message, however
2303   some specific warn-codes are specific to caches and can only be
2304   applied to response messages. New Warning headers &SHOULD; be added
2305   after any existing Warning headers. A cache &MUST-NOT; delete any
2306   Warning header that it received with a message. However, if a cache
2307   successfully validates a cache entry, it &SHOULD; remove any Warning
2308   headers previously attached to that entry except as specified for
2309   specific Warning codes. It &MUST; then add any Warning headers received
2310   in the validating response. In other words, Warning headers are those
2311   that would be attached to the most recent relevant response.
2314   When multiple Warning headers are attached to a response, the user
2315   agent ought to inform the user of as many of them as possible, in the
2316   order that they appear in the response. If it is not possible to
2317   inform the user of all of the warnings, the user agent &SHOULD; follow
2318   these heuristics:
2319  <list style="symbols">
2320    <t>Warnings that appear early in the response take priority over
2321        those appearing later in the response.</t>
2323    <t>Warnings in the user's preferred character set take priority
2324        over warnings in other character sets but with identical warn-codes
2325        and warn-agents.</t>
2326  </list>
2329   Systems that generate multiple Warning headers &SHOULD; order them with
2330   this user agent behavior in mind.
2333   Requirements for the behavior of caches with respect to Warnings are
2334   stated in <xref target="warnings"/>.
2337   This is a list of the currently-defined warn-codes, each with a
2338   recommended warn-text in English, and a description of its meaning.
2341   110 Response is stale
2342  <list><t>
2343     &MUST; be included whenever the returned response is stale.
2344  </t></list>
2347   111 Revalidation failed
2348  <list><t>
2349     &MUST; be included if a cache returns a stale response because an
2350     attempt to revalidate the response failed, due to an inability to
2351     reach the server.
2352  </t></list>
2355   112 Disconnected operation
2356  <list><t>
2357     &SHOULD; be included if the cache is intentionally disconnected from
2358     the rest of the network for a period of time.
2359  </t></list>
2362   113 Heuristic expiration
2363  <list><t>
2364     &MUST; be included if the cache heuristically chose a freshness
2365     lifetime greater than 24 hours and the response's age is greater
2366     than 24 hours.
2367  </t></list>
2370   199 Miscellaneous warning
2371  <list><t>
2372     The warning text &MAY; include arbitrary information to be presented
2373     to a human user, or logged. A system receiving this warning &MUST-NOT;
2374     take any automated action, besides presenting the warning to
2375     the user.
2376  </t></list>
2379   214 Transformation applied
2380  <list><t>
2381     &MUST; be added by an intermediate cache or proxy if it applies any
2382     transformation changing the content-coding (as specified in the
2383     Content-Encoding header) or media-type (as specified in the
2384     Content-Type header) of the response, or the entity-body of the
2385     response, unless this Warning code already appears in the response.
2386  </t></list>
2389   299 Miscellaneous persistent warning
2390  <list><t>
2391     The warning text &MAY; include arbitrary information to be presented
2392     to a human user, or logged. A system receiving this warning &MUST-NOT;
2393     take any automated action.
2394  </t></list>
2397   If an implementation sends a message with one or more Warning headers
2398   whose version is HTTP/1.0 or lower, then the sender &MUST; include in
2399   each warning-value a warn-date that matches the date in the response.
2402   If an implementation receives a message with a warning-value that
2403   includes a warn-date, and that warn-date is different from the Date
2404   value in the response, then that warning-value &MUST; be deleted from
2405   the message before storing, forwarding, or using it. (This prevents
2406   bad consequences of naive caching of Warning header fields.) If all
2407   of the warning-values are deleted for this reason, the Warning header
2408   &MUST; be deleted as well.
2414<section title="IANA Considerations" anchor="IANA.considerations">
2416   TBD.
2420<section title="Security Considerations" anchor="security.considerations">
2422   Caching proxies provide additional potential vulnerabilities, since
2423   the contents of the cache represent an attractive target for
2424   malicious exploitation. Because cache contents persist after an HTTP
2425   request is complete, an attack on the cache can reveal information
2426   long after a user believes that the information has been removed from
2427   the network. Therefore, cache contents should be protected as
2428   sensitive information.
2432<section title="Acknowledgments" anchor="ack">
2434   Much of the content and presentation of the caching design is due to
2435   suggestions and comments from individuals including: Shel Kaphan,
2436   Paul Leach, Koen Holtman, David Morris, and Larry Masinter.
2443<reference anchor="Part1">
2444   <front>
2445      <title abbrev="HTTP/1.1">HTTP/1.1, part 1: URIs, Connections, and Message Parsing</title>
2446      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2447         <organization abbrev="Day Software">Day Software</organization>
2448         <address><email></email></address>
2449      </author>
2450      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2451         <organization>One Laptop per Child</organization>
2452         <address><email></email></address>
2453      </author>
2454      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2455         <organization abbrev="HP">Hewlett-Packard Company</organization>
2456         <address><email></email></address>
2457      </author>
2458      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2459         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2460         <address><email></email></address>
2461      </author>
2462      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2463         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2464         <address><email></email></address>
2465      </author>
2466      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2467         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2468         <address><email></email></address>
2469      </author>
2470      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2471         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2472         <address><email></email></address>
2473      </author>
2474      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2475         <organization abbrev="W3C">World Wide Web Consortium</organization>
2476         <address><email></email></address>
2477      </author>
2478      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2479         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2480         <address><email></email></address>
2481      </author>
2482      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2483   </front>
2484   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p1-messaging-&ID-VERSION;"/>
2485   <x:source href="p1-messaging.xml" basename="p1-messaging"/>
2488<reference anchor="Part2">
2489   <front>
2490      <title abbrev="HTTP/1.1">HTTP/1.1, part 2: Message Semantics</title>
2491      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2492         <organization abbrev="Day Software">Day Software</organization>
2493         <address><email></email></address>
2494      </author>
2495      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2496         <organization>One Laptop per Child</organization>
2497         <address><email></email></address>
2498      </author>
2499      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2500         <organization abbrev="HP">Hewlett-Packard Company</organization>
2501         <address><email></email></address>
2502      </author>
2503      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2504         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2505         <address><email></email></address>
2506      </author>
2507      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2508         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2509         <address><email></email></address>
2510      </author>
2511      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2512         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2513         <address><email></email></address>
2514      </author>
2515      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2516         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2517         <address><email></email></address>
2518      </author>
2519      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2520         <organization abbrev="W3C">World Wide Web Consortium</organization>
2521         <address><email></email></address>
2522      </author>
2523      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2524         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2525         <address><email></email></address>
2526      </author>
2527      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2528   </front>
2529   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p2-semantics-&ID-VERSION;"/>
2530   <x:source href="p2-semantics.xml" basename="p2-semantics"/>
2533<reference anchor="Part3">
2534   <front>
2535      <title abbrev="HTTP/1.1">HTTP/1.1, part 3: Message Payload and Content Negotiation</title>
2536      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2537         <organization abbrev="Day Software">Day Software</organization>
2538         <address><email></email></address>
2539      </author>
2540      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2541         <organization>One Laptop per Child</organization>
2542         <address><email></email></address>
2543      </author>
2544      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2545         <organization abbrev="HP">Hewlett-Packard Company</organization>
2546         <address><email></email></address>
2547      </author>
2548      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2549         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2550         <address><email></email></address>
2551      </author>
2552      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2553         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2554         <address><email></email></address>
2555      </author>
2556      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2557         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2558         <address><email></email></address>
2559      </author>
2560      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2561         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2562         <address><email></email></address>
2563      </author>
2564      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2565         <organization abbrev="W3C">World Wide Web Consortium</organization>
2566         <address><email></email></address>
2567      </author>
2568      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2569         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2570         <address><email></email></address>
2571      </author>
2572      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2573   </front>
2574   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p3-payload-&ID-VERSION;"/>
2575   <x:source href="p3-payload.xml" basename="p3-payload"/>
2578<reference anchor="Part4">
2579   <front>
2580      <title abbrev="HTTP/1.1">HTTP/1.1, part 4: Conditional Requests</title>
2581      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2582         <organization abbrev="Day Software">Day Software</organization>
2583         <address><email></email></address>
2584      </author>
2585      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2586         <organization>One Laptop per Child</organization>
2587         <address><email></email></address>
2588      </author>
2589      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2590         <organization abbrev="HP">Hewlett-Packard Company</organization>
2591         <address><email></email></address>
2592      </author>
2593      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2594         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2595         <address><email></email></address>
2596      </author>
2597      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2598         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2599         <address><email></email></address>
2600      </author>
2601      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2602         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2603         <address><email></email></address>
2604      </author>
2605      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2606         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2607         <address><email></email></address>
2608      </author>
2609      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2610         <organization abbrev="W3C">World Wide Web Consortium</organization>
2611         <address><email></email></address>
2612      </author>
2613      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2614         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2615         <address><email></email></address>
2616      </author>
2617      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2618   </front>
2619   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p4-conditional-&ID-VERSION;"/>
2620   <x:source href="p4-conditional.xml" basename="p4-conditional"/>
2623<reference anchor="Part5">
2624   <front>
2625      <title abbrev="HTTP/1.1">HTTP/1.1, part 5: Range Requests and Partial Responses</title>
2626      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2627         <organization abbrev="Day Software">Day Software</organization>
2628         <address><email></email></address>
2629      </author>
2630      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2631         <organization>One Laptop per Child</organization>
2632         <address><email></email></address>
2633      </author>
2634      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2635         <organization abbrev="HP">Hewlett-Packard Company</organization>
2636         <address><email></email></address>
2637      </author>
2638      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2639         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2640         <address><email></email></address>
2641      </author>
2642      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2643         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2644         <address><email></email></address>
2645      </author>
2646      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2647         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2648         <address><email></email></address>
2649      </author>
2650      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2651         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2652         <address><email></email></address>
2653      </author>
2654      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2655         <organization abbrev="W3C">World Wide Web Consortium</organization>
2656         <address><email></email></address>
2657      </author>
2658      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2659         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2660         <address><email></email></address>
2661      </author>
2662      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2663   </front>
2664   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p5-range-&ID-VERSION;"/>
2665   <x:source href="p5-range.xml" basename="p5-range"/>
2668<reference anchor="Part7">
2669   <front>
2670      <title abbrev="HTTP/1.1">HTTP/1.1, part 7: Authentication</title>
2671      <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor">
2672         <organization abbrev="Day Software">Day Software</organization>
2673         <address><email></email></address>
2674      </author>
2675      <author initials="J." surname="Gettys" fullname="Jim Gettys">
2676         <organization>One Laptop per Child</organization>
2677         <address><email></email></address>
2678      </author>
2679      <author initials="J." surname="Mogul" fullname="Jeffrey C. Mogul">
2680         <organization abbrev="HP">Hewlett-Packard Company</organization>
2681         <address><email></email></address>
2682      </author>
2683      <author initials="H." surname="Frystyk" fullname="Henrik Frystyk Nielsen">
2684         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2685         <address><email></email></address>
2686      </author>
2687      <author initials="L." surname="Masinter" fullname="Larry Masinter">
2688         <organization abbrev="Adobe Systems">Adobe Systems, Incorporated</organization>
2689         <address><email></email></address>
2690      </author>
2691      <author initials="P." surname="Leach" fullname="Paul J. Leach">
2692         <organization abbrev="Microsoft">Microsoft Corporation</organization>
2693         <address><email></email></address>
2694      </author>
2695      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
2696         <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
2697         <address><email></email></address>
2698      </author>
2699      <author initials="Y." surname="Lafon" fullname="Yves Lafon" role="editor">
2700         <organization abbrev="W3C">World Wide Web Consortium</organization>
2701         <address><email></email></address>
2702      </author>
2703      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor">
2704         <organization abbrev="greenbytes">greenbytes GmbH</organization>
2705         <address><email></email></address>
2706      </author>
2707      <date month="&ID-MONTH;" year="&ID-YEAR;"/>
2708   </front>
2709   <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-p7-auth-&ID-VERSION;"/>
2710   <x:source href="p7-auth.xml" basename="p7-auth"/>
2713<reference anchor="RFC2616">
2714   <front>
2715      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2716      <author initials="R." surname="Fielding" fullname="R. Fielding">
2717         <organization>University of California, Irvine</organization>
2718         <address><email></email></address>
2719      </author>
2720      <author initials="J." surname="Gettys" fullname="J. Gettys">
2721         <organization>W3C</organization>
2722         <address><email></email></address>
2723      </author>
2724      <author initials="J." surname="Mogul" fullname="J. Mogul">
2725         <organization>Compaq Computer Corporation</organization>
2726         <address><email></email></address>
2727      </author>
2728      <author initials="H." surname="Frystyk" fullname="H. Frystyk">
2729         <organization>MIT Laboratory for Computer Science</organization>
2730         <address><email></email></address>
2731      </author>
2732      <author initials="L." surname="Masinter" fullname="L. Masinter">
2733         <organization>Xerox Corporation</organization>
2734         <address><email></email></address>
2735      </author>
2736      <author initials="P." surname="Leach" fullname="P. Leach">
2737         <organization>Microsoft Corporation</organization>
2738         <address><email></email></address>
2739      </author>
2740      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
2741         <organization>W3C</organization>
2742         <address><email></email></address>
2743      </author>
2744      <date month="June" year="1999"/>
2745   </front>
2746   <seriesInfo name="RFC" value="2616"/>
2749<reference anchor="RFC2047">
2751<title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
2752<author initials="K." surname="Moore" fullname="Keith Moore">
2753<organization>University of Tennessee</organization>
2756<street>107 Ayres Hall</street>
2757<street>Knoxville TN 37996-1301</street></postal>
2759<date month="November" year="1996"/>
2761<keyword>Amercian Standard Code for Information Interchange</keyword>
2763<keyword>multipurpose internet mail extensions</keyword>
2765<seriesInfo name="RFC" value="2047"/>
2768<reference anchor="RFC1305">
2770<title>Network Time Protocol (Version 3) Specification, Implementation</title>
2771<author initials="D." surname="Mills" fullname="David L. Mills">
2772<organization>University of Delaware, Electrical Engineering Department</organization>
2780<phone>+1 302 451 8247</phone>
2782<date month="March" year="1992"/>
2784<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>
2785<seriesInfo name="RFC" value="1305"/>
2790<section title="Changes from RFC 2068" anchor="changes.from.rfc.2068">
2792   A case was missed in the Cache-Control model of HTTP/1.1; s-maxage
2793   was introduced to add this missing case. (Sections <xref target="response.cacheability" format="counter"/>,
2794   <xref target="header.cache-control" format="counter"/>,
2795   <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>)
2798   The Cache-Control: max-age directive was not properly defined for
2799   responses. (<xref target="modifications.of.the.basic.expiration.mechanism"/>)
2802   Warnings could be cached incorrectly, or not updated appropriately.
2803   (Section <xref target="warnings" format="counter"/>, <xref target="expiration.calculations" format="counter"/>, <xref target="non-modifiable.headers" format="counter"/>,
2804   <xref target="combining.headers" format="counter"/>, <xref target="modifications.of.the.basic.expiration.mechanism" format="counter"/>,
2805   and <xref target="header.warning" format="counter"/>) Warning
2806   also needed to be a general header, as PUT or other methods may have
2807   need for it in requests.
Note: See TracBrowser for help on using the repository browser.