source: draft-ietf-httpbis/00/draft-ietf-httpbis-p6-cache-00.xml @ 67

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

Record the day of submission (2007-12-20) so that future runs of xml2rfc can produce the correct front matter.

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