source: draft-ietf-httpbis/latest/auth48/rfc7234-to-be.xml @ 2683

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

updated AUTH48 version of RFC7234 (#553)

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 100.4 KB
Line 
1<?xml version="1.0" encoding="US-ASCII"?>
2
3<!-- v1 -->
4<!--
5    This XML document is the output of clean-for-DTD.xslt; a tool that strips
6    extensions to RFC2629(bis) from documents for processing with xml2rfc.
7-->
8<?xml-stylesheet type='text/xsl' href='../myxml2rfc.xslt'?>
9<?rfc toc="yes" ?>
10<?rfc symrefs="yes" ?>
11<?rfc sortrefs="yes" ?>
12<?rfc compact="yes"?>
13<?rfc subcompact="no" ?>
14<?rfc linkmailto="no" ?>
15<?rfc editing="no" ?>
16<?rfc comments="yes"?>
17<?rfc inline="yes"?>
18<?rfc rfcedstyle="yes"?>
19<!DOCTYPE rfc
20  PUBLIC "" "rfc2629.dtd">
21<rfc submissionType="IETF" category="std" consensus="yes" number="7234" ipr="pre5378Trust200902" obsoletes="2616">
22
23
24<front>
25
26  <title abbrev="HTTP/1.1 Caching">Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
27
28  <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
29    <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
30    <address>
31      <postal>
32        <street>345 Park Ave</street>
33        <city>San Jose</city>
34        <region>CA</region>
35        <code>95110</code>
36        <country>USA</country>
37      </postal>
38      <email>fielding@gbiv.com</email>
39      <uri>http://roy.gbiv.com/</uri>
40    </address>
41  </author>
42
43  <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
44    <organization>Akamai</organization>
45    <address>
46      <email>mnot@mnot.net</email>
47      <uri>http://www.mnot.net/</uri>
48    </address>
49  </author>
50
51  <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
52    <organization abbrev="greenbytes">greenbytes GmbH</organization>
53    <address>
54      <postal>
55        <street>Hafenweg 16</street>
56        <city>Muenster</city><region>NW</region><code>48155</code>
57        <country>Germany</country>
58      </postal>
59      <email>julian.reschke@greenbytes.de</email>
60      <uri>http://greenbytes.de/tech/webdav/</uri>
61    </address>
62  </author>
63
64  <date month="May" year="2014"/>
65
66  <area>Applications</area>
67  <workgroup>HTTPbis Working Group</workgroup>
68
69
70
71<keyword>HTTP, caching</keyword>
72
73<abstract>
74<t>
75   The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for
76   distributed, collaborative, hypertext information systems. This document
77   defines HTTP caches and the associated header fields
78   that control cache behavior or indicate cacheable response messages.
79</t>
80</abstract>
81
82   </front>
83   <middle>
84
85<section anchor="caching" title="Introduction">
86<t>
87   HTTP is typically used for distributed information systems, where
88   performance can be improved by the use of response caches. This document
89   defines aspects of HTTP/1.1 related to caching and reusing response
90   messages.
91</t>
92
93<iref item="cache"/>
94<t>
95   An HTTP cache is a local store of response messages and the
96   subsystem that controls storage, retrieval, and deletion of messages in it.
97   A cache stores cacheable responses in order to reduce the response time and
98   network bandwidth consumption on future, equivalent requests. Any client or
99   server MAY employ a cache, though a cache cannot be used by a server that
100   is acting as a tunnel.
101</t>
102<iref item="shared cache"/>
103<iref item="private cache"/>
104<t anchor="shared.and.private.caches">
105   A shared cache is a cache that stores responses to be reused
106   by more than one user; shared caches are usually (but not always) deployed
107   as a part of an intermediary. A private cache, in contrast,
108   is dedicated to a single user; often, they are deployed as a component of
109   a user agent.
110</t>
111<t>
112   The goal of caching in HTTP/1.1 is to significantly improve performance
113   by reusing a prior response message to satisfy a current request.
114   A stored response is considered "fresh", as defined in
115   <xref target="expiration.model"/>, if the response can be reused without
116   "validation" (checking with the origin server to see if the cached response
117   remains valid for this request).  A fresh response can therefore
118   reduce both latency and network overhead each time it is reused.
119   When a cached response is not fresh, it might still be reusable if it can
120   be freshened by validation (<xref target="validation.model"/>) or if the
121   origin is unavailable (<xref target="serving.stale.responses"/>).
122</t>
123
124<section title="Conformance and Error Handling" anchor="conformance">
125<t>
126   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
127   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
128   document are to be interpreted as described in <xref target="RFC2119"/>.
129</t>
130<t>
131   Conformance criteria and considerations regarding error handling
132   are defined in Section 2.5 of <xref target="RFC7230"/>.
133</t>
134</section>
135
136<section title="Syntax Notation" anchor="notation">
137<t>
138   This specification uses the Augmented Backus-Naur Form (ABNF) notation of
139   <xref target="RFC5234"/> with a list extension, defined in
140   Section 7 of <xref target="RFC7230"/>, that allows for compact definition of
141   comma-separated lists using a '#' operator (similar to how the '*' operator
142   indicates repetition).
143   <xref target="imported.abnf"/> describes rules imported from
144   other documents.
145   <xref target="collected.abnf"/> shows the collected grammar with all list
146   operators expanded to standard ABNF notation.
147</t>
148
149<section title="Delta Seconds" anchor="delta-seconds">
150<t>
151   The delta-seconds rule specifies a non-negative integer, representing time
152   in seconds.
153</t>
154<figure><iref item="Grammar" primary="true" subitem="delta-seconds"/><artwork type="abnf2616"><![CDATA[
155  delta-seconds  = 1*DIGIT
156]]></artwork></figure>
157<t>
158   A recipient parsing a delta-seconds value and converting it to binary form
159   ought to use an arithmetic type of at least 31 bits of non-negative integer
160   range.
161   If a cache receives a delta-seconds value greater than the greatest integer
162   it can represent, or if any of its subsequent calculations overflows,
163   the cache MUST consider the value to be either 2147483648
164   (2^31) or the greatest positive integer it can conveniently
165   represent.
166</t>
167<t><list>
168   <t>
169       Note: The value 2147483648 is here for historical reasons, effectively
170       represents infinity (over 68 years), and does not need to be stored in
171       binary form; an implementation could produce it as a canned string if
172       any overflow occurs, even if the calculations are performed with an
173       arithmetic type incapable of directly representing that number.
174       What matters here is that an overflow be detected and not treated as a
175       negative value in later calculations.
176   </t>
177</list></t>
178</section>
179
180</section>
181</section>
182
183<section anchor="caching.overview" title="Overview of Cache Operation">
184<iref item="cache entry"/>
185<iref item="cache key"/>
186<t>
187   Proper cache operation preserves the semantics of HTTP transfers
188   (<xref target="RFC7231"/>) while eliminating the transfer of information already held
189   in the cache.  Although caching is an entirely OPTIONAL feature of HTTP,
190   it can be assumed that reusing a cached response is desirable and that such
191   reuse is the default behavior when no requirement or local
192   configuration prevents it.  Therefore, HTTP cache requirements are focused
193   on preventing a cache from either storing a non-reusable response or
194   reusing a stored response inappropriately, rather than mandating that
195   caches always store and reuse particular responses.
196</t>
197<t>
198   Each cache entry consists of a cache key and one or more
199   HTTP responses corresponding to prior requests that used the same key. The
200   most common form of cache entry is a successful result of a retrieval
201   request: i.e., a 200 (OK) response to a GET request, which
202   contains a representation of the resource identified by the request target
203   (Section 4.3.1 of <xref target="RFC7231"/>). However, it is also possible to cache permanent redirects,
204   negative results (e.g., 404 (Not Found)),
205   incomplete results (e.g., 206 (Partial Content)), and
206   responses to methods other than GET if the method's definition allows such
207   caching and defines something suitable for use as a cache key.
208</t>
209<iref item="cache key"/>
210<t>
211   The primary cache key consists of the request method and
212   target URI.  However, since HTTP caches in common use today are typically
213   limited to caching responses to GET, many caches simply decline
214   other methods and use only the URI as the primary cache key.
215</t>
216<t>
217   If a request target is subject to content negotiation, its cache entry
218   might consist of multiple stored responses, each differentiated by a
219   secondary key for the values of the original request's selecting header
220   fields (<xref target="caching.negotiated.responses"/>).
221</t>
222</section>
223
224<section anchor="response.cacheability" title="Storing Responses in Caches">
225<t>
226   A cache MUST NOT store a response to any request, unless:
227   <list style="symbols">
228      <t>The request method is understood by the cache and defined as being
229      cacheable, and</t>
230      <t>the response status code is understood by the cache, and</t>
231      <t>the "no-store" cache directive (see <xref target="header.cache-control"/>) does not appear in request or response
232      header fields, and</t>
233      <t>the "private" response directive (see <xref target="cache-response-directive.private"/>) does not appear in the
234      response, if the cache is shared, and</t>
235      <t>the Authorization header field (see
236      Section 4.2 of <xref target="RFC7235"/>) does not appear in the request, if the cache is
237      shared, unless the response explicitly allows it (see <xref target="caching.authenticated.responses"/>), and</t>
238      <t>the response either:
239         <list style="symbols">
240            <t>contains an <xref target="header.expires" format="none">Expires</xref> header field (see
241            <xref target="header.expires"/>), or</t>
242            <t>contains a max-age response directive (see <xref target="cache-response-directive.max-age"/>), or</t>
243            <t>contains a s-maxage response directive (see <xref target="cache-response-directive.s-maxage"/>) and the cache is
244            shared, or</t>
245            <t>contains a Cache Control Extension (see <xref target="cache.control.extensions"/>) that allows it to be cached,
246            or</t>
247            <t>has a status code that is defined as cacheable by default
248            (see <xref target="heuristic.freshness"/>), or</t>
249            <t>contains a public response directive (see <xref target="cache-response-directive.public"/>).</t>
250         </list>
251      </t>
252   </list>
253</t>
254<t>
255   Note that any of the requirements listed above can be overridden by a
256   cache-control extension; see <xref target="cache.control.extensions"/>.
257</t>
258<t>
259   In this context, a cache has "understood" a request method or a response
260   status code if it recognizes it and implements all specified
261   caching-related behavior.
262</t>
263<t>
264   Note that, in normal operation, some caches will not store a response that
265   has neither a cache validator nor an explicit expiration time, as such
266   responses are not usually useful to store. However, caches are not
267   prohibited from storing such responses.
268</t>
269
270<section anchor="incomplete.responses" title="Storing Incomplete Responses">
271<t>
272   A response message is considered complete when all of the octets indicated
273   by the message framing (<xref target="RFC7230"/>) are received prior to the connection
274   being closed. If the request method is GET, the response status code is
275   200 (OK), and the entire response header section has been received, a
276   cache MAY store an incomplete response message body if the cache entry is
277   recorded as incomplete. Likewise, a 206 (Partial Content)
278   response MAY be stored as if it were an incomplete 200
279   (OK) cache entry. However, a cache MUST NOT store incomplete or
280   partial-content responses if it does not support the Range
281   and Content-Range header fields or if it does not understand
282   the range units used in those fields.
283</t>
284<t>
285   A cache MAY complete a stored incomplete response by making a subsequent
286   range request (<xref target="RFC7233"/>) and combining the successful response with the
287   stored entry, as defined in <xref target="combining.responses"/>. A cache
288   MUST NOT use an incomplete response to answer requests unless the
289   response has been made complete or the request is partial and specifies a
290   range that is wholly within the incomplete response. A cache MUST NOT
291   send a partial response to a client without explicitly marking it as such
292   using the 206 (Partial Content) status code.
293</t>
294</section>
295
296
297<section anchor="caching.authenticated.responses" title="Storing Responses to Authenticated Requests">
298<t>
299   A shared cache MUST NOT use a cached response to a request with an
300   Authorization header field (Section 4.2 of <xref target="RFC7235"/>) to
301   satisfy any subsequent request unless a cache directive that allows such
302   responses to be stored is present in the response.
303</t>
304<t>
305   In this specification, the following <xref target="header.cache-control" format="none">Cache-Control</xref> response
306   directives (<xref target="cache-response-directive"/>) have such an effect:
307   must-revalidate, public, and s-maxage.
308</t>
309<t>
310   Note that cached responses that contain the "must-revalidate" and/or
311   "s-maxage" response directives are not allowed to be served stale (<xref target="serving.stale.responses"/>) by shared caches. In particular, a
312   response with either "max-age=0, must-revalidate" or "s-maxage=0" cannot be
313   used to satisfy a subsequent request without revalidating it on the origin
314   server.
315</t>
316</section>
317
318<section anchor="combining.responses" title="Combining Partial Content">
319<t>
320   A response might transfer only a partial representation if the
321   connection closed prematurely or if the request used one or more Range
322   specifiers (<xref target="RFC7233"/>).  After several such transfers, a cache might have
323   received several ranges of the same representation.  A cache MAY combine
324   these ranges into a single stored response, and reuse that response to
325   satisfy later requests, if they all share the same strong validator and
326   the cache complies with the client requirements in Section 4.3 of <xref target="RFC7233"/>.
327</t>
328<t>
329   When combining the new response with one or more stored responses, a
330   cache MUST:
331   <list style="symbols">
332      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
333         with warn-code 1xx (see <xref target="header.warning"/>);</t>
334      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
335         with warn-code 2xx; and,</t>
336      <t>use other header fields provided in the new response, aside
337         from Content-Range, to replace all instances of the
338         corresponding header fields in the stored response.</t>
339   </list>
340</t>
341</section>
342
343</section>
344
345
346<section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches">
347
348<t>
349   When presented with a request, a cache MUST NOT reuse a stored response,
350   unless:
351   <list style="symbols">
352      <t>The presented effective request URI (Section 5.5 of <xref target="RFC7230"/>) and
353      that of the stored response match, and</t>
354      <t>the request method associated with the stored response allows it to
355      be used for the presented request, and</t>
356      <t>selecting header fields nominated by the stored response (if any)
357      match those presented (see <xref target="caching.negotiated.responses"/>), and</t>
358      <t>the presented request does not contain the no-cache pragma (<xref target="header.pragma"/>), nor the no-cache cache directive (<xref target="cache-request-directive"/>), unless the stored response is
359      successfully validated (<xref target="validation.model"/>), and</t>
360      <t>the stored response does not contain the no-cache cache directive
361      (<xref target="cache-response-directive.no-cache"/>), unless it is
362      successfully validated (<xref target="validation.model"/>), and</t>
363      <t>the stored response is either:
364         <list style="symbols">
365            <t>fresh (see <xref target="expiration.model"/>), or</t>
366            <t>allowed to be served stale (see <xref target="serving.stale.responses"/>), or</t>
367            <t>successfully validated (see <xref target="validation.model"/>).</t>
368         </list>
369      </t>
370  </list>
371</t>
372<t>
373   Note that any of the requirements listed above can be overridden by a
374   cache-control extension; see <xref target="cache.control.extensions"/>.
375</t>
376<t>
377   When a stored response is used to satisfy a request without validation, a
378   cache MUST generate an <xref target="header.age" format="none">Age</xref> header field (<xref target="header.age"/>), replacing any present in the response with a value
379   equal to the stored response's current_age; see <xref target="age.calculations"/>.
380</t>
381<t>
382   A cache MUST write through requests with methods that are unsafe
383   (Section 4.2.1 of <xref target="RFC7231"/>) to the origin server; i.e., a cache is not allowed to
384   generate a reply to such a request before having forwarded the request and
385   having received a corresponding response.
386</t>
387<t>
388   Also, note that unsafe requests might invalidate already-stored responses;
389   see <xref target="invalidation"/>.
390</t>
391<t>
392   When more than one suitable response is stored, a cache MUST use the
393   most recent response (as determined by the Date header
394   field). It can also forward the request with "Cache-Control: max-age=0" or
395   "Cache-Control: no-cache" to disambiguate which response to use.
396</t>
397<t>
398   A cache that does not have a clock available MUST NOT use stored
399   responses without revalidating them upon every use.
400</t>
401
402<section anchor="caching.negotiated.responses" title="Calculating Secondary Keys with Vary">
403<t>
404   When a cache receives a request that can be satisfied by a stored response
405   that has a Vary header field (Section 7.1.4 of <xref target="RFC7231"/>),
406   it MUST NOT use that response unless all of the selecting header fields
407   nominated by the Vary header field match in both the original request
408   (i.e., that associated with the stored response), and the presented
409   request.
410</t>
411<t>
412   The selecting header fields from two requests are defined to match if and
413   only if those in the first request can be transformed to those in the
414   second request by applying any of the following:
415   <list style="symbols">
416      <t>
417         adding or removing whitespace, where allowed in the header field's
418         syntax
419      </t>
420      <t>
421         combining multiple header fields with the same field name
422         (see Section 3.2 of <xref target="RFC7230"/>)
423      </t>
424      <t>
425         normalizing both header field values in a way that is known to have
426         identical semantics, according to the header field's specification
427         (e.g., reordering field values when order is not significant;
428         case-normalization, where values are defined to be case-insensitive)
429      </t>
430  </list>
431</t>
432<t>
433   If (after any normalization that might take place) a header field is absent
434   from a request, it can only match another request if it is also absent
435   there.
436</t>
437<t>
438   A Vary header field-value of "*" always fails to match.
439</t>
440<t>
441   The stored response with matching selecting header fields is known as the
442   selected response.
443</t>
444<t>
445   If multiple selected responses are available (potentially including
446   responses without a Vary header field), the cache will need to choose one to use.
447   When a selecting header field has a known mechanism for doing so (e.g., qvalues on
448   Accept and similar request header fields), that mechanism MAY be
449   used to select preferred responses; of the remainder, the most recent
450   response (as determined by the Date header field) is used, as
451   per <xref target="constructing.responses.from.caches"/>.
452</t>
453<t>
454   If no selected response is available, the cache cannot satisfy the
455   presented request. Typically, it is forwarded to the origin server
456   in a (possibly conditional; see <xref target="validation.model"/>) request.
457</t>
458</section>
459
460<section anchor="expiration.model" title="Freshness">
461<iref item="fresh"/>
462<iref item="stale"/>
463<t>
464   A fresh response is one whose age has not yet exceeded its
465   freshness lifetime. Conversely, a stale
466   response is one where it has.
467</t>
468<iref item="freshness lifetime"/>
469<iref item="explicit expiration time"/>
470<iref item="heuristic expiration time"/>
471<t>
472   A response's freshness lifetime is the length of time
473   between its generation by the origin server and its expiration time. An
474   explicit expiration time is the time at which the origin
475   server intends that a stored response can no longer be used by a cache
476   without further validation, whereas a heuristic expiration
477   time is assigned by a cache when no explicit expiration time is
478   available.
479</t>
480<iref item="age"/>
481<t>
482   A response's age is the time that has passed since it was
483   generated by, or successfully validated with, the origin server. 
484</t>
485<t>
486   When a response is "fresh" in the cache, it can be used to satisfy
487   subsequent requests without contacting the origin server, thereby improving
488   efficiency.
489</t>
490<t>
491   The primary mechanism for determining freshness is for an origin server to
492   provide an explicit expiration time in the future, using either the
493   <xref target="header.expires" format="none">Expires</xref> header field (<xref target="header.expires"/>) or
494   the max-age response directive (<xref target="cache-response-directive.max-age"/>). Generally, origin servers
495   will assign future explicit expiration times to responses in the belief
496   that the representation is not likely to change in a semantically
497   significant way before the expiration time is reached.
498</t>
499<t>
500   If an origin server wishes to force a cache to validate every request, it
501   can assign an explicit expiration time in the past to indicate that the
502   response is already stale. Compliant caches will normally validate a stale
503   cached response before reusing it for subsequent requests (see <xref target="serving.stale.responses"/>).
504</t>
505<t>
506   Since origin servers do not always provide explicit expiration times,
507   caches are also allowed to use a heuristic to determine an expiration time
508   under certain circumstances (see <xref target="heuristic.freshness"/>).
509</t>
510<figure>
511<preamble>
512  The calculation to determine if a response is fresh is:
513</preamble>
514<artwork type="code"><![CDATA[
515   response_is_fresh = (freshness_lifetime > current_age)
516]]></artwork>
517</figure>
518<t>
519   freshness_lifetime is defined in <xref target="calculating.freshness.lifetime"/>; current_age is defined in
520   <xref target="age.calculations"/>.
521</t>
522<t>
523   Clients can send the max-age or min-fresh cache directives in a request to
524   constrain or relax freshness calculations for the corresponding response
525   (<xref target="cache-request-directive"/>).
526</t>
527<t>
528   When calculating freshness, to avoid common problems in date parsing:
529</t>
530<t>
531  <list style="symbols">
532     <t>Although all date formats are specified to be case-sensitive,
533        a cache recipient SHOULD match day, week, and time-zone names
534        case-insensitively.</t>
535             
536     <t>If a cache recipient's internal implementation of time has less
537        resolution than the value of an HTTP-date, the recipient MUST
538        internally represent a parsed <xref target="header.expires" format="none">Expires</xref> date as the
539        nearest time equal to or earlier than the received value.</t>
540
541     <t>A cache recipient MUST NOT allow local time zones to influence the
542        calculation or comparison of an age or expiration time.</t>
543
544     <t>A cache recipient SHOULD consider a date with a zone abbreviation
545        other than GMT or UTC to be invalid for calculating expiration.</t>
546  </list>
547</t>
548<t>
549   Note that freshness applies only to cache operation; it cannot be used to
550   force a user agent to refresh its display or reload a resource. See <xref target="history.lists"/> for an explanation of the difference between
551   caches and history mechanisms.
552</t>
553
554<section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime">
555<t>
556   A cache can calculate the freshness lifetime (denoted as
557   freshness_lifetime) of a response by using the first match of the following:
558   <list style="symbols">
559      <t>If the cache is shared and the s-maxage response directive
560      (<xref target="cache-response-directive.s-maxage"/>) is present, use its value,
561      or</t>
562      <t>If the max-age response directive (<xref target="cache-response-directive.max-age"/>) is present, use its value, or</t>
563      <t>If the <xref target="header.expires" format="none">Expires</xref> response header field
564      (<xref target="header.expires"/>) is present, use its value minus the
565      value of the Date response header field,</t>
566      <t>Otherwise, no explicit expiration time is present in the response. A
567      heuristic freshness lifetime might be applicable; see <xref target="heuristic.freshness"/>.</t>
568   </list>
569</t>
570<t>
571   Note that this calculation is not vulnerable to clock skew, since all of
572   the information comes from the origin server.
573</t>
574<t>
575   When there is more than one value present for a given directive (e.g., two
576   <xref target="header.expires" format="none">Expires</xref> header fields, multiple Cache-Control: max-age
577   directives), the directive's value is considered invalid. Caches are
578   encouraged to consider responses that have invalid freshness information to
579   be stale.
580</t>
581</section>
582
583<section anchor="heuristic.freshness" title="Calculating Heuristic Freshness">
584<t>
585   Since origin servers do not always provide explicit expiration times, a
586   cache MAY assign a heuristic expiration time when an explicit time is not
587   specified, employing algorithms that use other header field values (such as
588   the Last-Modified time) to estimate a plausible expiration
589   time. This specification does not provide specific algorithms, but does
590   impose worst-case constraints on their results.
591</t>
592<t>
593   A cache MUST NOT use heuristics to determine freshness when an explicit
594   expiration time is present in the stored response. Because of the
595   requirements in <xref target="response.cacheability"/>, this means that,
596   effectively, heuristics can only be used on responses without explicit
597   freshness whose status codes are defined as cacheable by default (see
598   Section 6.1 of <xref target="RFC7231"/>), and those responses without explicit freshness that have
599   been marked as explicitly cacheable (e.g., with a "public" response
600   directive).
601</t>
602<t>
603   If the response has a Last-Modified header field
604   (Section 2.2 of <xref target="RFC7232"/>), caches are encouraged to use a heuristic
605   expiration value that is no more than some fraction of the interval since
606   that time. A typical setting of this fraction might be 10%.
607</t>
608<t>
609   When a heuristic is used to calculate freshness lifetime, a cache SHOULD
610   generate a <xref target="header.warning" format="none">Warning</xref> header field with a 113 warn-code (see
611   <xref target="warn.113"/>) in the response if its current_age is more than
612   24 hours and such a warning is not already present.
613</t>
614<t><list>
615   <t>
616      Note: Section 13.9 of <xref target="RFC2616"/> prohibited caches
617      from calculating heuristic freshness for URIs with query components
618      (i.e., those containing '?'). In practice, this has not been widely
619      implemented. Therefore, origin servers are encouraged to send explicit
620      directives (e.g., Cache-Control: no-cache) if they wish to preclude
621      caching.
622   </t>
623</list></t>
624</section>
625
626<section anchor="age.calculations" title="Calculating Age">
627<t>
628   The <xref target="header.age" format="none">Age</xref> header field is used to convey an estimated
629   age of the response message when obtained from a cache. The Age field value
630   is the cache's estimate of the number of seconds since the response was
631   generated or validated by the origin server. In essence, the Age value is
632   the sum of the time that the response has been resident in each of the
633   caches along the path from the origin server, plus the amount of time it
634   has been in transit along network paths.
635</t>
636<t>
637   The following data is used for the age calculation:
638</t>
639<t>
640   age_value
641   <list>
642      <t>
643         The term "age_value" denotes the value of the <xref target="header.age" format="none">Age</xref>
644         header field (<xref target="header.age"/>), in a form appropriate for
645         arithmetic operation; or 0, if not available.
646      </t>
647   </list>
648</t>
649<t>
650   date_value
651   <list>
652      <t>
653         The term "date_value" denotes the value of
654         the Date header field, in a form appropriate for arithmetic
655         operations. See Section 7.1.1.2 of <xref target="RFC7231"/> for the definition of the Date header
656         field, and for requirements regarding responses without it.
657      </t>
658   </list>
659</t>
660<t>
661   now
662   <list>
663      <t>
664         The term "now" means "the current value of the clock at the host
665         performing the calculation". A host ought to use NTP (<xref target="RFC5905"/>) or some similar protocol to synchronize its
666         clocks to Coordinated Universal Time.
667      </t>
668   </list>
669</t>
670<t>
671   request_time
672   <list>
673      <t>
674         The current value of the clock at the host at the time the request
675         resulting in the stored response was made.
676      </t>
677   </list>
678</t>
679<t>
680   response_time
681   <list>
682      <t>
683         The current value of the clock at the host at the time the response
684         was received.
685      </t>
686   </list>
687</t>
688<t>
689   A response's age can be calculated in two entirely independent ways:
690   <list style="numbers">
691      <t>the "apparent_age": response_time minus date_value, if the local
692      clock is reasonably well synchronized to the origin server's clock. If
693      the result is negative, the result is replaced by zero.</t>
694      <t>the "corrected_age_value", if all of the caches along the response
695      path implement HTTP/1.1. A cache MUST interpret this value relative
696      to the time the request was initiated, not the time that the response
697      was received.</t>
698   </list>
699</t>
700<figure>
701<artwork type="code"><![CDATA[
702  apparent_age = max(0, response_time - date_value);
703
704  response_delay = response_time - request_time;
705  corrected_age_value = age_value + response_delay; 
706]]></artwork>
707</figure>
708<figure>
709<preamble>These are combined as</preamble>
710<artwork type="code"><![CDATA[
711  corrected_initial_age = max(apparent_age, corrected_age_value);
712]]></artwork></figure>
713<t>
714   unless the cache is confident in the value of the <xref target="header.age" format="none">Age</xref> header
715   field (e.g., because there are no HTTP/1.0 hops in the Via
716   header field), in which case the corrected_age_value MAY be used as the
717   corrected_initial_age.
718</t>
719<t>
720   The current_age of a stored response can then be calculated by adding the
721   amount of time (in seconds) since the stored response was last validated by
722   the origin server to the corrected_initial_age.
723</t>
724<figure><artwork type="code"><![CDATA[
725  resident_time = now - response_time;
726  current_age = corrected_initial_age + resident_time;
727]]></artwork></figure>
728</section>
729
730<section anchor="serving.stale.responses" title="Serving Stale Responses">
731<t>
732   A "stale" response is one that either has explicit expiry information or is
733   allowed to have heuristic expiry calculated, but is not fresh according to
734   the calculations in <xref target="expiration.model"/>.
735</t>
736<t>
737   A cache MUST NOT generate a stale response if it is prohibited by an
738   explicit in-protocol directive (e.g., by a "no-store" or "no-cache" cache
739   directive, a "must-revalidate" cache-response-directive, or an applicable
740   "s-maxage" or "proxy-revalidate" cache response directive; see <xref
741   target="cache-response-directive"/>).
742</t>
743<t>
744   A cache MUST NOT send stale responses unless it is disconnected
745   (i.e., it cannot contact the origin server or otherwise find a forward
746   path) or doing so is explicitly allowed (e.g., by the max-stale request
747   directive; see <xref target="cache-request-directive"/>).
748</t>
749<t>
750   A cache SHOULD generate a <xref target="header.warning" format="none">Warning</xref> header field with the
751   110 warn-code (see <xref target="warn.110"/>) in stale responses.
752   Likewise, a cache SHOULD generate a 112 warn-code (see
753   <xref target="warn.112"/>) in stale responses if the cache is disconnected.
754</t>
755<t>
756   A cache SHOULD NOT generate a new <xref target="header.warning" format="none">Warning</xref> header field
757   when forwarding a response that does not have an <xref target="header.age" format="none">Age</xref> header
758   field, even if the response is already stale.  A cache need not validate
759   a response that merely became stale in transit.
760</t>
761</section>
762</section>
763
764<section anchor="validation.model" title="Validation">
765<t>
766   When a cache has one or more stored responses for a requested URI, but
767   cannot serve any of them (e.g., because they are not fresh, or one cannot
768   be selected; see <xref target="caching.negotiated.responses"/>), it can use
769   the conditional request mechanism <xref target="RFC7232"/> in the forwarded request to
770   give the next inbound server an opportunity to select a valid stored
771   response to use, updating the stored metadata in the process, or to replace
772   the stored response(s) with a new response. This process is known as
773   "validating" or "revalidating" the stored response.
774</t>
775
776<section anchor="validation.sent" title="Sending a Validation Request"><iref item="validator"/>
777<t>
778   When sending a conditional request for cache validation, a cache sends one
779   or more precondition header fields containing validator
780   metadata from its stored response(s), which is then compared by recipients
781   to determine whether a stored response is equivalent to a current
782   representation of the resource.
783</t>
784<t>
785   One such validator is the timestamp given in a Last-Modified
786   header field (Section 2.2 of <xref target="RFC7232"/>), which can be used in an
787   If-Modified-Since header field for response validation, or
788   in an If-Unmodified-Since or If-Range header
789   field for representation selection (i.e., the client is referring
790   specifically to a previously obtained representation with that timestamp).
791</t>
792<t>
793   Another validator is the entity-tag given in an ETag header
794   field (Section 2.3 of <xref target="RFC7232"/>). One or more entity-tags, indicating one or more
795   stored responses, can be used in an If-None-Match header
796   field for response validation, or in an If-Match or
797   If-Range header field for representation selection (i.e.,
798   the client is referring specifically to one or more previously obtained
799   representations with the listed entity-tags).
800</t>
801</section>
802
803<section anchor="validation.received" title="Handling a Received Validation Request">
804<t>
805   Each client in the request chain may have its own cache, so it is common
806   for a cache at an intermediary to receive conditional requests from other
807   (outbound) caches. Likewise, some user agents make use of conditional
808   requests to limit data transfers to recently modified representations or to
809   complete the transfer of a partially retrieved representation.
810</t>
811<t>
812   If a cache receives a request that can be satisfied by reusing one of
813   its stored 200 (OK) or 206 (Partial Content)
814   responses, the cache SHOULD evaluate any applicable conditional header
815   field preconditions received in that request with respect to the
816   corresponding validators contained within the selected response.
817   A cache MUST NOT evaluate conditional header fields that are only
818   applicable to an origin server, found in a request with semantics that
819   cannot be satisfied with a cached response, or applied to a target resource
820   for which it has no stored responses; such preconditions are likely
821   intended for some other (inbound) server.
822</t>
823<t>
824   The proper evaluation of conditional requests by a cache depends on the
825   received precondition header fields and their precedence, as defined in
826   Section 6 of <xref target="RFC7232"/>. The If-Match and
827   If-Unmodified-Since conditional header fields are not
828   applicable to a cache.
829</t>
830<t>
831   A request containing an If-None-Match header field
832   (Section 3.2 of <xref target="RFC7232"/>) indicates that the client wants to validate one
833   or more of its own stored responses in comparison to whichever stored
834   response is selected by the cache.
835   If the field-value is "*", or if the field-value is a list of entity-tags
836   and at least one of them matches the entity-tag of the selected stored
837   response, a cache recipient SHOULD generate a
838   304 (Not Modified) response (using the metadata of the
839   selected stored response) instead of sending that stored response.
840</t>
841<t>
842   When a cache decides to revalidate its own stored responses for a
843   request that contains an If-None-Match list of entity-tags,
844   the cache MAY combine the received list with a list of entity-tags
845   from its own stored set of responses (fresh or stale) and send the union of
846   the two lists as a replacement If-None-Match header
847   field value in the forwarded request.
848   If a stored response contains only partial content, the
849   cache MUST NOT include its entity-tag in the union unless the request is
850   for a range that would be fully satisfied by that partial stored response.
851   If the response to the forwarded request is
852   304 (Not Modified) and has an ETag header field value with
853   an entity-tag that is not in the client's list, the cache MUST
854   generate a 200 (OK) response for the client by reusing its
855   corresponding stored response, as updated by the 304 response metadata
856   (<xref target="freshening.responses"/>).
857</t>
858<t>
859   If an If-None-Match header field is not present, a request
860   containing an If-Modified-Since header field
861   (Section 3.3 of <xref target="RFC7232"/>) indicates that the client wants to validate
862   one or more of its own stored responses by modification date.
863   A cache recipient SHOULD generate a 304 (Not Modified)
864   response (using the metadata of the selected stored response) if one of the
865   following cases is true:
866   1) the selected stored response has a Last-Modified
867   field-value that is earlier than or equal to the conditional timestamp;
868   2) no Last-Modified field is present in the selected stored
869   response, but it has a Date field-value that is earlier than
870   or equal to the conditional timestamp; or,
871   3) neither Last-Modified nor Date is present
872   in the selected stored response, but the cache recorded it as having been
873   received at a time earlier than or equal to the conditional timestamp.
874</t>
875<t>
876   A cache that implements partial responses to range requests, as defined in
877   <xref target="RFC7233"/>, also needs to evaluate a received If-Range header
878   field (Section 3.2 of <xref target="RFC7233"/>) with respect to its selected stored response.
879</t>
880</section>
881
882<section anchor="validation.response" title="Handling a Validation Response">
883<t>
884   Cache handling of a response to a conditional request is dependent upon its
885   status code:
886</t>
887<t>
888   <list style="symbols">
889      <t>
890         A 304 (Not Modified) response status code indicates
891         that the stored response can be updated and reused; see <xref target="freshening.responses"/>.
892      </t>
893      <t>
894         A full response (i.e., one with a payload body) indicates that none
895         of the stored responses nominated in the conditional request is
896         suitable. Instead, the cache MUST use the full response to
897         satisfy the request and MAY replace the stored response(s).
898      </t>
899      <t>
900         However, if a cache receives a 5xx (Server Error)
901         response while attempting to validate a response, it can either
902         forward this response to the requesting client, or act as if the
903         server failed to respond. In the latter case, the cache MAY send a
904         previously stored response (see <xref target="serving.stale.responses"/>).
905      </t>
906   </list>
907</t>
908</section>
909
910<section anchor="freshening.responses" title="Freshening Stored Responses upon Validation">
911<t>
912   When a cache receives a 304 (Not Modified) response and
913   already has one or more stored 200 (OK) responses for the
914   same cache key, the cache needs to identify which of the stored responses
915   are updated by this new response and then update the stored response(s)
916   with the new information provided in the 304 response.
917</t>
918<iref item="strong validator"/>
919<t>
920   The stored response to update is identified by using the first match (if
921   any) of the following:
922   <list style="symbols">
923    <t>
924     If the new response contains a strong validator (see
925     Section 2.1 of <xref target="RFC7232"/>), then that strong validator identifies the selected
926     representation for update. All of the stored responses with the same
927     strong validator are selected. If none of the stored responses contain the
928     same strong validator, then the cache MUST NOT use the new response to
929     update any stored responses.
930    </t>
931    <t>
932     If the new response contains a weak validator and that validator
933     corresponds to one of the cache's stored responses, then the most
934     recent of those matching stored responses is selected for update.
935    </t>
936    <t>
937     If the new response does not include any form of validator (such as in
938     the case where a client generates an If-Modified-Since request from a
939     source other than the Last-Modified response header field), and there is
940     only one stored response, and that stored response also lacks a
941     validator, then that stored response is selected for update.
942    </t>
943   </list>
944</t>
945<t>
946   If a stored response is selected for update, the cache MUST:
947   <list style="symbols">
948      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
949         with warn-code 1xx (see <xref target="header.warning"/>);</t>
950      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
951         with warn-code 2xx; and,</t>
952      <t>use other header fields provided in the 304 (Not Modified)
953         response to replace all instances of the corresponding header
954         fields in the stored response.</t>
955   </list>
956</t>
957</section>
958
959<section anchor="head.effects" title="Freshening Responses via HEAD">
960<t>
961   A response to the HEAD method is identical to what an equivalent request
962   made with a GET would have been, except it lacks a body. This property
963   of HEAD responses can be used to invalidate or update a cached GET
964   response if the more efficient conditional GET request mechanism is not
965   available (due to no validators being present in the stored response) or
966   if transmission of the representation body is not desired even if it has
967   changed.
968</t>
969<t>
970   When a cache makes an inbound HEAD request for a given request target and
971   receives a 200 (OK) response, the cache SHOULD update or
972   invalidate each of its stored GET responses that could have been selected
973   for that request (see <xref target="caching.negotiated.responses"/>).
974</t>
975<t>
976   For each of the stored responses that could have been selected, if the
977   stored response and HEAD response have matching values for any received
978   validator fields (ETag and Last-Modified)
979   and, if the HEAD response has a Content-Length header field,
980   the value of Content-Length matches that of the stored
981   response, the cache SHOULD update the stored response as described below;
982   otherwise, the cache SHOULD consider the stored response to be stale.
983</t>
984<t>
985   If a cache updates a stored response with the metadata provided in a HEAD
986   response, the cache MUST:
987   <list style="symbols">
988      <t>delete any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
989         with warn-code 1xx (see <xref target="header.warning"/>);</t>
990      <t>retain any <xref target="header.warning" format="none">Warning</xref> header fields in the stored response
991         with warn-code 2xx; and,</t>
992      <t>use other header fields provided in the HEAD response to replace all
993         instances of the corresponding header fields in the stored response
994         and append new header fields to the stored response's header section
995         unless otherwise restricted by the <xref target="header.cache-control" format="none">Cache-Control</xref>
996         header field.</t>
997   </list>
998</t>
999</section>
1000</section>
1001
1002
1003<section anchor="invalidation" title="Invalidation">
1004<t>
1005   Because unsafe request methods (Section 4.2.1 of <xref target="RFC7231"/>) such as PUT, POST or DELETE
1006   have the potential for changing state on the origin server, intervening
1007   caches can use them to keep their contents up to date.
1008</t>
1009<t>
1010   A cache MUST invalidate the effective Request URI
1011   (Section 5.5 of <xref target="RFC7230"/>) as well as the URI(s) in the
1012   Location and Content-Location response header
1013   fields (if present) when a non-error status code is received in response to
1014   an unsafe request method.
1015</t>
1016<t>
1017   However, a cache MUST NOT invalidate a URI from a Location
1018   or Content-Location response header field if the host part of
1019   that URI differs from the host part in the effective request URI
1020   (Section 5.5 of <xref target="RFC7230"/>). This helps prevent denial-of-service attacks.
1021</t>
1022<t>
1023   A cache MUST invalidate the effective request URI
1024   (Section 5.5 of <xref target="RFC7230"/>) when it receives a non-error response
1025   to a request with a method whose safety is unknown.
1026</t>
1027<t>
1028   Here, a "non-error response" is one with a 2xx (Successful)
1029   or 3xx (Redirection) status code. "Invalidate" means that
1030   the cache will either remove all stored responses related to the effective
1031   request URI or will mark these as "invalid" and in need of a mandatory
1032   validation before they can be sent in response to a subsequent request.
1033</t>
1034<t>
1035   Note that this does not guarantee that all appropriate responses are
1036   invalidated. For example, a state-changing request might invalidate
1037   responses in the caches it travels through, but relevant responses still
1038   might be stored in other caches that it has not.</t>
1039</section>
1040</section>
1041
1042
1043
1044<section anchor="header.field.definitions" title="Header Field Definitions">
1045<t>
1046   This section defines the syntax and semantics of HTTP/1.1 header fields
1047   related to caching.
1048</t>
1049
1050<section anchor="header.age" title="Age">
1051   <iref item="Age header field" primary="true"/>
1052   
1053   
1054<t>
1055   The "Age" header field conveys the sender's estimate of the amount
1056   of time since the response was generated or successfully validated at the
1057   origin server. Age values are calculated as specified in <xref target="age.calculations"/>.
1058</t>
1059<figure><iref primary="true" item="Grammar" subitem="Age"/><artwork type="abnf2616"><![CDATA[
1060  Age = delta-seconds
1061]]></artwork></figure>
1062<t>
1063   The Age field-value is a non-negative integer, representing time in seconds
1064   (see <xref target="delta-seconds"/>).
1065</t>
1066<t>
1067   The presence of an Age header field implies that the response was not
1068   generated or validated by the origin server for this request. However,
1069   lack of an Age header field does not imply the origin was contacted, since
1070   the response might have been received from an HTTP/1.0 cache that does not
1071   implement Age.
1072</t>
1073</section>
1074
1075<section anchor="header.cache-control" title="Cache-Control">
1076   <iref item="Cache-Control header field" primary="true"/>
1077   
1078   
1079<t>
1080   The "Cache-Control" header field is used to specify directives for
1081   caches along the request/response chain. Such cache directives are
1082   unidirectional in that the presence of a directive in a request does not
1083   imply that the same directive is to be given in the response.
1084</t>
1085<t>
1086   A cache MUST obey the requirements of the Cache-Control
1087   directives defined in this section. See <xref target="cache.control.extensions"/> for information about how Cache-Control
1088   directives defined elsewhere are handled.
1089</t>
1090<t><list>
1091   <t>
1092       Note: Some HTTP/1.0 caches might not implement Cache-Control.
1093   </t>
1094</list></t>
1095<t>
1096   A proxy, whether or not it implements a cache, MUST pass cache directives
1097   through in forwarded messages, regardless of their
1098   significance to that application, since the directives might be applicable
1099   to all recipients along the request/response chain. It is not possible to
1100   target a directive to a specific cache.
1101</t>
1102<t>
1103   Cache directives are identified by a token, to be compared case-insensitively,
1104   and have an optional argument, that can use both token and quoted-string
1105   syntax. For the directives defined below that define arguments, recipients
1106   ought to accept both forms, even if one is documented to be preferred. For
1107   any directive not defined by this specification, a recipient MUST accept
1108   both forms.
1109</t>
1110<figure><iref primary="true" item="Grammar" subitem="Cache-Control"/><iref primary="true" item="Grammar" subitem="cache-directive"/><artwork type="abnf2616"><![CDATA[
1111  Cache-Control   = 1#cache-directive
1112
1113  cache-directive = token [ "=" ( token / quoted-string ) ]
1114]]></artwork></figure>
1115<t>
1116   For the cache directives defined below, no argument is defined (nor allowed)
1117   unless stated otherwise.
1118</t>
1119
1120<section title="Request Cache-Control Directives" anchor="cache-request-directive">
1121
1122<section title="max-age" anchor="cache-request-directive.max-age">
1123   <iref item="max-age (cache directive)" primary="true"/>
1124<t>
1125   Argument syntax:
1126   <list>
1127      <t>
1128        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1129      </t>
1130   </list>
1131</t>
1132<t>
1133   The "max-age" request directive indicates that the client is unwilling
1134   to accept a response whose age is greater than the specified number of
1135   seconds. Unless the max-stale request directive is also present, the client
1136   is not willing to accept a stale response.
1137</t>
1138<t>
1139   This directive uses the token form of the argument syntax:
1140   e.g., 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the
1141   quoted-string form.
1142</t>
1143</section>
1144
1145<section title="max-stale" anchor="cache-request-directive.max-stale">
1146   <iref item="max-stale (cache directive)" primary="true"/>
1147<t>
1148   Argument syntax:
1149   <list>
1150      <t>
1151        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1152      </t>
1153   </list>
1154</t>
1155<t>
1156   The "max-stale" request directive indicates that the client is willing
1157   to accept a response that has exceeded its freshness lifetime. If max-stale
1158   is assigned a value, then the client is willing to accept a response
1159   that has exceeded its freshness lifetime by no more than the specified
1160   number of seconds. If no value is assigned to max-stale, then the client
1161   is willing to accept a stale response of any age.
1162</t>
1163<t>
1164   This directive uses the token form of the argument syntax:
1165   e.g., 'max-stale=10' not 'max-stale="10"'. A sender SHOULD NOT generate
1166   the quoted-string form.
1167</t>
1168</section>
1169
1170<section title="min-fresh" anchor="cache-request-directive.min-fresh">
1171   <iref item="min-fresh (cache directive)" primary="true"/>
1172<t>
1173   Argument syntax:
1174   <list>
1175      <t>
1176        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1177      </t>
1178   </list>
1179</t>
1180<t>
1181   The "min-fresh" request directive indicates that the client is willing
1182   to accept a response whose freshness lifetime is no less than its
1183   current age plus the specified time in seconds. That is, the client
1184   wants a response that will still be fresh for at least the specified
1185   number of seconds.
1186</t>
1187<t>
1188   This directive uses the token form of the argument syntax;
1189   e.g., 'min-fresh=20', not 'min-fresh="20"'. A sender SHOULD NOT generate
1190   the quoted-string form.
1191</t>
1192</section>
1193
1194<section title="no-cache" anchor="cache-request-directive.no-cache">
1195   <iref item="no-cache (cache directive)" primary="true"/>
1196<t>
1197   The "no-cache" request directive indicates that a cache MUST NOT
1198   use a stored response to satisfy the request without successful
1199   validation on the origin server.
1200</t>
1201</section>
1202 
1203<section title="no-store" anchor="cache-request-directive.no-store">
1204   <iref item="no-store (cache directive)" primary="true"/>
1205<t>
1206   The "no-store" request directive indicates that a cache MUST NOT
1207   store any part of either this request or any response to it. This
1208   directive applies to both private and shared caches. "MUST NOT
1209   store" in this context means that the cache MUST NOT intentionally
1210   store the information in non-volatile storage, and MUST make a
1211   best-effort attempt to remove the information from volatile storage as
1212   promptly as possible after forwarding it.
1213</t>
1214<t>
1215   This directive is NOT a reliable or sufficient mechanism for ensuring
1216   privacy. In particular, malicious or compromised caches might not
1217   recognize or obey this directive, and communications networks might be
1218   vulnerable to eavesdropping.
1219</t>
1220<t>
1221   Note that if a request containing this directive is satisfied from a
1222   cache, the no-store request directive does not apply to the already
1223   stored response.
1224</t>
1225</section>
1226
1227<section title="no-transform" anchor="cache-request-directive.no-transform">
1228   <iref item="no-transform (cache directive)" primary="true"/>
1229<t>
1230   The "no-transform" request directive indicates that an intermediary
1231   (whether or not it implements a cache) MUST NOT transform the payload,
1232   as defined in Section 5.7.2 of <xref target="RFC7230"/>.
1233</t>
1234</section>
1235
1236<section title="only-if-cached" anchor="cache-request-directive.only-if-cached">
1237   <iref item="only-if-cached (cache directive)" primary="true"/>
1238<t>
1239   The "only-if-cached" request directive indicates that the client only wishes
1240   to obtain a stored response. If it receives this directive, a cache SHOULD
1241   either respond using a stored response that is consistent with the other
1242   constraints of the request, or respond with a 504 (Gateway
1243   Timeout) status code. If a group of caches is being operated as a
1244   unified system with good internal connectivity, a member cache MAY
1245   forward such a request within that group of caches.
1246</t>
1247</section>
1248</section>
1249
1250<section anchor="cache-response-directive" title="Response Cache-Control Directives">
1251   
1252
1253<section title="must-revalidate" anchor="cache-response-directive.must-revalidate">
1254   <iref item="must-revalidate (cache directive)" primary="true"/>
1255<t>
1256   The "must-revalidate" response directive indicates that once it has
1257   become stale, a cache MUST NOT use the response to satisfy subsequent
1258   requests without successful validation on the origin server.
1259</t>
1260<t>
1261   The must-revalidate directive is necessary to support reliable
1262   operation for certain protocol features. In all circumstances a
1263   cache MUST obey the must-revalidate directive; in particular,
1264   if a cache cannot reach the origin server for any reason, it MUST
1265   generate a 504 (Gateway Timeout) response.
1266</t>
1267<t>
1268   The must-revalidate directive ought to be used by servers if and only
1269   if failure to validate a request on the representation could result in
1270   incorrect operation, such as a silently unexecuted financial
1271   transaction.
1272</t>
1273</section>
1274
1275<section title="no-cache" anchor="cache-response-directive.no-cache">
1276   <iref item="no-cache (cache directive)" primary="true"/>
1277<t>
1278   Argument syntax:
1279   <list>
1280      <t>
1281        #<xref target="imported.abnf" format="none">field-name</xref>
1282      </t>
1283   </list>
1284</t>
1285<t>
1286   The "no-cache" response directive indicates that the response MUST NOT
1287   be used to satisfy a subsequent request without successful validation on
1288   the origin server. This allows an origin server to prevent a cache from
1289   using it to satisfy a request without contacting it, even by caches that
1290   have been configured to send stale responses.
1291</t>
1292<t>
1293   If the no-cache response directive specifies one or more field-names,
1294   then a cache MAY use the response to satisfy a subsequent request,
1295   subject to any other restrictions on caching. However, any header fields
1296   in the response that have the field-name(s) listed MUST NOT be sent
1297   in the response to a subsequent request without successful revalidation
1298   with the origin server. This allows an origin server to prevent the
1299   re-use of certain header fields in a response, while still allowing
1300   caching of the rest of the response.
1301</t>
1302<t>
1303   The field-names given are not limited to the set of header
1304   fields defined by this specification. Field names are case-insensitive.
1305</t>
1306<t>
1307   This directive uses the quoted-string form of the argument syntax.
1308   A sender SHOULD NOT generate the token form (even if quoting appears not
1309   to be needed for single-entry lists).
1310</t>
1311<t>
1312   Note: Although it has been back-ported to many implementations, some
1313   HTTP/1.0 caches will not recognize or obey this directive. Also, no-cache
1314   response directives with field-names are often handled by caches
1315   as if an unqualified no-cache directive was received; i.e., the special
1316   handling for the qualified form is not widely implemented.
1317</t>
1318</section>
1319
1320<section title="no-store" anchor="cache-response-directive.no-store">
1321   <iref item="no-store (cache directive)" primary="true"/>
1322<t>
1323   The "no-store" response directive indicates that a cache MUST NOT
1324   store any part of either the immediate request or response. This
1325   directive applies to both private and shared caches. "MUST NOT
1326   store" in this context means that the cache MUST NOT intentionally
1327   store the information in non-volatile storage, and MUST make a
1328   best-effort attempt to remove the information from volatile storage as
1329   promptly as possible after forwarding it.
1330</t>
1331<t>
1332   This directive is NOT a reliable or sufficient mechanism for ensuring
1333   privacy. In particular, malicious or compromised caches might not
1334   recognize or obey this directive, and communications networks might be
1335   vulnerable to eavesdropping.
1336</t>
1337</section>
1338
1339<section title="no-transform" anchor="cache-response-directive.no-transform">
1340   <iref item="no-transform (cache directive)" primary="true"/>
1341<t>
1342   The "no-transform" response directive indicates that an intermediary
1343   (regardless of whether it implements a cache) MUST NOT transform the
1344   payload, as defined in Section 5.7.2 of <xref target="RFC7230"/>.
1345</t>
1346</section>
1347
1348<section title="public" anchor="cache-response-directive.public">
1349   <iref item="public (cache directive)" primary="true"/>
1350<t>
1351   The "public" response directive indicates that any cache MAY store the
1352   response, even if the response would normally be non-cacheable or cacheable
1353   only within a private cache. (See <xref target="caching.authenticated.responses"/> for additional details related to
1354   the use of public in response to a request containing
1355   Authorization, and <xref target="response.cacheability"/> for
1356   details of how public affects responses that would normally not be stored,
1357   due to their status codes not being defined as cacheable by default; see
1358   <xref target="heuristic.freshness"/>.)
1359</t>
1360</section>
1361
1362<section title="private" anchor="cache-response-directive.private">
1363   <iref item="private (cache directive)" primary="true"/>
1364<t>
1365   Argument syntax:
1366   <list>
1367      <t>
1368        #<xref target="imported.abnf" format="none">field-name</xref>
1369      </t>
1370   </list>
1371</t>
1372<t>
1373   The "private" response directive indicates that the response message is
1374   intended for a single user and MUST NOT be stored by a shared cache. A
1375   private cache MAY store the response and reuse it for later requests,
1376   even if the response would normally be non-cacheable.
1377</t>
1378<t>
1379   If the private response directive specifies one or more field-names,
1380   this requirement is limited to the field-values associated with the
1381   listed response header fields. That is, a shared cache MUST NOT store
1382   the specified field-names(s), whereas it MAY store the remainder of the
1383   response message.
1384</t>
1385<t>
1386   The field-names given are not limited to the set of header
1387   fields defined by this specification. Field names are case-insensitive.
1388</t>
1389<t>
1390   This directive uses the quoted-string form of the argument syntax.
1391   A sender SHOULD NOT generate the token form (even if quoting appears not
1392   to be needed for single-entry lists).
1393</t>
1394<t>
1395   Note: This use of the word "private" refers only to the control
1396   of the location in which the response can be stored; the privacy of the
1397   message content cannot be ensured. Also, private response directives with field-names are
1398   often handled by caches as if an unqualified private directive
1399   was received; i.e., the special handling for the qualified form is not
1400   widely implemented.
1401</t>
1402</section>
1403
1404<section title="proxy-revalidate" anchor="cache-response-directive.proxy-revalidate">
1405   <iref item="proxy-revalidate (cache directive)" primary="true"/>
1406<t>
1407   The "proxy-revalidate" response directive has the same meaning as the
1408   must-revalidate response directive, except that it does not apply to
1409   private caches.
1410</t>
1411</section>
1412
1413<section title="max-age" anchor="cache-response-directive.max-age">
1414   <iref item="max-age (cache directive)" primary="true"/>
1415<t>
1416   Argument syntax:
1417   <list>
1418      <t>
1419        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1420      </t>
1421   </list>
1422</t>
1423<t>
1424   The "max-age" response directive indicates that the response is to be
1425   considered stale after its age is greater than the specified number of
1426   seconds.
1427</t>
1428<t>
1429   This directive uses the token form of the argument syntax:
1430   e.g., 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the
1431   quoted-string form.
1432</t>
1433</section>     
1434
1435<section title="s-maxage" anchor="cache-response-directive.s-maxage">
1436   <iref item="s-maxage (cache directive)" primary="true"/>
1437<t>
1438   Argument syntax:
1439   <list>
1440      <t>
1441        <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)
1442      </t>
1443   </list>
1444</t>
1445<t>
1446   The "s-maxage" response directive indicates that, in shared caches, the
1447   maximum age specified by this directive overrides the maximum age
1448   specified by either the max-age directive or the <xref target="header.expires" format="none">Expires</xref>
1449   header field. The s-maxage directive also implies the semantics of the
1450   proxy-revalidate response directive.
1451</t>
1452<t>
1453   This directive uses the token form of the argument syntax:
1454   e.g., 's-maxage=10' not 's-maxage="10"'. A sender SHOULD NOT generate
1455   the quoted-string form.
1456</t>
1457</section>
1458
1459</section>
1460
1461<section anchor="cache.control.extensions" title="Cache Control Extensions">
1462<t>
1463   The Cache-Control header field can be extended through the use of one or
1464   more cache-extension tokens, each with an optional value.
1465   A cache MUST ignore unrecognized cache directives.
1466</t>
1467<t>
1468   Informational extensions (those that do not require a change in cache
1469   behavior) can be added without changing the semantics of other directives.
1470</t>
1471<t>  
1472   Behavioral extensions are designed to work by acting as modifiers to the
1473   existing base of cache directives.
1474   Both the new directive and the old directive are supplied, such that
1475   applications that do not understand the new directive will default to the
1476   behavior specified by the old directive, and those that understand the
1477   new directive will recognize it as modifying the requirements associated
1478   with the old directive. In this way, extensions to the existing
1479   cache-control directives can be made without breaking deployed caches.
1480</t>
1481<t>
1482   For example, consider a hypothetical new response directive called
1483   "community" that acts as a modifier to the private directive: in addition
1484   to private caches, any cache that is shared only by members of the named
1485   community is allowed to cache the response. An origin server wishing to
1486   allow the UCI community to use an otherwise private response in their
1487   shared cache(s) could do so by including
1488
1489</t>
1490<figure><artwork type="example"><![CDATA[
1491  Cache-Control: private, community="UCI"
1492]]></artwork></figure>
1493<t>
1494   A cache that recognizes such a community cache-extension could broaden its
1495   behavior in accordance with that extension.  A cache that does not
1496   recognize the community cache-extension would ignore it and adhere to the
1497   private directive.
1498</t>
1499</section>
1500
1501</section>
1502
1503<section anchor="header.expires" title="Expires">
1504   <iref item="Expires header field" primary="true"/>
1505   
1506<t>
1507   The "Expires" header field gives the date/time after which the
1508   response is considered stale. See <xref target="expiration.model"/> for
1509   further discussion of the freshness model.
1510</t>
1511<t>
1512   The presence of an Expires field does not imply that the original resource
1513   will change or cease to exist at, before, or after that time.
1514</t>
1515<t>
1516   The Expires value is an HTTP-date timestamp, as defined in Section 7.1.1.1 of <xref target="RFC7231"/>.
1517</t>
1518<figure><iref primary="true" item="Grammar" subitem="Expires"/><artwork type="abnf2616"><![CDATA[
1519  Expires = HTTP-date
1520]]></artwork></figure>
1521<figure>
1522  <preamble>For example</preamble>
1523<artwork type="example"><![CDATA[
1524  Expires: Thu, 01 Dec 1994 16:00:00 GMT
1525]]></artwork></figure>
1526<t>
1527   A cache recipient MUST interpret invalid date formats, especially the
1528   value "0", as representing a time in the past (i.e., "already expired").
1529</t>
1530<t>
1531   If a response includes a <xref target="header.cache-control" format="none">Cache-Control</xref> field with
1532   the max-age directive (<xref target="cache-response-directive.max-age"/>),
1533   a recipient MUST ignore the Expires field.
1534   Likewise, if a response includes the s-maxage directive
1535   (<xref target="cache-response-directive.s-maxage"/>), a shared cache
1536   recipient MUST ignore the Expires field. In both these cases, the value
1537   in Expires is only intended for recipients that have not yet implemented
1538   the Cache-Control field.
1539</t>
1540<t>
1541   An origin server without a clock MUST NOT generate an Expires field
1542   unless its value represents a fixed time in the past (always expired)
1543   or its value has been associated with the resource by a system or user
1544   with a reliable clock.
1545</t>
1546<t>
1547   Historically, HTTP required the Expires field-value to be no more than a
1548   year in the future. While longer freshness lifetimes are no longer
1549   prohibited, extremely large values have been demonstrated to cause
1550   problems (e.g., clock overflows due to use of 32-bit integers for
1551   time values), and many caches will evict a response far sooner than
1552   that.
1553</t>
1554</section>
1555
1556<section anchor="header.pragma" title="Pragma">
1557   <iref item="Pragma header field" primary="true"/>
1558   
1559   
1560   
1561<t>
1562   The "Pragma" header field allows backwards compatibility with HTTP/1.0
1563   caches, so that clients can specify a "no-cache" request that they will
1564   understand (as <xref target="header.cache-control" format="none">Cache-Control</xref> was not defined until HTTP/1.1).
1565   When the Cache-Control header field is also present and understood in a
1566   request, Pragma is ignored.
1567</t>
1568<t>
1569   In HTTP/1.0, Pragma was defined as an extensible field for
1570   implementation-specified directives for recipients. This specification
1571   deprecates such extensions to improve interoperability.
1572</t>
1573<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[
1574  Pragma           = 1#pragma-directive
1575  pragma-directive = "no-cache" / extension-pragma
1576  extension-pragma = token [ "=" ( token / quoted-string ) ]
1577]]></artwork></figure>
1578<t>
1579   When the <xref target="header.cache-control" format="none">Cache-Control</xref> header field is not present in a
1580   request, caches MUST consider the no-cache request pragma-directive as
1581   having the same effect as if "Cache-Control: no-cache" were present (see
1582   <xref target="cache-request-directive"/>).
1583</t>
1584<t>
1585   When sending a no-cache request, a client ought to include both the pragma
1586   and cache-control directives, unless Cache-Control: no-cache is
1587   purposefully omitted to target other <xref target="header.cache-control" format="none">Cache-Control</xref> response
1588   directives at HTTP/1.1 caches. For example:
1589</t>
1590<figure>
1591<artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
1592  GET / HTTP/1.1
1593  Host: www.example.com
1594  Cache-Control: max-age=30
1595  Pragma: no-cache
1596 
1597  ]]></artwork>
1598</figure>
1599<t>
1600   will constrain HTTP/1.1 caches to serve a response no older than 30
1601   seconds, while precluding implementations that do not understand
1602   <xref target="header.cache-control" format="none">Cache-Control</xref> from serving a cached response.
1603</t>
1604<t><list>
1605   <t>
1606      Note: Because the meaning of "Pragma: no-cache" in responses is not
1607      specified, it does not provide a reliable replacement for
1608      "Cache-Control: no-cache" in them.
1609   </t>
1610</list></t>
1611</section>
1612
1613<section anchor="header.warning" title="Warning">
1614   <iref item="Warning header field" primary="true"/>
1615   
1616   
1617   
1618   
1619   
1620   
1621<t>
1622   The "Warning" header field is used to carry additional information
1623   about the status or transformation of a message that might not be reflected
1624   in the status code. This information is typically used to warn about possible
1625   incorrectness introduced by caching operations or transformations applied
1626   to the payload of the message.
1627</t>
1628<t>
1629   Warnings can be used for other purposes, both cache-related and otherwise.
1630   The use of a warning, rather than an error status code, distinguishes these
1631   responses from true failures.
1632</t>
1633<t>
1634   Warning header fields can in general be applied to any message, however some
1635   warn-codes are specific to caches and can only be applied to response
1636   messages.
1637</t>
1638<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[
1639  Warning       = 1#warning-value
1640 
1641  warning-value = warn-code SP warn-agent SP warn-text
1642                                        [ SP warn-date ]
1643 
1644  warn-code  = 3DIGIT
1645  warn-agent = ( uri-host [ ":" port ] ) / pseudonym
1646                  ; the name or pseudonym of the server adding
1647                  ; the Warning header field, for use in debugging
1648                  ; a single "-" is recommended when agent unknown
1649  warn-text  = quoted-string
1650  warn-date  = DQUOTE HTTP-date DQUOTE
1651]]></artwork></figure>
1652<t>
1653   Multiple warnings can be generated in a response (either by the origin
1654   server or by a cache), including multiple warnings with the same warn-code
1655   number that only differ in warn-text.
1656</t>
1657<t>
1658   A user agent that receives one or more Warning header fields SHOULD
1659   inform the user of as many of them as possible, in the order that they
1660   appear in the response. Senders that generate multiple Warning header
1661   fields are encouraged to order them with this user agent behavior in mind.
1662   A sender that generates new Warning header fields MUST append them after
1663   any existing Warning header fields.
1664</t>
1665<t>
1666   Warnings are assigned three digit warn-codes. The first digit indicates
1667   whether the Warning is required to be deleted from a stored response after
1668   validation:
1669   <list style="symbols">
1670      <t>1xx warn-codes describe the freshness or validation status of the
1671      response, and so they MUST be deleted by a cache after validation. They can
1672      only be generated by a cache when validating a cached entry, and
1673      MUST NOT be generated in any other situation.</t>
1674      <t>2xx warn-codes describe some aspect of the representation that is not
1675      rectified by a validation (for example, a lossy compression of the
1676      representation) and they MUST NOT be deleted by a cache after validation,
1677      unless a full response is sent, in which case they MUST be.</t>
1678   </list>
1679</t>
1680<t>
1681   If a sender generates one or more 1xx warn-codes in a message to be
1682   sent to a recipient known to implement only HTTP/1.0, the sender MUST
1683   include in each corresponding warning-value a warn-date that matches the
1684   Date header field in the message. For example:
1685</t>
1686<figure><artwork type="message/http; msgtype=&#34;response&#34;"><![CDATA[
1687  HTTP/1.1 200 OK
1688  Date: Sat, 25 Aug 2012 23:34:45 GMT
1689  Warning: 112 - "network down" "Sat, 25 Aug 2012 23:34:45 GMT"
1690 
1691  ]]></artwork></figure>
1692<t>
1693  Warnings have accompanying warn-text that describes the error, e.g., for
1694  logging. It is advisory only, and its content does not affect interpretation
1695  of the warn-code.
1696</t>
1697<t>
1698   If a recipient that uses, evaluates, or displays Warning header fields
1699   receives a warn-date that is different from the Date value
1700   in the same message, the recipient MUST exclude the warning-value
1701   containing that warn-date before storing, forwarding, or using the message.
1702   This allows recipients to exclude warning-values that were improperly
1703   retained after a cache validation.
1704   If all of the warning-values are excluded, the recipient MUST exclude
1705   the Warning header field as well.
1706</t>
1707<t>
1708   The following warn-codes are defined by this specification, each with a
1709   recommended warn-text in English, and a description of its meaning.
1710   The procedure for defining additional warn codes is described in
1711   <xref target="warn.code.registry.procedure"/>.
1712</t>
1713
1714<section title="Warning: 110 - &#34;Response is Stale&#34;" anchor="warn.110">
1715  <iref primary="true" item="110 (warn-code)"/>
1716  <iref primary="true" item="Response is Stale (warn-text)"/>
1717<t>
1718   A cache SHOULD generate this whenever the sent response is stale.
1719</t>
1720</section>
1721
1722<section title="Warning: 111 - &#34;Revalidation Failed&#34;" anchor="warn.111">
1723  <iref primary="true" item="111 (warn-code)"/>
1724  <iref primary="true" item="Revalidation Failed (warn-text)"/>
1725<t>
1726   A cache SHOULD generate this when sending a stale response because an
1727   attempt to validate the response failed, due to an inability to reach
1728   the server.
1729</t>
1730</section>
1731
1732<section title="Warning: 112 - &#34;Disconnected Operation&#34;" anchor="warn.112">
1733  <iref primary="true" item="112 (warn-code)"/>
1734  <iref primary="true" item="Disconnected Operation (warn-text)"/>
1735<t>
1736   A cache SHOULD generate this if it is intentionally disconnected from
1737   the rest of the network for a period of time.
1738</t>
1739</section>
1740
1741<section title="Warning: 113 - &#34;Heuristic Expiration&#34;" anchor="warn.113">
1742  <iref primary="true" item="113 (warn-code)"/>
1743  <iref primary="true" item="Heuristic Expiration (warn-text)"/>
1744<t>
1745   A cache SHOULD generate this if it heuristically chose a freshness
1746   lifetime greater than 24 hours and the response's age is greater than 24
1747   hours.
1748</t>
1749</section>
1750
1751<section title="Warning: 199 - &#34;Miscellaneous Warning&#34;" anchor="warn.199">
1752  <iref primary="true" item="199 (warn-code)"/>
1753  <iref primary="true" item="Miscellaneous Warning (warn-text)"/>
1754<t>
1755   The warning text can include arbitrary information to be presented to
1756   a human user or logged. A system receiving this warning MUST NOT take
1757   any automated action, besides presenting the warning to the user.
1758</t>
1759</section>
1760
1761<section title="Warning: 214 - &#34;Transformation Applied&#34;" anchor="warn.214">
1762  <iref primary="true" item="214 (warn-code)"/>
1763  <iref primary="true" item="Transformation Applied (warn-text)"/>
1764<t>
1765   This Warning code MUST be added by a proxy if it applies any transformation to the
1766   representation, such as changing the content-coding, media-type, or
1767   modifying the representation data, unless this Warning code already appears
1768   in the response.
1769</t>
1770</section>
1771
1772<section title="Warning: 299 - &#34;Miscellaneous Persistent Warning&#34;" anchor="warn.299">
1773  <iref primary="true" item="299 (warn-code)"/>
1774  <iref primary="true" item="Miscellaneous Persistent Warning (warn-text)"/>
1775<t>
1776   The warning text can include arbitrary information to be presented to
1777   a human user or logged. A system receiving this warning MUST NOT take
1778   any automated action.
1779</t>
1780</section>
1781</section>
1782</section>
1783
1784<section anchor="history.lists" title="History Lists">
1785<t>
1786   User agents often have history mechanisms, such as "Back" buttons and
1787   history lists, that can be used to redisplay a representation retrieved
1788   earlier in a session.
1789</t>
1790<t>
1791   The freshness model (<xref target="expiration.model"/>) does not
1792   necessarily apply to history mechanisms.  That is, a history mechanism can
1793   display a previous representation even if it has expired.
1794</t>
1795<t>
1796   This does not prohibit the history mechanism from telling the user that a
1797   view might be stale or from honoring cache directives (e.g.,
1798   Cache-Control: no-store).
1799</t>
1800</section>
1801
1802
1803<section title="IANA Considerations" anchor="iana.considerations">
1804
1805<section title="Cache Directive Registry" anchor="cache.directive.registry">
1806<t>
1807   The "HTTP Cache Directive Registry" defines the name space for the
1808   cache directives. It has been created and is now maintained at
1809   &lt;http://www.iana.org/assignments/http-cache-directives&gt;.
1810</t>
1811
1812<section title="Procedure" anchor="cache.directive.registry.procedure">
1813<t>
1814   A registration MUST include the following fields:
1815   <list style="symbols">
1816      <t>Cache Directive Name</t>
1817      <t>Pointer to specification text</t>
1818   </list>
1819</t>
1820<t>
1821   Values to be added to this name space require IETF Review (see <xref target="RFC5226"/>, Section 4.1).
1822</t>
1823</section>
1824
1825<section title="Considerations for New Cache Control Directives" anchor="cache.directive.considerations">
1826<t>
1827   New extension directives ought to consider defining:
1828</t>
1829<t>
1830   <list style="symbols">
1831      <t>What it means for a directive to be specified multiple times,</t>
1832      <t>When the directive does not take an argument, what it means when an
1833      argument is present,</t>
1834      <t>When the directive requires an argument, what it means when it is
1835      missing,</t>
1836      <t>Whether the directive is specific to requests, responses, or able
1837        to be used in either.</t>
1838   </list>
1839</t>
1840<t>
1841  See also <xref target="cache.control.extensions"/>.
1842</t>
1843</section>
1844
1845<section title="Registrations" anchor="cache.directive.registration">
1846<t>
1847  The "HTTP Cache Directive Registry" shall be populated with the registrations below:
1848</t>
1849
1850<texttable align="left" suppress-title="true" anchor="iana.cache.directive.registration.table">
1851   <ttcol>Cache Directive</ttcol>
1852   <ttcol>Reference</ttcol>
1853
1854   <c>max-age</c>
1855   <c>
1856      <xref target="cache-request-directive.max-age"/>, <xref target="cache-response-directive.max-age"/>
1857   </c>
1858   <c>max-stale</c>
1859   <c>
1860      <xref target="cache-request-directive.max-stale"/>
1861   </c>
1862   <c>min-fresh</c>
1863   <c>
1864      <xref target="cache-request-directive.min-fresh"/>
1865   </c>
1866   <c>must-revalidate</c>
1867   <c>
1868      <xref target="cache-response-directive.must-revalidate"/>
1869   </c>
1870   <c>no-cache</c>
1871   <c>
1872      <xref target="cache-request-directive.no-cache"/>, <xref target="cache-response-directive.no-cache"/>
1873   </c>
1874   <c>no-store</c>
1875   <c>
1876      <xref target="cache-request-directive.no-store"/>, <xref target="cache-response-directive.no-store"/>
1877   </c>
1878   <c>no-transform</c>
1879   <c>
1880      <xref target="cache-request-directive.no-transform"/>, <xref target="cache-response-directive.no-transform"/>
1881   </c>
1882   <c>only-if-cached</c>
1883   <c>
1884      <xref target="cache-request-directive.only-if-cached"/>
1885   </c>
1886   <c>private</c>
1887   <c>
1888      <xref target="cache-response-directive.private"/>
1889   </c>
1890   <c>proxy-revalidate</c>
1891   <c>
1892      <xref target="cache-response-directive.proxy-revalidate"/>
1893   </c>
1894   <c>public</c>
1895   <c>
1896      <xref target="cache-response-directive.public"/>
1897   </c>
1898   <c>s-maxage</c>
1899   <c>
1900      <xref target="cache-response-directive.s-maxage"/>
1901   </c>
1902   <c>stale-if-error</c>
1903   <c>
1904      <xref target="RFC5861"/>, Section 4
1905   </c>
1906   <c>stale-while-revalidate</c>
1907   <c>
1908      <xref target="RFC5861"/>, Section 3
1909   </c>
1910</texttable>
1911<!--(END)-->
1912
1913</section>
1914</section>
1915
1916<section title="Warn Code Registry" anchor="warn.code.registry">
1917<t>
1918   The "HTTP Warn Codes" registry defines the name space for warn codes.
1919   It has been created and is now maintained at
1920   &lt;http://www.iana.org/assignments/http-warn-codes&gt;.
1921</t>
1922
1923<section title="Procedure" anchor="warn.code.registry.procedure">
1924<t>
1925   A registration MUST include the following fields:
1926   <list style="symbols">
1927      <t>Warn Code (3 digits)</t>
1928      <t>Short Description</t>
1929      <t>Pointer to specification text</t>
1930   </list>
1931</t>
1932<t>
1933   Values to be added to this name pace require IETF Review (see <xref target="RFC5226"/>, Section 4.1).
1934</t>
1935</section>
1936
1937<section title="Registrations" anchor="warn.code.registration">
1938<t>
1939  The "HTTP Warn Codes" registry has been populated with the registrations below:
1940</t>
1941
1942<texttable align="left" suppress-title="true" anchor="iana.warn.code.registration.table">
1943   <ttcol>Warn Code</ttcol>
1944   <ttcol>Short Description</ttcol>
1945   <ttcol>Reference</ttcol>
1946   <c>110</c>
1947   <c>Response is Stale</c>
1948   <c>
1949      <xref target="warn.110"/>
1950   </c>
1951   <c>111</c>
1952   <c>Revalidation Failed</c>
1953   <c>
1954      <xref target="warn.111"/>
1955   </c>
1956   <c>112</c>
1957   <c>Disconnected Operation</c>
1958   <c>
1959      <xref target="warn.112"/>
1960   </c>
1961   <c>113</c>
1962   <c>Heuristic Expiration</c>
1963   <c>
1964      <xref target="warn.113"/>
1965   </c>
1966   <c>199</c>
1967   <c>Miscellaneous Warning</c>
1968   <c>
1969      <xref target="warn.199"/>
1970   </c>
1971   <c>214</c>
1972   <c>Transformation Applied</c>
1973   <c>
1974      <xref target="warn.214"/>
1975   </c>
1976   <c>299</c>
1977   <c>Miscellaneous Persistent Warning</c>
1978   <c>
1979      <xref target="warn.299"/>
1980   </c>
1981</texttable>
1982
1983</section>
1984</section>
1985
1986<section title="Header Field Registration" anchor="header.field.registration">
1987<t>
1988   HTTP header fields are registered within the Message Header Field Registry
1989   maintained at
1990   &lt;http://www.iana.org/assignments/message-headers&gt;.
1991</t>
1992<t>
1993   This document defines the following HTTP header fields, so their
1994   associated registry entries have been updated according to the permanent
1995   registrations below (see <xref target="BCP90"/>):
1996</t>
1997
1998<texttable align="left" suppress-title="true" anchor="iana.header.registration.table">
1999   <ttcol>Header Field Name</ttcol>
2000   <ttcol>Protocol</ttcol>
2001   <ttcol>Status</ttcol>
2002   <ttcol>Reference</ttcol>
2003
2004   <c>Age</c>
2005   <c>http</c>
2006   <c>standard</c>
2007   <c>
2008      <xref target="header.age"/>
2009   </c>
2010   <c>Cache-Control</c>
2011   <c>http</c>
2012   <c>standard</c>
2013   <c>
2014      <xref target="header.cache-control"/>
2015   </c>
2016   <c>Expires</c>
2017   <c>http</c>
2018   <c>standard</c>
2019   <c>
2020      <xref target="header.expires"/>
2021   </c>
2022   <c>Pragma</c>
2023   <c>http</c>
2024   <c>standard</c>
2025   <c>
2026      <xref target="header.pragma"/>
2027   </c>
2028   <c>Warning</c>
2029   <c>http</c>
2030   <c>standard</c>
2031   <c>
2032      <xref target="header.warning"/>
2033   </c>
2034</texttable>
2035
2036<t>
2037   The change controller is: "IETF (iesg@ietf.org) - Internet Engineering Task
2038   Force".
2039</t>
2040</section>
2041</section>
2042
2043<section anchor="security.considerations" title="Security Considerations">
2044<t>
2045   This section is meant to inform developers, information providers, and
2046   users of known security concerns specific to HTTP caching.
2047   More general security considerations are addressed in HTTP messaging
2048   <xref target="RFC7230"/> and semantics <xref target="RFC7231"/>.
2049
2050</t>
2051<t>
2052   Caches expose additional potential vulnerabilities, since the contents of
2053   the cache represent an attractive target for malicious exploitation.
2054   Because cache contents persist after an HTTP request is complete, an attack
2055   on the cache can reveal information long after a user believes that the
2056   information has been removed from the network. Therefore, cache contents
2057   need to be protected as sensitive information.
2058</t>
2059<t>
2060   In particular, various attacks might be amplified by being stored in a
2061   shared cache; such "cache poisoning" attacks use the cache to distribute a
2062   malicious payload to many clients, and are especially effective when an
2063   attacker can use implementation flaws, elevated privileges, or other
2064   techniques to insert such a response into a cache. One common attack vector
2065   for cache poisoning is to exploit differences in message parsing on proxies
2066   and in user agents; see Section 3.3.3 of <xref target="RFC7230"/> for the relevant requirements.
2067</t>
2068<t>
2069   Likewise, implementation flaws (as well as misunderstanding of cache
2070   operation) might lead to caching of sensitive information (e.g.,
2071   authentication credentials) that is thought to be private, exposing it to
2072   unauthorized parties.
2073</t>
2074<t>
2075   Furthermore, the very use of a cache can bring about privacy concerns. For
2076   example, if two users share a cache, and the first one browses to a site,
2077   the second may be able to detect that the other has been to that site,
2078   because the resources from it load more quickly, thanks to the cache.
2079</t>
2080<t>
2081   Note that the Set-Cookie response header field <xref target="RFC6265"/> does not
2082   inhibit caching; a cacheable response with a Set-Cookie header field can be (and
2083   often is) used to satisfy subsequent requests to caches. Servers who wish
2084   to control caching of these responses are encouraged to emit appropriate
2085   Cache-Control response header fields.
2086</t>
2087
2088</section>
2089
2090<section title="Acknowledgments" anchor="acks">
2091<t>
2092  See Section 10 of <xref target="RFC7230"/>.
2093</t>
2094</section>
2095
2096</middle>
2097
2098<back>
2099<references title="Normative References">
2100
2101<!-- draft-ietf-httpbis-p1-messaging-26 -->
2102  <reference anchor="RFC7230">
2103    <front>
2104      <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
2105      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2106        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2107        <address><email>fielding@gbiv.com</email></address>
2108      </author>
2109      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2110        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2111        <address><email>julian.reschke@greenbytes.de</email></address>
2112      </author>
2113      <date month="May" year="2014"/>
2114    </front>
2115    <seriesInfo name="RFC" value="7230"/>
2116   
2117  </reference>
2118
2119<!-- draft-ietf-httpbis-p2-semantics-26 -->
2120  <reference anchor="RFC7231">
2121    <front>
2122      <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
2123      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2124        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2125        <address><email>fielding@gbiv.com</email></address>
2126      </author>
2127      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2128        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2129        <address><email>julian.reschke@greenbytes.de</email></address>
2130      </author>
2131      <date month="May" year="2014"/>
2132    </front>
2133    <seriesInfo name="RFC" value="7231"/>
2134   
2135  </reference>
2136
2137<!-- draft-ietf-httpbis-p4-conditional-26 -->
2138  <reference anchor="RFC7232">
2139    <front>
2140      <title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
2141      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2142        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2143        <address><email>fielding@gbiv.com</email></address>
2144      </author>
2145      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2146        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2147        <address><email>julian.reschke@greenbytes.de</email></address>
2148      </author>
2149      <date month="May" year="2014"/>
2150    </front>
2151    <seriesInfo name="RFC" value="7232"/>
2152   
2153  </reference>
2154
2155<!-- draft-ietf-httpbis-p5-range-26 -->
2156  <reference anchor="RFC7233">
2157    <front>
2158      <title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
2159      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2160        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2161        <address><email>fielding@gbiv.com</email></address>
2162      </author>
2163      <author fullname="Yves Lafon" initials="Y." role="editor" surname="Lafon">
2164        <organization abbrev="W3C">World Wide Web Consortium</organization>
2165        <address><email>ylafon@w3.org</email></address>
2166      </author>
2167      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2168        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2169        <address><email>julian.reschke@greenbytes.de</email></address>
2170      </author>
2171      <date month="May" year="2014"/>
2172    </front>
2173    <seriesInfo name="RFC" value="7233"/>
2174   
2175  </reference>
2176
2177<!-- draft-ietf-httpbis-p7-auth-26 -->
2178  <reference anchor="RFC7235">
2179    <front>
2180      <title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
2181      <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
2182        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
2183        <address><email>fielding@gbiv.com</email></address>
2184      </author>
2185      <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke">
2186        <organization abbrev="greenbytes">greenbytes GmbH</organization>
2187        <address><email>julian.reschke@greenbytes.de</email></address>
2188      </author>
2189      <date month="May" year="2014"/>
2190    </front>
2191    <seriesInfo name="RFC" value="7235"/>
2192   
2193  </reference>
2194
2195  <reference anchor="RFC2119">
2196    <front>
2197      <title>Key words for use in RFCs to Indicate Requirement Levels</title>
2198      <author fullname="Scott Bradner" initials="S." surname="Bradner">
2199        <organization>Harvard University</organization>
2200        <address><email>sob@harvard.edu</email></address>
2201      </author>
2202      <date month="March" year="1997"/>
2203    </front>
2204    <seriesInfo name="BCP" value="14"/>
2205    <seriesInfo name="RFC" value="2119"/>
2206  </reference>
2207
2208  <reference anchor="RFC5234">
2209    <front>
2210      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
2211      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor">
2212        <organization>Brandenburg InternetWorking</organization>
2213        <address>
2214          <email>dcrocker@bbiw.net</email>
2215        </address> 
2216      </author>
2217      <author initials="P." surname="Overell" fullname="Paul Overell">
2218        <organization>THUS plc.</organization>
2219        <address>
2220          <email>paul.overell@thus.net</email>
2221        </address>
2222      </author>
2223      <date month="January" year="2008"/>
2224    </front>
2225    <seriesInfo name="STD" value="68"/>
2226    <seriesInfo name="RFC" value="5234"/>
2227  </reference>
2228 
2229</references>
2230
2231<references title="Informative References">
2232
2233
2234
2235  <reference anchor="RFC2616">
2236    <front>
2237      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
2238      <author fullname="R. Fielding" initials="R." surname="Fielding">
2239        <organization>University of California, Irvine</organization>
2240        <address><email>fielding@ics.uci.edu</email></address>
2241      </author>
2242      <author fullname="J. Gettys" initials="J." surname="Gettys">
2243        <organization>W3C</organization>
2244        <address><email>jg@w3.org</email></address>
2245      </author>
2246      <author fullname="J. Mogul" initials="J." surname="Mogul">
2247        <organization>Compaq Computer Corporation</organization>
2248        <address><email>mogul@wrl.dec.com</email></address>
2249      </author>
2250      <author fullname="H. Frystyk" initials="H." surname="Frystyk">
2251        <organization>MIT Laboratory for Computer Science</organization>
2252        <address><email>frystyk@w3.org</email></address>
2253      </author>
2254      <author fullname="L. Masinter" initials="L." surname="Masinter">
2255        <organization>Xerox Corporation</organization>
2256        <address><email>masinter@parc.xerox.com</email></address>
2257      </author>
2258      <author fullname="P. Leach" initials="P." surname="Leach">
2259        <organization>Microsoft Corporation</organization>
2260        <address><email>paulle@microsoft.com</email></address>
2261      </author>
2262      <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
2263        <organization>W3C</organization>
2264        <address><email>timbl@w3.org</email></address>
2265      </author>
2266      <date month="June" year="1999"/>
2267    </front>
2268    <seriesInfo name="RFC" value="2616"/>
2269  </reference>
2270
2271  <reference anchor="BCP90">
2272    <front>
2273      <title>Registration Procedures for Message Header Fields</title>
2274      <author fullname="G. Klyne" initials="G." surname="Klyne">
2275        <organization>Nine by Nine</organization>
2276        <address><email>GK-IETF@ninebynine.org</email></address>
2277      </author>
2278      <author fullname="M. Nottingham" initials="M." surname="Nottingham">
2279        <organization>BEA Systems</organization>
2280        <address><email>mnot@pobox.com</email></address>
2281      </author>
2282      <author fullname="J. Mogul" initials="J." surname="Mogul">
2283        <organization>HP Labs</organization>
2284        <address><email>JeffMogul@acm.org</email></address>
2285      </author>
2286      <date month="September" year="2004"/>
2287    </front>
2288    <seriesInfo name="BCP" value="90"/>
2289    <seriesInfo name="RFC" value="3864"/>
2290  </reference>
2291
2292  <reference anchor="RFC5226">
2293    <front>
2294      <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
2295      <author initials="T." surname="Narten" fullname="T. Narten">
2296        <organization>IBM</organization>
2297        <address><email>narten@us.ibm.com</email></address>
2298      </author>
2299      <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
2300        <organization>Google</organization>
2301        <address><email>Harald@Alvestrand.no</email></address>
2302      </author>
2303      <date year="2008" month="May"/>
2304    </front>
2305    <seriesInfo name="BCP" value="26"/>
2306    <seriesInfo name="RFC" value="5226"/>
2307  </reference>
2308
2309  <reference anchor="RFC5861">
2310    <front>
2311      <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title>
2312      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
2313        <organization>Yahoo! Inc.</organization>
2314        <address><email>mnot@yahoo-inc.com</email></address>
2315      </author>
2316      <date month="April" year="2010"/>
2317    </front>
2318    <seriesInfo name="RFC" value="5861"/>
2319  </reference>
2320
2321  <reference anchor="RFC5905">
2322    <front>
2323      <title>Network Time Protocol Version 4: Protocol and Algorithms Specification</title>
2324      <author initials="D." surname="Mills" fullname="David L. Mills"/>
2325      <author initials="J." surname="Martin" fullname="Jim Martin" role="editor"/>
2326      <author initials="J." surname="Burbank" fullname="Jack Burbank"/>
2327      <author initials="W." surname="Kasch" fullname="William Kasch"/>
2328      <date year="2010" month="June"/>
2329    </front>
2330    <seriesInfo name="RFC" value="5905"/>
2331  </reference>
2332
2333  <reference anchor="RFC6265">
2334    <front>
2335      <title>HTTP State Management Mechanism</title>
2336      <author initials="A." surname="Barth" fullname="Adam Barth">
2337        <organization abbrev="U.C. Berkeley">
2338          University of California, Berkeley
2339        </organization>
2340        <address><email>abarth@eecs.berkeley.edu</email></address>
2341      </author>
2342      <date year="2011" month="April"/>
2343    </front>
2344    <seriesInfo name="RFC" value="6265"/>
2345  </reference>
2346
2347</references>
2348
2349<section anchor="changes.from.rfc.2616" title="Changes from RFC 2616">
2350<t>
2351  The specification has been substantially rewritten for clarity.
2352</t>
2353<t>
2354  The conditions under which an authenticated response can be cached have been
2355  clarified.
2356  (<xref target="caching.authenticated.responses"/>)
2357</t>
2358<t>
2359  New status codes can now define that caches are allowed to use heuristic
2360  freshness with them.
2361  Caches are now allowed to calculate heuristic freshness for URIs with query
2362  components.
2363  (<xref target="heuristic.freshness"/>)
2364</t>
2365<t>
2366  The algorithm for calculating age is now less conservative.
2367  Caches are now required to handle dates with time zones as if they're
2368  invalid, because it's not possible to accurately guess.
2369  (<xref target="age.calculations"/>)
2370</t>
2371<t>
2372  The Content-Location response header field is no longer used
2373  to determine the appropriate response to use when validating.
2374  (<xref target="validation.model"/>)
2375</t>
2376<t>
2377  The algorithm for selecting a cached negotiated response to use has been
2378  clarified in several ways. In particular, it now explicitly allows
2379  header-specific canonicalization when processing selecting header fields.
2380  (<xref target="caching.negotiated.responses"/>).
2381</t>
2382<t>
2383  Requirements regarding denial-of-service attack avoidance when performing
2384  invalidation have been clarified.
2385  (<xref target="invalidation"/>)
2386</t>
2387<t>
2388  Cache invalidation only occurs when a successful response is received.
2389  (<xref target="invalidation"/>)
2390</t>
2391<t>
2392  Cache directives are explicitly defined to be case-insensitive.
2393  Handling of multiple instances of cache directives when only one is
2394  expected is now defined.
2395  (<xref target="header.cache-control"/>)
2396</t>
2397<t>
2398  The "no-store" request directive doesn't apply to responses; i.e.,
2399  a cache can satisfy a request with no-store on it and does not invalidate
2400  it. (<xref target="cache-request-directive.no-store"/>)
2401</t>
2402<t>
2403  The qualified forms of the private and no-cache cache directives are noted
2404  to not be widely implemented; for example, "private=foo" is interpreted by many
2405  caches as simply "private". Additionally, the meaning of the qualified
2406  form of no-cache has been clarified.
2407  (<xref target="cache-response-directive"/>)
2408</t>
2409<t>
2410  The "no-cache" response directive's meaning has been clarified.
2411  (<xref target="cache-response-directive.no-cache"/>)
2412</t>
2413<t>
2414  The one-year limit on <xref target="header.expires" format="none">Expires</xref> header field values has been removed; instead,
2415  the reasoning for using a sensible value is given.
2416  (<xref target="header.expires"/>)
2417</t>
2418<t>
2419  The <xref target="header.pragma" format="none">Pragma</xref> header field is now only defined for backwards compatibility;
2420  future pragmas are deprecated.
2421  (<xref target="header.pragma"/>)
2422</t>
2423<t>
2424  Some requirements regarding production and processing of the <xref target="header.warning" format="none">Warning</xref>
2425  header fields have been relaxed, as it is not widely implemented.
2426  Furthermore, the <xref target="header.warning" format="none">Warning</xref> header field no longer uses RFC 2047 encoding,
2427  nor does it allow multiple languages, as these aspects were not implemented.
2428  (<xref target="header.warning"/>)
2429</t>
2430<t>
2431  This specification introduces the Cache Directive and Warn Code Registries,
2432  and defines considerations for new cache directives
2433  (Sections <xref target="cache.directive.registry" format="counter"/> and <xref target="warn.code.registry" format="counter"/>).
2434</t>
2435</section>
2436
2437<section title="Imported ABNF" anchor="imported.abnf">
2438   
2439   
2440   
2441   
2442   
2443   
2444   
2445   
2446   
2447   
2448   
2449   
2450   
2451   
2452   
2453   
2454<t>
2455   The following core rules are included by reference, as defined in Appendix B.1 of <xref target="RFC5234"/>: ALPHA (letters), CR (carriage
2456   return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double
2457   quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit
2458   sequence of data), SP (space), and VCHAR (any visible US-ASCII character).
2459</t>
2460<t>
2461   The rules below are defined in <xref target="RFC7230"/>:
2462</t>
2463<figure><artwork type="abnf2616"><![CDATA[
2464  OWS           = <OWS, see [RFC7230], Section 3.2.3>
2465  field-name    = <field-name, see [RFC7230], Section 3.2>
2466  quoted-string = <quoted-string, see [RFC7230], Section 3.2.6>
2467  token         = <token, see [RFC7230], Section 3.2.6>
2468
2469  port          = <port, see [RFC7230], Section 2.7>
2470  pseudonym     = <pseudonym, see [RFC7230], Section 5.7.1>
2471  uri-host      = <uri-host, see [RFC7230], Section 2.7>
2472]]></artwork></figure>
2473<t>
2474   The rules below are defined in other parts:
2475</t>
2476<figure><artwork type="abnf2616"><![CDATA[
2477  HTTP-date     = <HTTP-date, see [RFC7231], Section 7.1.1.1>
2478]]></artwork></figure>
2479</section>
2480
2481
2482<section title="Collected ABNF" anchor="collected.abnf">
2483<t>
2484  In the collected ABNF below, list rules are expanded as per Section 1.2 of <xref target="RFC7230"/>.
2485</t><figure>
2486<artwork type="abnf" name="p6-cache.parsed-abnf"><![CDATA[
2487Age = delta-seconds
2488
2489Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS
2490 cache-directive ] )
2491
2492Expires = HTTP-date
2493
2494HTTP-date = <HTTP-date, see [RFC7231], Section 7.1.1.1>
2495
2496OWS = <OWS, see [RFC7230], Section 3.2.3>
2497
2498Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS
2499 pragma-directive ] )
2500
2501Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ]
2502 )
2503
2504cache-directive = token [ "=" ( token / quoted-string ) ]
2505
2506delta-seconds = 1*DIGIT
2507
2508extension-pragma = token [ "=" ( token / quoted-string ) ]
2509
2510field-name = <field-name, see [RFC7230], Section 3.2>
2511
2512port = <port, see [RFC7230], Section 2.7>
2513pragma-directive = "no-cache" / extension-pragma
2514pseudonym = <pseudonym, see [RFC7230], Section 5.7.1>
2515
2516quoted-string = <quoted-string, see [RFC7230], Section 3.2.6>
2517
2518token = <token, see [RFC7230], Section 3.2.6>
2519
2520uri-host = <uri-host, see [RFC7230], Section 2.7>
2521
2522warn-agent = ( uri-host [ ":" port ] ) / pseudonym
2523warn-code = 3DIGIT
2524warn-date = DQUOTE HTTP-date DQUOTE
2525warn-text = quoted-string
2526warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date
2527 ]
2528]]></artwork>
2529</figure>
2530</section>
2531
2532
2533  </back>
2534</rfc>
Note: See TracBrowser for help on using the repository browser.