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

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