<?xml version="1.0" encoding="UTF-8"?> <!--This XML document is the output of clean-for-DTD.xslt; a tool that strips extensions to RFC 7749 from documents for processing with xml2rfc.draft submitted in xml v3 --><!--TARGET-GENERATOR: 202007--> <!--TARGET-VOCABULARY: 3--> <?xml-stylesheet type='text/xsl' href='lib/myxml2rfc.xslt'?> <?rfc toc="yes" ?> <?rfc tocdepth="4" ?> <?rfc symrefs="yes" ?> <?rfc sortrefs="yes" ?> <?rfc compact="yes"?> <?rfc subcompact="no" ?> <?rfc linkmailto="no" ?> <?rfc editing="no" ?> <?rfc comments="yes"?> <?rfc inline="yes"?> <?rfc rfcedstyle="yes"?> <?github-issue-label cache?><!DOCTYPE rfc [ <!ENTITY nbsp " "> <!ENTITY zwsp "​"> <!ENTITY nbhy "‑"> <!ENTITY wj "⁠"> ]> <rfc version="3" tocInclude="true" tocDepth="4" sortRefs="true" symRefs="true" submissionType="IETF" category="std" consensus="true" ipr="pre5378Trust200902" docName="draft-ietf-httpbis-cache-19"obsoletes="7234"> <!--see https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/420--> <?v3xml2rfc silence="Warning: Setting consensus="true" for IETF STD document"?> <?v3xml2rfc silence="Warning: Expected a valid submissionType (stream) setting"?>number="9111" obsoletes="7234" updates="" xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en"> <front> <title>HTTP Caching</title> <seriesInfo name="RFC" value="9111"/> <seriesInfo name="STD" value="98"/> <author fullname="Roy T. Fielding" initials="R." surname="Fielding" role="editor"> <organization>Adobe</organization> <address> <postal> <postalLine>345 Park Ave</postalLine> <postalLine>San Jose, CA 95110</postalLine> <postalLine>United States of America</postalLine> </postal> <email>fielding@gbiv.com</email> <uri>https://roy.gbiv.com/</uri> </address> </author> <author fullname="Mark Nottingham" initials="M." surname="Nottingham" role="editor"> <organization>Fastly</organization> <address> <postal><postalLine>Prahran VIC</postalLine><postalLine>Prahran</postalLine> <postalLine>Australia</postalLine> </postal> <email>mnot@mnot.net</email> <uri>https://www.mnot.net/</uri> </address> </author> <author fullname="Julian Reschke" initials="J." surname="Reschke" role="editor"> <organization abbrev="greenbytes">greenbytes GmbH</organization> <address> <postal> <postalLine>Hafenweg 16</postalLine> <postalLine>48155 Münster</postalLine> <postalLine>Germany</postalLine> </postal> <email>julian.reschke@greenbytes.de</email> <uri>https://greenbytes.de/tech/webdav/</uri> </address> </author> <dateyear="2021" month="September" day="10"/>year="2022" month="June"/> <area>Applications and Real-Time</area> <workgroup>HTTP Working Group</workgroup> <keyword>Hypertext Transfer Protocol</keyword> <keyword>HTTP</keyword> <keyword>HTTP Caching</keyword> <abstract> <t> The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages. </t> <t> This document obsoletes RFC 7234. </t> </abstract><note title="Editorial Note"> <t>This note is to be removed before publishing as an RFC.</t> <t> Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/" brackets="angle"/>. </t> <t> Working Group information can be found at <eref target="https://httpwg.org/" brackets="angle"/>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-core" brackets="angle"/>. </t> <t> The changes in this draft are summarized in <xref target="changes.since.18"/>. </t> </note></front> <middle> <section anchor="caching" title="Introduction"> <t> The Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive messages for flexible interaction with network-based hypertext information systems. It is typically used for distributed information systems, where the use of response caches can improve performance. This document defines aspects of HTTP related to caching and reusing response messages. </t> <iref item="cache"/> <t> An HTTP<em>cache</em>"cache" is a local store of response messages and the subsystem that controls storage, retrieval, and deletion of messages in it. A cache stores cacheable responses to reduce the response time and network bandwidth consumption on future equivalent requests. Any client or server <bcp14>MAY</bcp14> use a cache, though not when acting as a tunnel (<xref target="HTTP" section="3.7"/>). </t> <iref item="shared cache"/> <iref item="private cache"/> <t anchor="shared.and.private.caches"> A<em>shared cache</em>"shared cache" is a cache that stores responses for reuse by more than one user; shared caches are usually (but not always) deployed as a part of an intermediary. A<em>private cache</em>,"private cache", in contrast, is dedicated to a single user; often, they are deployed as a component of a user agent. </t> <t> The goal of HTTP caching is significantly improving performance by reusing a prior response message to satisfy a current request. A cache considers a stored response "fresh", as defined in <xref target="expiration.model"/>, if it can be reused without "validation" (checking with the origin server to see if the cached response remains valid for this request). A fresh response can therefore reduce both latency and network overhead each time the cache reuses it. When a cached response is not fresh, it might still be reusable if validation can freshen it (<xref target="validation.model"/>) or if the origin is unavailable (<xref target="serving.stale.responses"/>). </t> <t> This document obsoletes <xref target="RFC7234" format="none">RFC 7234</xref>, with the changes being summarized in <xref target="changes.from.rfc.7234"/>. </t> <section anchor="requirements.notation" title="Requirements Notation"> <t> The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY","<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described inBCP 14BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here. </t> <t> <xref target="HTTP" section="2"/> defines conformance criteria and contains considerations regarding error handling. </t> </section> <section anchor="notation" title="Syntax Notation"> <iref primary="true" item="Grammar" subitem="DIGIT"/> <t> This specification uses the Augmented Backus-Naur Form (ABNF) notation of <xref target="RFC5234"/>, extended with the notation for case-sensitivity in strings defined in <xref target="RFC7405"/>. </t> <t> It also uses a list extension, defined in <xref target="HTTP" section="5.6.1"/>, that allows for compact definition of comma-separated lists using a'#'"#" operator (similar to how the'*'"*" operator indicates repetition). <xref target="collected.abnf"/> shows the collected grammar with all list operators expanded to standard ABNF notation. </t> <section anchor="abnf.imported" title="Imported Rules"> <t anchor="core.rules"> The following core rule is included by reference, as defined in <xref target="RFC5234" sectionFormat="comma" section="B.1"/>: DIGIT (decimal 0-9). </t> <t anchor="imported.rules"> <xref target="HTTP"/> defines the following rules: </t> <sourcecodetype="abnf7230"><![CDATA[type="abnf9110"><![CDATA[ HTTP-date = <HTTP-date, see [HTTP], Section 5.6.7> OWS = <OWS, see [HTTP], Section 5.6.3> field-name = <field-name, see [HTTP], Section 5.1> quoted-string = <quoted-string, see [HTTP], Section 5.6.4> token = <token, see [HTTP], Section 5.6.2> ]]></sourcecode> </section> <section anchor="delta-seconds" title="Delta Seconds"> <t> The delta-seconds rule specifies a non-negative integer, representing time in seconds. </t> <iref item="Grammar" primary="true" subitem="delta-seconds"/> <sourcecodetype="abnf7230"><![CDATA[type="abnf9110"><![CDATA[ delta-seconds = 1*DIGIT ]]></sourcecode> <t> A recipient parsing a delta-seconds value and converting it to binary form ought to use an arithmetic type of at least 31 bits of non-negative integer range. If a cache receives a delta-seconds value greater than the greatest integer it can represent, or if any of its subsequent calculations overflows, the cache <bcp14>MUST</bcp14> consider the value to be 2147483648 (2<sup>31</sup>) or the greatest positive integer it can conveniently represent. </t> <aside> <t> <strong>Note:</strong> The value 2147483648 is here for historical reasons, represents infinity (over 68 years), and does not need to be stored in binary form; an implementation could produce it as a string if any overflow occurs, even if the calculations are performed with an arithmetic type incapable of directly representing that number. What matters here is that an overflow be detected and not treated as a negative value in later calculations. </t> </aside> </section> </section> </section> <section anchor="caching.overview" title="Overview of Cache Operation"> <iref item="cache key"/> <t> Proper cache operation preserves the semantics of HTTP transfers while reducing the transmission of information already held in the cache. See <xref target="HTTP" section="3"/> for the general terminology and core concepts of HTTP. </t> <t> Although caching is an entirely <bcp14>OPTIONAL</bcp14> feature of HTTP, it can be assumed that reusing a cached response is desirable and that such reuse is the default behavior when no requirement or local configuration prevents it. Therefore, HTTP cache requirements are focused on preventing a cache from either storing a non-reusable response or reusing a stored response inappropriately, rather than mandating that caches always store and reuse particular responses. </t> <iref item="cache key"/> <t> The<em>cache key</em>"cache key" is the information a cache uses to choose a response and is composed from, at a minimum, the request method and target URI used to retrieve the stored response; the method determines under which circumstances that response can be used to satisfy a subsequent request. However, many HTTP caches in common use today only cache GETresponses,responses and therefore only use the URI as the cachekey, forwarding other methods.key. </t> <t> A cache might store multiple responses for a request target that is subject to content negotiation. Caches differentiate these responses by incorporating some of the original request's header fields into the cache key as well, using information in the Vary response header field, as per <xref target="caching.negotiated.responses"/>. </t> <t> Caches might incorporate additional material into the cache key. For example, user agent caches might include the referring site's identity, thereby "double keying" the cache to avoid some privacy risks (see <xref target="security.timing"/>). </t> <t> Most commonly, caches store the successful result of a retrieval request: i.e., a 200 (OK) response to a GET request, which contains a representation of the target resource (<xref target="HTTP" section="9.3.1"/>). However, it is also possible to store redirects, negative results (e.g., 404 (Not Found)), incomplete results (e.g., 206 (Partial Content)), and responses to methods other than GET if the method's definition allows such caching and defines something suitable for use as a cache key. </t> <t> A cache is<em>disconnected</em>"disconnected" when it cannot contact the origin server or otherwise find a forward path for a request. A disconnected cache can serve stale responses in some circumstances (<xref target="serving.stale.responses"/>). </t> </section> <section anchor="response.cacheability" title="Storing Responses in Caches"> <t> A cache <bcp14>MUST NOT</bcp14> store a response to a request unless: </t> <ul> <li> <t>the request method is understood by the cache;</t> </li> <li> <t>the response status code is final (see <xref target="HTTP" section="15"/>);</t> </li> <li> <t>if the response status code is 206 or 304, or the"must-understand"must-understand cache directive (see <xref target="cache-response-directive.must-understand"/>) is present: the cache understands the response status code;</t> </li> <li> <t>the"no-store"no-store cache directive is not present in the response (see <xref target="cache-response-directive.no-store"/>);</t> </li> <li> <t>if the cache is shared: the"private"private response directive is either not present or allows a shared cache to store a modified response; see <xref target="cache-response-directive.private"/>);</t> </li> <li> <t>if the cache is shared: the Authorization header field is not present in the request (see <xref target="HTTP" section="11.6.2"/>) or a response directive is present that explicitly allows shared caching (see <xref target="caching.authenticated.responses"/>);and,</t>and</t> </li> <li> <t>the response contains at least oneof:</t>of the following:</t> <ul> <li>a public response directive (see <xref target="cache-response-directive.public"/>);</li> <li>a private response directive, if the cache is not shared (see <xref target="cache-response-directive.private"/>);</li> <li>an <xref target="field.expires" format="none">Expires</xref> header field (see <xref target="field.expires"/>);</li> <li>a max-age response directive (see <xref target="cache-response-directive.max-age"/>);</li> <li>if the cache is shared: an s-maxage response directive (see <xref target="cache-response-directive.s-maxage"/>);</li> <li>aCache Control Extensioncache extension that allows it to be cached (see <xref target="cache.control.extensions"/>);or,</li>or</li> <li>a status code that is defined as heuristically cacheable (see <xref target="heuristic.freshness"/>).</li> </ul> </li> </ul> <t> Note that acache-controlcache extension can override any of the requirements listed; see <xref target="cache.control.extensions"/>. </t> <t> In this context, a cache has "understood" a request method or a response status code if it recognizes it and implements all specified caching-related behavior. </t> <t> Note that, in normal operation, some caches will not store a response that has neither a cache validator nor an explicit expiration time, as such responses are not usually useful to store. However, caches are not prohibited from storing such responses. </t> <section anchor="storing.fields" title="Storing Header and Trailer Fields"> <t> Caches <bcp14>MUST</bcp14> include all received response header fields—-- includingunrecognisedunrecognized ones—-- when storing a response; this assures that new HTTP header fields can be successfully deployed. However, the following exceptions are made: </t> <ul> <li>The Connection header field and fields whose names are listed in it are required by <xref target="HTTP" section="7.6.1"/> to be removed before forwarding the message. This <bcp14>MAY</bcp14> be implemented by doing so before storage.</li> <li>Likewise, some fields' semantics require them to be removed before forwarding the message, and this <bcp14>MAY</bcp14> be implemented by doing so before storage; see <xref target="HTTP" section="7.6.1"/> for some examples.</li> <li>The no-cache (<xref target="cache-response-directive.no-cache"/>) and private (<xref target="cache-response-directive.private"/>) cache directives can have arguments that prevent storage of header fields by all caches and shared caches, respectively.</li> <li>Header fields that are specific to the proxy that a cache uses when forwarding a request <bcp14>MUST NOT</bcp14> be stored, unless the cache incorporates the identity of the proxy into the cache key. Effectively, this is limited to Proxy-Authenticate (<xref target="HTTP" section="11.7.1"/>), Proxy-Authentication-Info (<xref target="HTTP" section="11.7.3"/>), and Proxy-Authorization (<xref target="HTTP" section="11.7.2"/>).</li> </ul> <t> Caches <bcp14>MAY</bcp14> either store trailer fields separate from headerfields,fields or discard them. Caches <bcp14>MUST NOT</bcp14> combine trailer fields with header fields. </t> </section> <section anchor="update" title="Updating Stored Header Fields"> <t> Caches are required to update a stored response's header fields from another (typically newer) response in several situations; for example, see Sections <xreftarget="combining.responses"/>,target="combining.responses" format="counter"/>, <xreftarget="freshening.responses"/>target="freshening.responses" format="counter"/>, and <xreftarget="head.effects"/>.target="head.effects" format="counter"/>. </t> <t> When doing so, the cache <bcp14>MUST</bcp14> add each header field in the provided response to the stored response, replacing field values that are already present, with the following exceptions: </t> <ul> <li>Header fields excepted from storage in <xref target="storing.fields"/>,</li> <li>Header fields that the cache's stored response depends upon, as described below,</li> <li>Header fields that are automatically processed and removed by the recipient, as described below, and</li> <li>The Content-Length header field.</li> </ul> <t> In some cases, caches (especially in user agents) store the results of processing the received response, rather than the response itself, and updating header fields that affect that processing can result in inconsistent behavior and security issues. Caches in this situation <bcp14>MAY</bcp14> omit these header fields from updating stored responses on an exceptionalbasis,basis but <bcp14>SHOULD</bcp14> limit such omission to those fields necessary to assure integrity of the stored response. </t> <t> For example, a browser might decode the content coding of a response while it is being received, creating a disconnect between the data it has stored and the response's original metadata. Updating that stored metadata with a different Content-Encoding header field would be problematic. Likewise, a browser might store a post-parse HTMLtree,tree rather than the content received in the response; updating the Content-Type header field would not be workable in thiscase,case because any assumptions about the format made in parsing would now be invalid. </t> <t> Furthermore, some fields are automatically processed and removed by the HTTPimplementation; for example,implementation, such as the Content-Range header field. Implementations <bcp14>MAY</bcp14> automatically omit such header fields from updates, even when the processing does not actually occur. </t> <t> Note that the Content-* prefix is not a signal that a header field is omitted from update; it is a convention for MIME header fields, not HTTP. </t> </section> <section anchor="incomplete.responses" title="Storing Incomplete Responses"> <t> If the request method is GET, the response status code is 200 (OK), and the entire response header section has been received, a cache <bcp14>MAY</bcp14> store a responsebodythat is not complete (<xref target="HTTP"section="3.4"/>) ifsection="6.1"/>) provided that the stored response is recorded as being incomplete. Likewise, a 206 (Partial Content) response <bcp14>MAY</bcp14> be stored as if it were an incomplete 200 (OK) response. However, a cache <bcp14>MUST NOT</bcp14> store incomplete or partial-content responses if it does not support the Range and Content-Range header fields or if it does not understand the range units used in those fields. </t> <t> A cache <bcp14>MAY</bcp14> complete a stored incomplete response by making a subsequent range request (<xref target="HTTP" section="14.2"/>) and combining the successful response with the stored response, as defined in <xref target="combining.responses"/>. A cache <bcp14>MUST NOT</bcp14> use an incomplete response to answer requests unless the response has been made complete, or the request is partial and specifies a range wholly within the incomplete response. A cache <bcp14>MUST NOT</bcp14> send a partial response to a client without explicitly marking it using the 206 (Partial Content) status code. </t> </section> <section anchor="combining.responses" title="Combining Partial Content"> <t> A response might transfer only a partial representation if the connection closed prematurely or if the request used one or more Range specifiers (<xref target="HTTP" section="14.2"/>). After several such transfers, a cache might have received several ranges of the same representation. A cache <bcp14>MAY</bcp14> combine these ranges into a single stored response, and reuse that response to satisfy later requests, if they all share the same strong validator and the cache complies with the client requirements in <xref target="HTTP" section="15.3.7.3"/>. </t> <t> When combining the new response with one or more stored responses, a cache <bcp14>MUST</bcp14> update the stored response header fields using the header fields provided in the new response, as per <xref target="update"/>. </t> </section> <section anchor="caching.authenticated.responses" title="Storing Responses to Authenticated Requests"> <t> A shared cache <bcp14>MUST NOT</bcp14> use a cached response to a request with an Authorization header field (<xref target="HTTP" section="11.6.2"/>) to satisfy any subsequent request unless the response contains a <xref target="field.cache-control" format="none">Cache-Control</xref> field with a response directive (<xref target="cache-response-directive"/>) that allows it to be stored by a sharedcachecache, and the cache conforms to the requirements of that directive for that response. </t> <t> In this specification, the following response directives have such an effect: must-revalidate (<xref target="cache-response-directive.must-revalidate"/>), public (<xref target="cache-response-directive.public"/>), and s-maxage (<xref target="cache-response-directive.s-maxage"/>). </t> </section> </section> <section anchor="constructing.responses.from.caches" title="Constructing Responses from Caches"> <t> When presented with a request, a cache <bcp14>MUST NOT</bcp14> reuse a stored response unless: </t> <ul> <li><t>The<t>the presented target URI (<xref target="HTTP" section="7.1"/>) and that of the stored response match, and</t> </li> <li> <t>the request method associated with the stored response allows it to be used for the presented request, and</t> </li> <li> <t>request header fields nominated by the stored response (if any) match those presented (see <xref target="caching.negotiated.responses"/>), and</t> </li> <li> <t>the stored response does not contain the no-cachecachedirective (<xref target="cache-response-directive.no-cache"/>), unless it is successfully validated (<xref target="validation.model"/>), and</t> </li> <li> <t>the stored response iseither:</t>one of the following:</t> <ul> <li>fresh (see <xref target="expiration.model"/>), or</li> <li>allowed to be served stale (see <xref target="serving.stale.responses"/>), or</li> <li>successfully validated (see <xref target="validation.model"/>).</li> </ul> </li> </ul> <t> Note that acache-controlcache extension can override any of the requirements listed; see <xref target="cache.control.extensions"/>. </t> <t> When a stored response is used to satisfy a request without validation, a cache <bcp14>MUST</bcp14> generate an <xref target="field.age" format="none">Age</xref> header field (<xref target="field.age"/>), replacing any present in the response with a value equal to the stored response's current_age; see <xref target="age.calculations"/>. </t> <t> A cache <bcp14>MUST</bcp14> write through requests with methods that are unsafe (<xref target="HTTP" section="9.2.1"/>) to the origin server; i.e., a cache is not allowed to generate a reply to such a request before having forwarded the request and having received a corresponding response. </t> <t> Also, note that unsafe requests might invalidate already-stored responses; see <xref target="invalidation"/>. </t> <iref item="collapsed requests"/> <t> A cache can use a response that is stored or storablecan be usedto satisfy multiple requests, provided that it is allowed to reuse that response for the requests in question. This enablescachesa cache to<em>collapse requests</em> —"collapse requests" -- or combine multiple incoming requests into a single forward request upon a cache miss—-- thereby reducing load on the origin server and network.However, noteNote, however, that if theresponsecache cannot use the returnedis not able to be usedresponse for some or all of the collapsed requests,additional latency might be introduced, because theyit will need tobe forwardedforward the requests in order tobe satisfied.satisfy them, potentially introducing additional latency. </t> <t> When more than one suitable response is stored, a cache <bcp14>MUST</bcp14> use the most recent one (as determined by the Date header field). It can also forward the request with "Cache-Control: max-age=0" or "Cache-Control: no-cache" to disambiguate which response to use. </t> <t> A cache without a clock (<xref target="HTTP" section="5.6.7"/>) <bcp14>MUST</bcp14> revalidate stored responses upon every use. </t> <section anchor="caching.negotiated.responses" title="Calculating Cache Keys with the Vary Header Field"> <t> When a cache receives a request that can be satisfied by a stored response and that stored response contains a Vary header field (<xref target="HTTP" section="12.5.5"/>), the cache <bcp14>MUST NOT</bcp14> use that stored response without revalidation unless all the presented request header fields nominated by that Vary field value match those fields in the original request (i.e., the request that caused the cached response to be stored). </t> <t> The header fields from two requests are defined to match if and only if those in the first request can be transformed to those in the second request by applying anyof:of the following: </t> <ul> <li> adding or removing whitespace, where allowed in the header field's syntax </li> <li> combining multiple header field lines with the same field name (see <xref target="HTTP" section="5.2"/>) </li> <li> normalizing both header field values in a way that is known to have identical semantics, according to the header field's specification (e.g., reordering field values when order is not significant; case-normalization, where values are defined to be case-insensitive) </li> </ul> <t> If (after any normalization that might take place) a header field is absent from a request, it can only match another request if it is also absent there. </t> <t> A stored response with a Vary header field value containing a member "*" always fails to match. </t> <t> If multiple stored responses match, the cache will need to choose one to use. When a nominated request header field has a known mechanism for ranking preference (e.g., qvalues on Accept and similar request header fields), that mechanism <bcp14>MAY</bcp14> be used to choose a preferred response. If such a mechanism is not available, or leads to equally preferred responses, the most recent response (as determined by the Date header field) is chosen, as per <xref target="constructing.responses.from.caches"/>. </t> <t> Some resources mistakenly omit the Vary header field from their default response (i.e., the one sent when the request does not express any preferences), with the effect of choosing it for subsequent requests to that resource even when more preferable responses are available. When a cache has multiple stored responses for a target URI and one or more omits the Vary header field, the cache <bcp14>SHOULD</bcp14> choose the most recent (see <xref target="age.calculations"/>) stored response with a valid Vary field value. </t> <t> If no stored response matches, the cache cannot satisfy the presented request. Typically, the request is forwarded to the origin server, potentially with preconditions added to describe what responses the cache has already stored (<xref target="validation.model"/>). </t> </section> <section anchor="expiration.model" title="Freshness"> <iref item="fresh"/> <iref item="stale"/> <t> A<em>fresh</em>"fresh" response is one whose age has not yet exceeded its freshness lifetime. Conversely, a<em>stale</em>"stale" response is one where it has. </t> <iref item="freshness lifetime"/> <iref item="explicit expiration time"/> <iref item="heuristic expiration time"/> <t> A response's<em>freshness lifetime</em>"freshness lifetime" is the length of time between its generation by the origin server and its expiration time. An<em>explicit"explicit expirationtime</em>time" is the time at which the origin server intends that a stored response can no longer be used by a cache without further validation, whereas a<em>heuristic"heuristic expirationtime</em>time" is assigned by a cache when no explicit expiration time is available. </t> <iref item="age"/> <t> A response's<em>age</em>"age" is the time that has passed since it was generated by, or successfully validated with, the origin server. </t> <t> When a response is fresh, it can be used to satisfy subsequent requests without contacting the origin server, thereby improving efficiency. </t> <t> The primary mechanism for determining freshness is for an origin server to provide an explicit expiration time in the future, using either the <xref target="field.expires" format="none">Expires</xref> header field (<xref target="field.expires"/>) or the max-age response directive (<xref target="cache-response-directive.max-age"/>). Generally, origin servers will assign future explicit expiration times to responses in the belief that the representation is not likely to change in a semantically significant way before the expiration time is reached. </t> <t> If an origin server wishes to force a cache to validate every request, it can assign an explicit expiration time in the past to indicate that the response is already stale. Compliant caches will normally validate a stale cached response before reusing it for subsequent requests (see <xref target="serving.stale.responses"/>). </t> <t> Since origin servers do not always provide explicit expiration times, caches are also allowed to use a heuristic to determine an expiration time under certain circumstances (see <xref target="heuristic.freshness"/>). </t> <t> The calculation to determine if a response is fresh is: </t><artwork type="code"><![CDATA[<sourcecode type="pseudocode"><![CDATA[ response_is_fresh = (freshness_lifetime > current_age)]]></artwork>]]></sourcecode> <t> freshness_lifetime is defined in <xref target="calculating.freshness.lifetime"/>; current_age is defined in <xref target="age.calculations"/>. </t> <t> Clients can send the max-age or min-fresh request directives (<xref target="cache-request-directive"/>) to suggest limits on the freshness calculations for the corresponding response. However, caches are not required to honor them. </t> <t> When calculating freshness, to avoid common problems in date parsing: </t> <ul> <li>Although all date formats are specified to be case-sensitive, a cache recipient <bcp14>SHOULD</bcp14> match the field value case-insensitively.</li> <li>If a cache recipient's internal implementation of time has less resolution than the value of an HTTP-date, the recipient <bcp14>MUST</bcp14> internally represent a parsed <xref target="field.expires" format="none">Expires</xref> date as the nearest time equal to or earlier than the received value.</li> <li>A cache recipient <bcp14>MUST NOT</bcp14> allow local time zones to influence the calculation or comparison of an age or expiration time.</li> <li>A cache recipient <bcp14>SHOULD</bcp14> consider a date with a zone abbreviation other than "GMT" to be invalid for calculating expiration.</li> </ul> <t> Note that freshness applies only to cache operation; it cannot be used to force a user agent to refresh its display or reload a resource. See <xref target="history.lists"/> for an explanation of the difference between caches and history mechanisms. </t> <section anchor="calculating.freshness.lifetime" title="Calculating Freshness Lifetime"> <t> A cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a response by evaluating the following rules and using the firstmatch of:match: </t> <ul> <li>If the cache is shared and the s-maxage response directive (<xref target="cache-response-directive.s-maxage"/>) is present, use its value, or</li> <li>If the max-age response directive (<xref target="cache-response-directive.max-age"/>) is present, use its value, or</li> <li>If the <xref target="field.expires" format="none">Expires</xref> response header field (<xref target="field.expires"/>) is present, use its value minus the value of the Date response header field (using the time the message was received if it is not present, as per <xref target="HTTP" section="6.6.1"/>), or</li> <li>Otherwise, no explicit expiration time is present in the response. A heuristic freshness lifetime might be applicable; see <xref target="heuristic.freshness"/>.</li> </ul> <t> Note that this calculation is intended to reduce clock skew by using the clock information provided by the origin server whenever possible. </t> <t> When there is more than one value present for a given directive (e.g., two <xref target="field.expires" format="none">Expires</xref> header field lines or multiple Cache-Control: max-age directives), either the first occurrence should beused,used or the response should be considered stale. If directives conflict (e.g., both max-age and no-cache are present), the most restrictive directive should be honored. Caches are encouraged to consider responses that have invalid freshness information (e.g., a max-age directive with non-integer content) to be stale. </t> </section> <section anchor="heuristic.freshness" title="Calculating Heuristic Freshness"> <iref item="heuristically cacheable"/> <t> Since origin servers do not always provide explicit expiration times, a cache <bcp14>MAY</bcp14> assign a heuristic expiration time when an explicit time is not specified, employing algorithms that use other field values (such as the Last-Modified time) to estimate a plausible expiration time. This specification does not provide specific algorithms, but it does impose worst-case constraints on their results. </t> <t> A cache <bcp14>MUST NOT</bcp14> use heuristics to determine freshness when an explicit expiration time is present in the stored response. Because of the requirements in <xref target="response.cacheability"/>,this means thatheuristics can only be used on responses without explicit freshness whose status codes are defined as<em>heuristically cacheable</em>"heuristically cacheable" (e.g., see <xref target="HTTP"section="15.1"/>),section="15.1"/>) andthoseon responses without explicit freshness that have been marked as explicitly cacheable (e.g., with a"public"public response directive). </t> <t> Note that in previousspecificationsspecifications, heuristically cacheable response status codes were called "cacheable bydefault."default". </t> <t> If the response has a Last-Modified header field (<xref target="HTTP" section="8.8.2"/>), caches are encouraged to use a heuristic expiration value that is no more than some fraction of the interval since that time. A typical setting of this fraction might be 10%. </t> <aside> <t> <strong>Note:</strong><xrefA previous version of the HTTP specification (<xref target="RFC2616"section="13.9"/>section="13.9"/>) prohibited caches from calculating heuristic freshness for URIs with query components (i.e., those containing'?')."?"). In practice, this has not been widely implemented. Therefore, origin servers are encouraged to send explicit directives (e.g., Cache-Control: no-cache) if they wish to prevent caching. </t> </aside> </section> <section anchor="age.calculations" title="Calculating Age"> <t> The <xref target="field.age" format="none">Age</xref> header field is used to convey an estimated age of the response message when obtained from a cache. The Age field value is the cache's estimate of the number of seconds since the origin server generated or validated the response. The Age value is therefore the sum of the time that the response has been resident in each of the caches along the path from the origin server, plus the time it has been in transit along network paths. </t> <t> Age calculation uses the following data: </t> <dlnewline="false">newline="true"> <dt><em>age_value</em>"age_value" </dt> <dd> The term "age_value" denotes the value of the <xref target="field.age" format="none">Age</xref> header field (<xref target="field.age"/>), in a form appropriate for arithmetic operation; or 0, if not available. </dd> <dt><em>date_value</em>"date_value" </dt> <dd> The term "date_value" denotes the value of the Date header field, in a form appropriate for arithmetic operations. See <xref target="HTTP" section="6.6.1"/> for the definition of the Date headerfield,field and for requirements regarding responses without it. </dd> <dt><em>now</em>"now" </dt> <dd> The term "now" means the current value of this implementation's clock (<xref target="HTTP" section="5.6.7"/>). </dd> <dt><em>request_time</em>"request_time" </dt> <dd> The value of the clock at the time of the request that resulted in the stored response. </dd> <dt><em>response_time</em>"response_time" </dt> <dd> The value of the clock at the time the response was received. </dd> </dl> <t> A response's age can be calculated in two entirely independent ways: </t> <ol> <li>the "apparent_age": response_time minus date_value, if the implementation's clock is reasonably well synchronized to the origin server's clock. If the result is negative, the result is replaced by zero.</li> <li>the "corrected_age_value", if all of the caches along the response path implement HTTP/1.1 or greater. A cache <bcp14>MUST</bcp14> interpret this value relative to the time the request was initiated, not the time that the response was received.</li> </ol><artwork type="code"><![CDATA[<sourcecode type="pseudocode"><![CDATA[ apparent_age = max(0, response_time - date_value); response_delay = response_time - request_time; corrected_age_value = age_value + response_delay;]]></artwork>]]></sourcecode> <t> The corrected_age_value <bcp14>MAY</bcp14> be used as the corrected_initial_age. In circumstances where very old cache implementations that might not correctly insert <xref target="field.age" format="none">Age</xref> are present, corrected_initial_age can be calculated more conservatively as </t><artwork type="code"><![CDATA[<sourcecode type="pseudocode"><![CDATA[ corrected_initial_age = max(apparent_age, corrected_age_value);]]></artwork>]]></sourcecode> <t> The current_age of a stored response can then be calculated by adding the time (in seconds) since the stored response was last validated by the origin server to the corrected_initial_age. </t><artwork type="code"><![CDATA[<sourcecode type="pseudocode"><![CDATA[ resident_time = now - response_time; current_age = corrected_initial_age + resident_time;]]></artwork>]]></sourcecode> </section> <section anchor="serving.stale.responses" title="Serving Stale Responses"> <t> A "stale" response is one that either has explicit expiry information or is allowed to have heuristic expiry calculated, but is not fresh according to the calculations in <xref target="expiration.model"/>. </t> <t> A cache <bcp14>MUST NOT</bcp14> generate a stale response if it is prohibited by an explicit in-protocol directive (e.g., by a"no-cache" cacheno-cache response directive, a"must-revalidate" cache-response-directive,must-revalidate response directive, or an applicable"s-maxage"s-maxage or"proxy-revalidate" cache-response-directive;proxy-revalidate response directive; see <xref target="cache-response-directive"/>). </t> <t> A cache <bcp14>MUST NOT</bcp14> generate a stale response unless it is disconnected or doing so is explicitly permitted by the client or origin server (e.g., by the max-stale request directive in <xref target="cache-request-directive"/>,byextension directives such as those defined in <xref target="RFC5861"/>, orbyconfiguration in accordance with an out-of-band contract). </t> </section> </section> <section anchor="validation.model" title="Validation"> <t> When a cache has one or more stored responses for a requested URI, but cannot serve any of them (e.g., because they are not fresh, or one cannot be chosen; see <xref target="caching.negotiated.responses"/>), it can use the conditional request mechanism (<xref target="HTTP"section="13.1"/>)section="13"/>) in the forwarded request to give the next inbound server an opportunity to choose a valid stored response to use, updating the stored metadata in the process, or to replace the stored response(s) with a new response. This process is known as<em>validating</em>"validating" or<em>revalidating</em>"revalidating" the stored response. </t> <section anchor="validation.sent" title="Sending a Validation Request"> <iref item="validator"/> <t> When generating a conditional request for validation, a cache either starts witheithera request it is attempting tosatisfy,satisfy or—-- if it is initiating the request independently— it synthesises-- synthesizes a request using a stored response by copying the method, target URI, and request header fields identified by the Vary header field (<xref target="caching.negotiated.responses"/>). </t> <t> It then updates that request with one or more precondition header fields. These contain validator metadata sourced from a stored response(s) thathavehas the same URI. Typically, this will include onlythosethe storedresponses(s)response(s) thathavehas the same cache key, although a cache is allowed to validate a response that it cannot choose with the request header fields it is sending (see <xref target="caching.negotiated.responses"/>). </t> <t> The precondition header fields are then compared by recipients to determine whether any stored response is equivalent to a current representation of the resource. </t> <t> One such validator is the timestamp given in a Last-Modified header field (<xref target="HTTP" section="8.8.2"/>), which can be used in an If-Modified-Since header field for response validation, or in an If-Unmodified-Since or If-Range header field for representation selection (i.e., the client is referring specifically to a previously obtained representation with that timestamp). </t> <t> Another validator is theentity-tagentity tag given in an ETag field (<xref target="HTTP" section="8.8.3"/>). One or moreentity-tags,entity tags, indicating one or more stored responses, can be used in an If-None-Match header field for response validation, or in an If-Match or If-Range header field for representation selection (i.e., the client is referring specifically to one or more previously obtained representations with the listedentity-tags).entity tags). </t> <t> When generating a conditional request for validation, a cache: </t> <ul> <li> <bcp14>MUST</bcp14> send the relevantentity-tagsentity tags (using If-Match, If-None-Match, or If-Range) if theentity-tagsentity tags were provided in the stored response(s) being validated.</li> <li> <bcp14>SHOULD</bcp14> send the Last-Modified value (using If-Modified-Since) if the request is not for a subrange, a single stored response is being validated, and that response contains a Last-Modified value.</li> <li> <bcp14>MAY</bcp14> send the Last-Modified value (using If-Unmodified-Since or If-Range) if the request is for a subrange, a single stored response is being validated, and that response contains only a Last-Modified value (not anentity-tag).</li>entity tag).</li> </ul> <t> In most cases, both validators are generated in cache validation requests, even whenentity-tagsentity tags are clearly superior, to allow old intermediaries that do not understandentity-tagentity tag preconditions to respond appropriately. </t> </section> <section anchor="validation.received" title="Handling a Received Validation Request"> <t> Each client in the request chain may have its own cache, so it is common for a cache at an intermediary to receive conditional requests from other (outbound) caches. Likewise, some user agents make use of conditional requests to limit data transfers to recently modified representations or to complete the transfer of a partially retrieved representation. </t> <t> If a cache receives a request that can be satisfied by reusing a stored 200 (OK) or 206 (Partial Content) response, as per <xref target="constructing.responses.from.caches"/>, the cache <bcp14>SHOULD</bcp14> evaluate any applicable conditional header field preconditions received in that request with respect to the corresponding validators contained within the stored response. </t> <t> A cache <bcp14>MUST NOT</bcp14> evaluate conditional header fields that only apply to an origin server, occur in a request with semantics that cannot be satisfied with a cached response, or occur in a request with a target resource for which it has no stored responses; such preconditions are likely intended for some other (inbound) server. </t> <t> The proper evaluation of conditional requests by a cache depends on the received precondition header fields and their precedence. In summary, the If-Match and If-Unmodified-Since conditional header fields are not applicable to a cache, and If-None-Match takes precedence over If-Modified-Since. See <xref target="HTTP" section="13.2.2"/> for a complete specification of precondition precedence. </t> <t> A request containing an If-None-Match header field (<xref target="HTTP" section="13.1.2"/>) indicates that the client wants to validate one or more of its own stored responses in comparison to the stored response chosen by the cache (as per <xref target="constructing.responses.from.caches"/>). </t> <t> If an If-None-Match header field is not present, a request containing an If-Modified-Since header field (<xref target="HTTP" section="13.1.3"/>) indicates that the client wants to validate one or more of its own stored responses by modification date. </t> <t> If a request contains an If-Modified-Since header field and the Last-Modified header field is not present in a stored response, a cache <bcp14>SHOULD</bcp14> use the stored response's Date field value (or, if no Date field is present, the time that the stored response was received) to evaluate the conditional. </t> <t> A cache that implements partial responses to range requests, as defined in <xref target="HTTP" section="14.2"/>, also needs to evaluate a received If-Range header field (<xref target="HTTP" section="13.1.5"/>) with respect to the cache's chosen response. </t> <t> When a cache decides to forward a request to revalidate its own stored responses for a request that contains an If-None-Match list ofentity-tags,entity tags, the cache <bcp14>MAY</bcp14> combine the received list with a list ofentity-tagsentity tags from its own stored set of responses (fresh or stale) and send the union of the two lists as a replacement If-None-Match header field value in the forwarded request. If a stored response contains only partial content, the cache <bcp14>MUST NOT</bcp14> include itsentity-tagentity tag in the union unless the request is for a range that would be fully satisfied by that partial stored response. If the response to the forwarded request is 304 (Not Modified) and has an ETag field value with anentity-tagentity tag that is not in the client's list, the cache <bcp14>MUST</bcp14> generate a 200 (OK) response for the client by reusing its corresponding stored response, as updated by the 304 response metadata (<xref target="freshening.responses"/>). </t> </section> <section anchor="validation.response" title="Handling a Validation Response"> <t> Cache handling of a response to a conditional request depends upon its status code: </t> <ul> <li> A 304 (Not Modified) response status code indicates that the stored response can be updated and reused; see <xref target="freshening.responses"/>. </li> <li> A full response (i.e., one containing content) indicates that none of the stored responses nominated in the conditional requestisare suitable. Instead, the cache <bcp14>MUST</bcp14> use the full response to satisfy the request. The cache <bcp14>MAY</bcp14> store such a full response, subject to its constraints (see <xref target="response.cacheability"/>). </li> <li> However, if a cache receives a 5xx (Server Error) response while attempting to validate a response, it can either forward this response to the requestingclient,client or act as if the server failed to respond. In the latter case, the cache can send a previously stored response, subject to its constraints on doing so (see <xref target="serving.stale.responses"/>), or retry the validation request. </li> </ul> </section> <section anchor="freshening.responses" title="Freshening Stored Responses upon Validation"> <t> When a cache receives a 304 (Not Modified) response, it needs to identify stored responses that are suitable for updating with the new information provided, and then do so. </t> <t> The initial set of stored responses to update are those that could have been chosen for that request—-- i.e., those that meet the requirements in <xref target="constructing.responses.from.caches"/>, except the last requirement to be fresh, able to be servedstalestale, or just validated. </t> <t> Then, that initial set of storedresponse(s)responses is further filtered by the first match of: </t> <ul> <li> If the new response contains one or more<em>strong validators</em>"strong validators" (see <xref target="HTTP" section="8.8.1"/>), then each of those strong validatorsidentifyidentifies a selected representation for update. All the stored responses in the initial set with one of those same strong validators are identified for update. If none of the initial setcontaincontains at least one of the same strong validators, then the cache <bcp14>MUST NOT</bcp14> use the new response to update any stored responses. </li> <li> If the new response contains no strong validators but does contain one or more<em>weak validators</em>,"weak validators", and those validators correspond to one of the initial set's stored responses, then the most recent of those matching stored responses is identified for update. </li> <li> If the new response does not include any form of validator (such as where a client generates an If-Modified-Since request from a source other than the Last-Modified response header field), and there is only one stored response in the initial set, and that stored response also lacks a validator, then that stored response is identified for update. </li> </ul> <t> For each stored response identified, the cache <bcp14>MUST</bcp14> update its header fields with the header fields provided in the 304 (Not Modified) response, as per <xref target="update"/>. </t> </section> <section anchor="head.effects" title="Freshening Responses with HEAD"> <t> A response to the HEAD method is identical to what an equivalent request made with a GET would have been, without sending the content. This property of HEAD responses can be used to invalidate or update a cached GET response if the more efficient conditional GET request mechanism is not available (due to no validators being present in the stored response) or if transmission of the content is not desired even if it has changed. </t> <t> When a cache makes an inbound HEAD request for a target URI and receives a 200 (OK) response, the cache <bcp14>SHOULD</bcp14> update or invalidate each of its stored GET responses that could have been chosen for that request (see <xref target="caching.negotiated.responses"/>). </t> <t> For each of the stored responses that could have been chosen, if the stored response and HEAD response have matching values for any received validator fields (ETag and Last-Modified) and, if the HEAD response has a Content-Length header field, the value of Content-Length matches that of the stored response, the cache <bcp14>SHOULD</bcp14> update the stored response as described below; otherwise, the cache <bcp14>SHOULD</bcp14> consider the stored response to be stale. </t> <t> If a cache updates a stored response with the metadata provided in a HEAD response, the cache <bcp14>MUST</bcp14> use the header fields provided in the HEAD response to update the stored response (see <xref target="update"/>). </t> </section> </section> <section anchor="invalidation" title="Invalidating Stored Responses"> <t> Because unsafe request methods (<xref target="HTTP" section="9.2.1"/>) such as PUT,POSTPOST, or DELETE have the potential for changing state on the origin server, intervening caches are required to invalidate stored responses to keep their contents up to date. </t> <t> A cache <bcp14>MUST</bcp14> invalidate the target URI (<xref target="HTTP" section="7.1"/>) when it receives a non-error status code in response to an unsafe request method (including methods whose safety is unknown). </t> <t> A cache <bcp14>MAY</bcp14> invalidate other URIs when it receives a non-error status code in response to an unsafe request method (including methods whose safety is unknown). In particular, the URI(s) in the Location and Content-Location response header fields (if present) are candidates for invalidation; other URIs might be discovered through mechanisms not specified in this document. However, a cache <bcp14>MUST NOT</bcp14> trigger an invalidation under these conditions if the origin (<xref target="HTTP" section="4.3.1"/>) of the URI to be invalidated differs from that of the target URI (<xref target="HTTP" section="7.1"/>). This helps prevent denial-of-service attacks. </t> <t><em>Invalidate</em>"Invalidate" means that the cache will either remove all stored responses whose target URI matches the givenURI,URI orwillmark them as "invalid" and in need of a mandatory validation before they can be sent in response to a subsequent request. </t> <t> A "non-error response" is one with a 2xx (Successful) or 3xx (Redirection) status code. </t> <t> Note that this does not guarantee that all appropriate responses are invalidated globally; a state-changing request would only invalidate responses in the caches it travels through. </t> </section> </section> <section anchor="header.field.definitions" title="Field Definitions"> <t> This section defines the syntax and semantics of HTTP fields related to caching. </t> <section anchor="field.age" title="Age"> <iref primary="true" item="Fields" subitem="Age"/> <iref primary="true" item="Header Fields" subitem="Age"/> <iref primary="true" item="Fields" subitem="Age"/> <iref primary="true" item="Header Fields" subitem="Age"/> <iref item="Age header field" primary="true"/> <t> The "Age" response header field conveys the sender's estimate of the time since the response was generated or successfully validated at the origin server. Age values are calculated as specified in <xref target="age.calculations"/>. </t> <iref primary="true" item="Grammar" subitem="Age"/> <sourcecodetype="abnf7230"><![CDATA[type="abnf9110"><![CDATA[ Age = delta-seconds ]]></sourcecode> <t> The Age field value is a non-negative integer, representing time in seconds (see <xref target="delta-seconds"/>). </t> <t> Although it is defined as a singleton header field, a cache encountering a message with a list-based Age field value <bcp14>SHOULD</bcp14> use the first member of the field value, discarding subsequent ones. </t> <t> If the field value (after discarding additional members, as per above) is invalid (e.g., it contains something other than a non-negative integer), a cache <bcp14>SHOULD</bcp14> ignore the field. </t> <t> The presence of an Age header field implies that the response was not generated or validated by the origin server for this request. However, lack of an Age header field does not imply the origin was contacted. </t> </section> <section anchor="field.cache-control" title="Cache-Control"> <iref primary="true" item="Fields" subitem="Cache-Control"/> <iref primary="true" item="Header Fields" subitem="Cache-Control"/> <iref item="Cache-Control header field" primary="true"/> <t> The "Cache-Control" header field is used to list directives for caches along the request/response chain.Such cacheCache directives areunidirectionalunidirectional, in that the presence of a directive in a request does not imply that the same directive is presentin the response,orto be repeatedcopied init.the response. </t> <t> See <xref target="cache.control.extensions"/> for information about how Cache-Control directives defined elsewhere are handled. </t> <t> A proxy, whether or not it implements a cache, <bcp14>MUST</bcp14> pass cache directives through in forwarded messages, regardless of their significance to that application, since the directives might apply to all recipients along the request/response chain. It is not possible to target a directive to a specific cache. </t> <t> Cache directives are identified by a token, to be compared case-insensitively, and have an optional argument that can use both token and quoted-string syntax. For the directives defined below that define arguments, recipients ought to accept both forms, even if a specific form is required for generation. </t> <iref primary="true" item="Grammar" subitem="Cache-Control"/> <iref primary="true" item="Grammar" subitem="cache-directive"/> <sourcecodetype="abnf7230"><![CDATA[type="abnf9110"><![CDATA[ Cache-Control = #cache-directive cache-directive = token [ "=" ( token / quoted-string ) ] ]]></sourcecode> <t> For the cache directives defined below, no argument is defined (nor allowed) unless stated otherwise. </t> <section anchor="cache-request-directive" title="RequestCache-ControlDirectives"> <t> This section defines cache request directives. They are advisory; caches <bcp14>MAY</bcp14> implement them, but are not required to. </t> <section anchor="cache-request-directive.max-age" title="max-age"> <iref item="max-age (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li> <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)</li> </ul> <t> The"max-age"max-age request directive indicates that the client prefers a response whose age is less than or equal to the specified number of seconds. Unless the max-stale request directive is also present, the client does not wish to receive a stale response. </t> <t> This directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age="5"'. A sender <bcp14>MUST NOT</bcp14> generate the quoted-string form. </t> </section> <section anchor="cache-request-directive.max-stale" title="max-stale"> <iref item="max-stale (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li> <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)</li> </ul> <t> The"max-stale"max-stale request directive indicates that the client will accept a response that has exceeded its freshness lifetime. If a value is present, then the client is willing to accept a response that has exceeded its freshness lifetime by no more than the specified number of seconds. If no value is assigned to max-stale, then the client will accept a stale response of any age. </t> <t> This directive uses the token form of the argument syntax: e.g., 'max-stale=10' not 'max-stale="10"'. A sender <bcp14>MUST NOT</bcp14> generate the quoted-string form. </t> </section> <section anchor="cache-request-directive.min-fresh" title="min-fresh"> <iref item="min-fresh (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li> <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)</li> </ul> <t> The"min-fresh"min-fresh request directive indicates that the client prefers a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds. </t> <t> This directive uses the token form of the argument syntax: e.g., 'min-fresh=20' not 'min-fresh="20"'. A sender <bcp14>MUST NOT</bcp14> generate the quoted-string form. </t> </section> <section anchor="cache-request-directive.no-cache" title="no-cache"> <iref item="no-cache (cache directive)" primary="true"/> <t> The"no-cache"no-cache request directive indicates that the client prefers a stored response not be used to satisfy the request without successful validation on the origin server. </t> </section> <section anchor="cache-request-directive.no-store" title="no-store"> <iref item="no-store (cache directive)" primary="true"/> <t> The"no-store"no-store request directive indicates that a cache <bcp14>MUST NOT</bcp14> store any part of either this request or any response to it. This directive applies to both private and shared caches. "MUST NOT store" in this context means that the cache <bcp14>MUST NOT</bcp14> intentionally store the information in non-volatilestorage,storage and <bcp14>MUST</bcp14> make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it. </t> <t> This directive is<em>not</em>not a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping. </t> <t> Note that if a request containing this directive is satisfied from a cache, the no-store request directive does not apply to the already stored response. </t> </section> <section anchor="cache-request-directive.no-transform" title="no-transform"> <iref item="no-transform (cache directive)" primary="true"/> <t> The"no-transform"no-transform request directive indicates that the client is asking for intermediaries to avoid transforming the content, as defined in <xref target="HTTP" section="7.7"/>. </t> </section> <section anchor="cache-request-directive.only-if-cached" title="only-if-cached"> <iref item="only-if-cached (cache directive)" primary="true"/> <t> The"only-if-cached"only-if-cached request directive indicates that the client only wishes to obtain a stored response. Caches that honor this request directive <bcp14>SHOULD</bcp14>, upon receiving it,eitherrespondusingwith either a stored response consistent with the other constraints of therequest,request orrespond witha 504 (Gateway Timeout) status code. </t> </section> </section> <section anchor="cache-response-directive" title="ResponseCache-ControlDirectives"> <t> This section defines cache response directives. A cache <bcp14>MUST</bcp14> obey the Cache-Control directives defined in this section. </t> <section anchor="cache-response-directive.max-age" title="max-age"> <iref item="max-age (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li> <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)</li> </ul> <t> The"max-age"max-age response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds. </t> <t> This directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age="5"'. A sender <bcp14>MUST NOT</bcp14> generate the quoted-string form. </t> </section> <section anchor="cache-response-directive.must-revalidate" title="must-revalidate"> <iref item="must-revalidate (cache directive)" primary="true"/> <t> The"must-revalidate"must-revalidate response directive indicates that once the response has become stale, a cache <bcp14>MUST NOT</bcp14> reuse that response to satisfy another request until it has been successfully validated by the origin, as defined by <xref target="validation.model"/>. </t> <t> The must-revalidate directive is necessary to support reliable operation for certain protocol features. In allcircumstancescircumstances, a cache <bcp14>MUST NOT</bcp14> ignore the must-revalidate directive; in particular, if a cache is disconnected, the cache <bcp14>MUST</bcp14> generate an error response rather than reuse the stale response. The generated status code <bcp14>SHOULD</bcp14> be 504 (Gateway Timeout) unless another error status code is more applicable. </t> <t> The must-revalidate directive ought to be used by servers if and only if failure to validate a request could cause incorrect operation, such as a silently unexecuted financial transaction. </t> <t> The must-revalidate directive also permits a shared cache to reuse a response to a request containing an Authorization header field (<xref target="HTTP" section="11.6.2"/>), subject to the above requirement on revalidation (<xref target="caching.authenticated.responses"/>). </t> </section> <section anchor="cache-response-directive.must-understand" title="must-understand"> <iref item="must-understand (cache directive)" primary="true"/> <t> The"must-understand"must-understand response directive limits caching of the response to a cache that understands and conforms to the requirements for that response's status code. </t> <t>Responses containing "must-understand"A response that contains the must-understand directive <bcp14>SHOULD</bcp14> also contain the"no-store" directive; cachesno-store directive. When a cache thatimplement "must-understand" <bcp14>SHOULD</bcp14> ignoreimplements the"no-store"must-understand directivein responses that contain both directives andreceives astatus coderesponse that includes it, the cache <bcp14>SHOULD</bcp14> ignore the no-store directive if it understands andconforms to any relatedimplements the status code's caching requirements. </t> </section> <section anchor="cache-response-directive.no-cache" title="no-cache"> <iref item="no-cache (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li>#<xref target="imported.rules" format="none">field-name</xref> </li> </ul> <t> The"no-cache"no-cache response directive, in its unqualified form (without an argument), indicates that the response <bcp14>MUST NOT</bcp14> be used to satisfy any other request without forwarding it for validation and receiving a successful response; see <xref target="validation.model"/>. </t> <t> This allows an origin server to prevent a cache from using the response to satisfy a request without contacting it, even by caches that have been configured to send stale responses. </t> <t> The qualified form of the no-cache response directive, with an argument that lists one or more field names, indicates that a cache <bcp14>MAY</bcp14> use the response to satisfy a subsequent request, subject to any other restrictions on caching, if the listed header fields are excluded from the subsequent response or the subsequent response has been successfully revalidated with the origin server (updating or removing those fields). This allows an origin server to prevent there-usereuse of certain header fields in a response, while still allowing caching of the rest of the response. </t> <t> The field names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive. </t> <t> This directive uses the quoted-string form of the argument syntax. A sender <bcp14>SHOULD NOT</bcp14> generate the token form (even if quoting appears not to be needed for single-entry lists). </t> <aside> <t> <strong>Note:</strong> The qualified form of the directive is often handled by caches as if an unqualified no-cache directive was received;i.e.,that is, the special handling for the qualified form is not widely implemented. </t> </aside> </section> <section anchor="cache-response-directive.no-store" title="no-store"> <iref item="no-store (cache directive)" primary="true"/> <t> The"no-store"no-store response directive indicates that a cache <bcp14>MUST NOT</bcp14> store any part of either the immediate request orresponse,the response and <bcp14>MUST NOT</bcp14> use the response to satisfy any other request. </t> <t> This directive applies to both private and shared caches. "MUST NOT store" in this context means that the cache <bcp14>MUST NOT</bcp14> intentionally store the information in non-volatilestorage,storage and <bcp14>MUST</bcp14> make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it. </t> <t> This directive is<em>not</em>not a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping. </t> <t> Note that the"must-understand"must-understand cache directive overrides"no-store"no-store in certain circumstances; see <xref target="cache-response-directive.must-understand"/>. </t> </section> <section anchor="cache-response-directive.no-transform" title="no-transform"> <iref item="no-transform (cache directive)" primary="true"/> <t> The"no-transform"no-transform response directive indicates that an intermediary (regardless of whether it implements a cache) <bcp14>MUST NOT</bcp14> transform the content, as defined in <xref target="HTTP" section="7.7"/>. </t> </section> <section anchor="cache-response-directive.private" title="private"> <iref item="private (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li>#<xref target="imported.rules" format="none">field-name</xref> </li> </ul> <t> The unqualified"private"private response directive indicates that a shared cache <bcp14>MUST NOT</bcp14> store the response (i.e., the response is intended for a single user). It also indicates that a private cache <bcp14>MAY</bcp14> store the response, subject to the constraints defined in <xref target="response.cacheability"/>, even if the response would not otherwise be heuristically cacheable by a private cache. </t> <t> If a qualified private response directive is present, with an argument that lists one or more field names, then only the listed header fields are limited to a single user: a shared cache <bcp14>MUST NOT</bcp14> store the listed header fields if they are present in the originalresponse,response but <bcp14>MAY</bcp14> store the remainder of the response message without those header fields, subject the constraints defined in <xref target="response.cacheability"/>. </t> <t> The field names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive. </t> <t> This directive uses the quoted-string form of the argument syntax. A sender <bcp14>SHOULD NOT</bcp14> generate the token form (even if quoting appears not to be needed for single-entry lists). </t> <aside> <t> <strong>Note:</strong> This usage of the word "private" only controls where the response can be stored; it cannot ensure the privacy of the message content. Also, the qualified form of the directive is often handled by caches as if an unqualified private directive was received;i.e.,that is, the special handling for the qualified form is not widely implemented. </t> </aside> </section> <section anchor="cache-response-directive.proxy-revalidate" title="proxy-revalidate"> <iref item="proxy-revalidate (cache directive)" primary="true"/> <t> The"proxy-revalidate"proxy-revalidate response directive indicates that once the response has become stale, a shared cache <bcp14>MUST NOT</bcp14> reuse that response to satisfy another request until it has been successfully validated by the origin, as defined by <xref target="validation.model"/>. This is analogous to must-revalidate (<xref target="cache-response-directive.must-revalidate"/>), except that proxy-revalidate does not apply to private caches. </t> <t> Note that"proxy-revalidate"proxy-revalidate on its own does not imply that a response is cacheable. For example, it might be combined with the public directive (<xref target="cache-response-directive.public"/>), allowing the response to be cached while requiring only a shared cache to revalidate when stale. </t> </section> <section anchor="cache-response-directive.public" title="public"> <iref item="public (cache directive)" primary="true"/> <t> The"public"public response directive indicates that a cache <bcp14>MAY</bcp14> store the response even if it would otherwise be prohibited, subject to the constraints defined in <xref target="response.cacheability"/>. In other words, public explicitly marks the response as cacheable. For example, public permits a shared cache to reuse a response to a request containing an Authorization header field (<xref target="caching.authenticated.responses"/>). </t> <t> Note that it is unnecessary to add the public directive to a response that is already cacheable according to <xref target="response.cacheability"/>. </t> <t> If a response with the public directive has no explicit freshness information, it is heuristically cacheable (<xref target="heuristic.freshness"/>). </t> </section> <section anchor="cache-response-directive.s-maxage" title="s-maxage"> <iref item="s-maxage (cache directive)" primary="true"/> <t> Argument syntax: </t> <ul empty="true"> <li> <xref target="delta-seconds" format="none">delta-seconds</xref> (see <xref target="delta-seconds"/>)</li> </ul> <t> The"s-maxage"s-maxage response directive indicates that, for a shared cache, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the <xref target="field.expires" format="none">Expires</xref> header field. </t> <t> The s-maxage directive incorporates theproxy-revalidatesemantics of the proxy&nbhy;revalidate response directive (<xref target="cache-response-directive.proxy-revalidate"/>)response directive's semanticsfor a shared cache. A shared cache <bcp14>MUST NOT</bcp14> reuse a stale response with s-maxage to satisfy another request until it has been successfully validated by the origin, as defined by <xref target="validation.model"/>. This directive also permits a shared cache to reuse a response to a request containing an Authorization header field, subject to the above requirements on maximum age and revalidation (<xref target="caching.authenticated.responses"/>). </t> <t> This directive uses the token form of the argument syntax: e.g., 's-maxage=10' not 's-maxage="10"'. A sender <bcp14>MUST NOT</bcp14> generate the quoted-string form. </t> </section> </section> <section anchor="cache.control.extensions"title="Cache Control Extensions">title="Extension Directives"> <t> The Cache-Control header field can be extended through the use of one or more extension cache directives. A cache <bcp14>MUST</bcp14> ignore unrecognized cache directives. </t> <t> Informational extensions (those that do not require a change in cache behavior) can be added without changing the semantics of other directives. </t> <t> Behavioral extensions are designed to work by acting as modifiers to the existing base of cache directives. Both the new directive and the old directive are supplied, such that applications that do not understand the new directive will default to the behavior specified by the old directive, and those that understand the new directive will recognize it as modifying the requirements associated with the old directive. In this way, extensions to the existingcache-controlcache directives can be made without breaking deployed caches. </t> <t> For example, consider a hypothetical new response directive called "community" that acts as a modifier to the private directive: in addition to private caches,anyonly a cache that is sharedonlyby members of the named community is allowed to cache the response. An origin server wishing to allow the UCI community to use an otherwise private response in their shared cache(s) could do so by including </t> <sourcecode type="http-message"><![CDATA[Cache-Control: private, community="UCI" ]]></sourcecode> <t> A cache that recognizes such a community cache directive could broaden its behavior in accordance with that extension. A cache that does not recognize the community cache directive would ignore it and adhere to the private directive. </t> <t> New extension directives ought to consider defining: </t> <ul> <li>What it means for a directive to be specified multiple times,</li> <li>When the directive does not take an argument, what it means when an argument is present,</li> <li>When the directive requires an argument, what it means when it ismissing,</li>missing, and</li> <li>Whether the directive is specific to requests, specific to responses, or able to be used in either.</li> </ul> </section> <section anchor="cache.directive.registry" title="Cache Directive Registry"> <t> The "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" defines the namespace for the cache directives. It has been created and is now maintained at <eref target="https://www.iana.org/assignments/http-cache-directives" brackets="angle"/>. </t> <t> A registration <bcp14>MUST</bcp14> include the following fields: </t> <ul> <li>Cache Directive Name</li> <li>Pointer to specification text</li> </ul> <t> Values to be added to this namespace require IETF Review (see <xref target="RFC8126" sectionFormat="comma" section="4.8"/>). </t> </section> </section> <section anchor="field.expires" title="Expires"> <iref primary="true" item="Fields" subitem="Expires"/> <iref primary="true" item="Header Fields" subitem="Expires"/> <iref primary="true" item="Fields" subitem="Expires"/> <iref primary="true" item="Header Fields" subitem="Expires"/> <iref item="Expires header field" primary="true"/> <t> The "Expires" response header field gives the date/time after which the response is considered stale. See <xref target="expiration.model"/> for further discussion of the freshness model. </t> <t> The presence of an Expires header field does not imply that the original resource will change or cease to exist at, before, or after that time. </t> <t> The Expires field value is an HTTP-date timestamp, as defined in <xref target="HTTP" section="5.6.7"/>. See also <xref target="expiration.model"/> for parsing requirements specific to caches. </t> <iref primary="true" item="Grammar" subitem="Expires"/> <sourcecodetype="abnf7230"><![CDATA[type="abnf9110"><![CDATA[ Expires = HTTP-date ]]></sourcecode> <t> For example </t> <sourcecode type="http-message"><![CDATA[Expires: Thu, 01 Dec 1994 16:00:00 GMT ]]></sourcecode> <t> A cache recipient <bcp14>MUST</bcp14> interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). </t> <t> If a response includes a <xref target="field.cache-control" format="none">Cache-Control</xref> header field with the max-age directive (<xref target="cache-response-directive.max-age"/>), a recipient <bcp14>MUST</bcp14> ignore the Expires header field. Likewise, if a response includes the s-maxage directive (<xref target="cache-response-directive.s-maxage"/>), a shared cache recipient <bcp14>MUST</bcp14> ignore the Expires header field. In both these cases, the value in Expires is only intended for recipients that have not yet implemented the Cache-Control header field. </t> <t> An origin server without a clock (<xref target="HTTP" section="5.6.7"/>) <bcp14>MUST NOT</bcp14> generate an Expires header field unless its value represents a fixed time in the past (always expired) or its value has been associated with the resource by a system with a clock. </t> <t> Historically, HTTP required the Expires field value to be no more than a year in the future. While longer freshness lifetimes are no longer prohibited, extremely large values have been demonstrated to cause problems (e.g., clock overflows due to use of 32-bit integers for time values), and many caches will evict a response far sooner than that. </t> </section> <section anchor="field.pragma" title="Pragma"> <iref primary="true" item="Fields" subitem="Pragma"/> <iref primary="true" item="Header Fields" subitem="Pragma"/> <iref primary="true" item="Fields" subitem="Pragma"/> <iref primary="true" item="Header Fields" subitem="Pragma"/> <iref item="Pragma header field" primary="true"/> <t> The "Pragma" request header field was defined for HTTP/1.0 caches, so that clients could specify a "no-cache" request (as <xref target="field.cache-control" format="none">Cache-Control</xref> was not defined until HTTP/1.1). </t> <t> However, support for Cache-Control is now widespread. As a result, this specification deprecates Pragma. </t> <aside> <t> <strong>Note:</strong> Because the meaning of "Pragma: no-cache" in responses was never specified, it does not provide a reliable replacement for "Cache-Control: no-cache" in them. </t> </aside> </section> <section anchor="field.warning" title="Warning"> <iref primary="true" item="Fields" subitem="Warning"/> <iref primary="true" item="Header Fields" subitem="Warning"/> <iref item="Warning header field" primary="true"/> <t> The "Warning" header field was used to carry additional information about the status or transformation of a message that might not be reflected in the status code. This specification obsoletes it, as it is not widely generated or surfaced to users. The information it carried can be gleaned from examining other header fields, such as <xref target="field.age" format="none">Age</xref>. </t> </section> </section> <section anchor="history.lists" title="Relationship to Applications and Other Caches"> <t> Applications using HTTP often specify additional forms of caching. For example, Web browsers often have history mechanisms such as "Back" buttons that can be used to redisplay a representation retrieved earlier in a session. </t> <t> Likewise, some Web browsers implement caching of images and other assets within a page view; they may or may not honor HTTP caching semantics. </t> <t> The requirements in this specification do not necessarily apply to how applications use data after it is retrieved from an HTTP cache. For example, a history mechanism can display a previous representation even if it has expired, and an application can use cached data in other ways beyond its freshness lifetime. </t> <t> This specification does not prohibit the application from taking HTTP caching into account; for example, a history mechanism might tell the user that a view is stale, or it might honor cache directives (e.g., Cache-Control: no-store). </t> <t> However, when an application caches data and does not make this apparent to or easily controllable by the user, it is strongly encouraged to define its operation with respect to HTTP cachedirectives,directives so as not to surprise authors who expect caching semantics to behonoured.honored. For example, while it might be reasonable to define an application cache "above" HTTP that allows a response containing Cache-Control: no-store to be reused for requests that are directly related to the request that fetched it (such as those created during the same page load), it would likely be surprising and confusing to users and authors if it were allowed to be reused for requests unrelated in any way to the one from which it was obtained. </t> </section> <section anchor="security.considerations" title="Security Considerations"> <t> This section is meant to inform developers, information providers, and users of known security concerns specific to HTTP caching. More general security considerations are addressed in "HTTP/1.1" (<xref target="HTTP11" section="11"/>) and "HTTP Semantics" (<xref target="HTTP" section="17"/>). </t> <t> Caches expose an additional attacksurface, sincesurface because the contents of the cache represent an attractive target for malicious exploitation.BecauseSince cache contents persist after an HTTP request is complete, an attack on the cache can reveal information long after a user believes that the information has been removed from the network. Therefore, cache contents need to be protected as sensitive information. </t> <t> In particular, because private caches are restricted to a single user, they can be used to reconstruct a user's activity. As a result, it is important for user agents to allow end users to controlthem;them, for example, by allowing stored responses to be removed for some or all origin servers. </t> <section anchor="cache.poisoning" title="Cache Poisoning"> <t> Storingamaliciouspayloadcontent in a cache can extend the reach of an attacker to affect multiple users. Such "cache poisoning" attacks happen when an attacker uses implementation flaws, elevated privileges, or other techniques to insert a response into a cache. This is especially effective when shared caches are used to distribute malicious content to many clients. </t> <t> One common attack vector for cache poisoning is to exploit differences in message parsing on proxies and in user agents; see <xref target="HTTP11" section="6.3"/> for the relevant requirements regarding HTTP/1.1. </t> </section> <section anchor="security.timing" title="Timing Attacks"> <t> Because one of the primary uses of a cache is tooptimiseoptimize performance, its use can "leak" information aboutwhatwhich resources have been previously requested. </t> <t> For example, if a user visits a site and their browser caches some of itsresponses,responses and then navigates to a second site, that site can attempt to load responses it knowsexistsexist on the first site. If they load quickly, it can be assumed that the user has visited that site, or even a specific page on it. </t> <t> Such "timing attacks" can be mitigated by adding more information to the cache key, such as the identity of the referring site (to prevent the attack described above). This is sometimes called "doublekeying."keying". </t> </section> <section anchor="caching.of.sensitive.information" title="Caching of Sensitive Information"> <t> Implementation and deployment flaws(as well as(often led to by the misunderstanding of cache operation) might lead to the caching of sensitive information (e.g., authentication credentials) that is thought to be private, exposing it to unauthorized parties. </t> <t> Note that the Set-Cookie response header field <xref target="COOKIE"/> does not inhibit caching; a cacheable response with a Set-Cookie header field can be (and often is) used to satisfy subsequent requests to caches. Serverswhothat wish to control caching of these responses are encouraged to emit appropriate Cache-Control response header fields. </t> </section> </section> <section anchor="iana.considerations" title="IANA Considerations"> <t> The change controller for the following registrations is: "IETF (iesg@ietf.org) - Internet Engineering Task Force". </t> <section anchor="field.name.registration" title="Field Name Registration"> <t>First, introduceIANA has updated thenew"Hypertext Transfer Protocol (HTTP) Field Name Registry" at <eref target="https://www.iana.org/assignments/http-fields"brackets="angle"/>brackets="angle"/>, as described in <xref target="HTTP"section="18.4"/>. </t> <t> Then, please update the registrysection="18.4"/>, with the field names listed in the table below: </t><!--AUTOGENERATED FROM extract-header-defs.xslt, do not edit manually--><table align="left" anchor="iana.header.registration.table"> <thead> <tr> <th>Field Name</th> <th>Status</th><th>Ref.</th><th>Section</th> <th>Comments</th> </tr> </thead> <tbody> <tr> <td>Age</td><td>standard</td><td>permanent</td> <td> <xref target="field.age" format="counter"/> </td> <td/> </tr> <tr> <td>Cache-Control</td><td>standard</td><td>permanent</td> <td> <xref target="field.cache-control" format="counter"/> </td> <td/> </tr> <tr> <td>Expires</td><td>standard</td><td>permanent</td> <td> <xref target="field.expires" format="counter"/> </td> <td/> </tr> <tr> <td>Pragma</td><td>standard</td><td>deprecated</td> <td> <xref target="field.pragma" format="counter"/> </td> <td/> </tr> <tr> <td>Warning</td> <td>obsoleted</td> <td> <xref target="field.warning" format="counter"/> </td> <td/> </tr> </tbody> </table><!--(END)--></section> <section anchor="cache.directive.registration" title="Cache Directive Registration"> <t>Please updateIANA has updated the "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" at <eref target="https://www.iana.org/assignments/http-cache-directives" brackets="angle"/> with the registration procedureofper <xref target="cache.directive.registry"/> and the cache directive names summarized in the table below. </t><!--AUTOGENERATED FROM extract-cache-directives-defs.xslt, do not edit manually--><table align="left" anchor="iana.cache.directive.registration.table"> <thead> <tr> <th>Cache Directive</th><th>Reference</th><th>Section</th> </tr> </thead> <tbody> <tr> <td>max-age</td> <td> <xreftarget="cache-request-directive.max-age"/>,target="cache-request-directive.max-age" format="counter"/>, <xreftarget="cache-response-directive.max-age"/>target="cache-response-directive.max-age" format="counter"/> </td> </tr> <tr> <td>max-stale</td> <td> <xreftarget="cache-request-directive.max-stale"/>target="cache-request-directive.max-stale" format="counter"/> </td> </tr> <tr> <td>min-fresh</td> <td> <xreftarget="cache-request-directive.min-fresh"/>target="cache-request-directive.min-fresh" format="counter"/> </td> </tr> <tr> <td>must-revalidate</td> <td> <xreftarget="cache-response-directive.must-revalidate"/>target="cache-response-directive.must-revalidate" format="counter"/> </td> </tr> <tr> <td>must-understand</td> <td> <xreftarget="cache-response-directive.must-understand"/>target="cache-response-directive.must-understand" format="counter"/> </td> </tr> <tr> <td>no-cache</td> <td> <xreftarget="cache-request-directive.no-cache"/>,target="cache-request-directive.no-cache" format="counter"/>, <xreftarget="cache-response-directive.no-cache"/>target="cache-response-directive.no-cache" format="counter"/> </td> </tr> <tr> <td>no-store</td> <td> <xreftarget="cache-request-directive.no-store"/>,target="cache-request-directive.no-store" format="counter"/>, <xreftarget="cache-response-directive.no-store"/>target="cache-response-directive.no-store" format="counter"/> </td> </tr> <tr> <td>no-transform</td> <td> <xreftarget="cache-request-directive.no-transform"/>,target="cache-request-directive.no-transform" format="counter"/>, <xreftarget="cache-response-directive.no-transform"/>target="cache-response-directive.no-transform" format="counter"/> </td> </tr> <tr> <td>only-if-cached</td> <td> <xreftarget="cache-request-directive.only-if-cached"/>target="cache-request-directive.only-if-cached" format="counter"/> </td> </tr> <tr> <td>private</td> <td> <xreftarget="cache-response-directive.private"/>target="cache-response-directive.private" format="counter"/> </td> </tr> <tr> <td>proxy-revalidate</td> <td> <xreftarget="cache-response-directive.proxy-revalidate"/>target="cache-response-directive.proxy-revalidate" format="counter"/> </td> </tr> <tr> <td>public</td> <td> <xreftarget="cache-response-directive.public"/>target="cache-response-directive.public" format="counter"/> </td> </tr> <tr> <td>s-maxage</td> <td> <xreftarget="cache-response-directive.s-maxage"/>target="cache-response-directive.s-maxage" format="counter"/> </td> </tr> </tbody> </table><!--(END)--></section> <section anchor="warn.code.registration" title="Warn Code Registry"> <t>Please add aIANA has added the following note to the "Hypertext Transfer Protocol (HTTP) Warn Codes" registry at <eref target="https://www.iana.org/assignments/http-warn-codes" brackets="angle"/>to the effectstating that "Warning" has been obsoleted: </t> <blockquote> <t> The Warningis obsoleted.header field (and the warn codes that it uses) has been obsoleted for HTTP per [RFC9111]. </t> </blockquote> </section> </section> </middle> <back> <displayreferencexmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:x="http://purl.org/net/xml2rfc/ext"target="HTTP11" to="HTTP/1.1"/> <references> <name>References</name> <references> <name>Normative References</name> <!-- [HTTP][I-D.ietf-httpbis-semantics-19]; companion document RFC 9110 --> <referenceanchor="HTTP"><!--included from draft-ietf-httpbis-semantics-latest.xml-->anchor='HTTP' target='https://www.rfc-editor.org/info/rfc9110'> <front> <title>HTTP Semantics</title> <authorfullname="Royinitials='R' surname='Fielding' fullname='Roy T.Fielding" initials="R." surname="Fielding"Fielding' role="editor"><organization>Adobe</organization> <address> <postal> <postalLine>345 Park Ave</postalLine> <postalLine>San Jose, CA 95110</postalLine> <postalLine>United States of America</postalLine> </postal> <email>fielding@gbiv.com</email> <uri>https://roy.gbiv.com/</uri> </address><organization /> </author> <authorfullname="Mark Nottingham" initials="M." surname="Nottingham"initials='M' surname='Nottingham' fullname='Mark Nottingham' role="editor"><organization>Fastly</organization> <address> <postal> <postalLine>Prahran VIC</postalLine> <postalLine>Australia</postalLine> </postal> <email>mnot@mnot.net</email> <uri>https://www.mnot.net/</uri> </address><organization /> </author> <authorfullname="Julian Reschke" initials="J." surname="Reschke"initials='J' surname='Reschke' fullname='Julian Reschke' role="editor"> <organizationabbrev="greenbytes">greenbytes GmbH</organization> <address> <postal> <postalLine>Hafenweg 16</postalLine> <postalLine>48155 Münster</postalLine> <postalLine>Germany</postalLine> </postal> <email>julian.reschke@greenbytes.de</email> <uri>https://greenbytes.de/tech/webdav/</uri> </address>/> </author> <dateyear="2021" month="September" day="10"/> </front> <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-semantics-19"/> </reference> <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119"> <front> <title>Key words for use in RFCs to Indicate Requirement Levels</title> <author initials="S." surname="Bradner" fullname="Scott Bradner"/> <date month="March" year="1997"/> </front> <seriesInfo name="BCP" value="14"/> <seriesInfo name="RFC" value="2119"/> <seriesInfo name="DOI" value="10.17487/RFC2119"/> </reference> <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174"> <front> <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title> <author initials="B." surname="Leiba" fullname="Barry Leiba"/> <date year="2017" month="May"/> </front> <seriesInfo name="BCP" value="14"/> <seriesInfo name="RFC" value="8174"/> <seriesInfo name="DOI" value="10.17487/RFC8174"/> </reference> <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234"> <front> <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title> <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor"/> <author initials="P." surname="Overell" fullname="Paul Overell"/> <date month="January" year="2008"/>year='2022' month='June'/> </front> <seriesInfo name="STD"value="68"/> <seriesInfo name="RFC" value="5234"/> <seriesInfo name="DOI" value="10.17487/RFC5234"/> </reference> <reference anchor="RFC7405" target="https://www.rfc-editor.org/info/rfc7405"> <front> <title>Case-Sensitive String Support in ABNF</title> <author initials="P." surname="Kyzivat" fullname="Dave Kyzivat"/> <date month="December" year="2014"/> </front>value="97"/> <seriesInfo name="RFC"value="7405"/>value="9110"/> <seriesInfo name="DOI"value="10.17487/RFC7405"/>value="10.17487/RFC9110"/> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7405.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/> </references> <references> <name>Informative References</name> <!-- [HTTP/1.1] [draft-ietf-httpbis-messaging]; companion document RFC 9112 --> <referenceanchor="HTTP11"><!--included from draft-ietf-httpbis-messaging-latest.xml-->anchor="HTTP11" target='https://www.rfc-editor.org/info/rfc9112'> <front> <title>HTTP/1.1</title> <author fullname="RoyT.Fielding"initials="R." surname="Fielding"role="editor"> <organization>Adobe</organization><address> <postal> <postalLine>345 Park Ave</postalLine> <postalLine>San Jose, CA 95110</postalLine> <postalLine>United States of America</postalLine> </postal> <email>fielding@gbiv.com</email> <uri>https://roy.gbiv.com/</uri> </address></author> <author fullname="Mark Nottingham"initials="M." surname="Nottingham"role="editor"> <organization>Fastly</organization><address> <postal> <postalLine>Prahran VIC</postalLine> <postalLine>Australia</postalLine> </postal> <email>mnot@mnot.net</email> <uri>https://www.mnot.net/</uri> </address></author> <author fullname="Julian Reschke"initials="J." surname="Reschke"role="editor"><organization abbrev="greenbytes">greenbytes<organization>greenbytes GmbH</organization><address> <postal> <postalLine>Hafenweg 16</postalLine> <postalLine>48155 Münster</postalLine> <postalLine>Germany</postalLine> </postal> <email>julian.reschke@greenbytes.de</email> <uri>https://greenbytes.de/tech/webdav/</uri> </address></author> <dateyear="2021" month="September" day="10"/> </front> <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-messaging-19"/> </reference> <reference anchor="RFC2616" target="https://www.rfc-editor.org/info/rfc2616"> <front> <title>Hypertext Transfer Protocol -- HTTP/1.1</title> <author fullname="R. Fielding" initials="R." surname="Fielding"/> <author fullname="J. Gettys" initials="J." surname="Gettys"/> <author fullname="J. Mogul" initials="J." surname="Mogul"/> <author fullname="H. Frystyk" initials="H." surname="Frystyk"/> <author fullname="L. Masinter" initials="L." surname="Masinter"/> <author fullname="P. Leach" initials="P." surname="Leach"/> <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee"/> <date month="June" year="1999"/> </front> <seriesInfo name="RFC" value="2616"/> <seriesInfo name="DOI" value="10.17487/RFC2616"/> </reference> <reference anchor="RFC7234" target="https://www.rfc-editor.org/info/rfc7234"> <front> <title>Hypertext Transfer Protocol (HTTP): Caching</title> <author initials="R." surname="Fielding" fullname="Roy T. Fielding" role="editor"/> <author initials="M." surname="Nottingham" fullname="Mark Nottingham" role="editor"/> <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke" role="editor"/> <datemonth="June"year="2014"/>year="2022"/> </front> <seriesInfoname="RFC" value="7234"/> <seriesInfo name="DOI" value="10.17487/RFC7234"/> </reference> <reference anchor="RFC5861" target="https://www.rfc-editor.org/info/rfc5861"> <front> <title abbrev="HTTP stale controls">HTTP Cache-Control Extensions for Stale Content</title> <author initials="M." surname="Nottingham" fullname="Mark Nottingham"/> <date month="April" year="2010"/> </front>name="STD" value="99"/> <seriesInfo name="RFC"value="5861"/>value="9112"/> <seriesInfo name="DOI"value="10.17487/RFC5861"/>value="10.17487/RFC9112"/> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7234.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5861.xml"/> <reference anchor="COOKIE" target="https://www.rfc-editor.org/info/rfc6265"> <front> <title>HTTP State Management Mechanism</title> <author initials="A." surname="Barth" fullname="Adam Barth"/> <date year="2011" month="April"/> </front> <seriesInfo name="RFC" value="6265"/> <seriesInfo name="DOI" value="10.17487/RFC6265"/> </reference><reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126"> <front> <title>Guidelines for Writing an IANA Considerations Section in RFCs</title> <author initials="M." surname="Cotton" fullname="M. Cotton"/> <author initials="B." surname="Leiba" fullname="B. Leiba"/> <author initials="T." surname="Narten" fullname="T. Narten"/> <date year="2017" month="June"/> </front> <seriesInfo name="BCP" value="26"/> <seriesInfo name="RFC" value="8126"/> <seriesInfo name="DOI" value="10.17487/RFC8126"/> </reference><xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/> </references> </references> <section anchor="collected.abnf" title="Collected ABNF"> <t>In the collected ABNF below, list rules are expandedasper <xref target="HTTP" section="5.6.1"/>.</t> <sourcecode type="abnf"name="draft-ietf-httpbis-cache-latest.parsed-abnf"><![CDATA[Agename="rfc9111.parsed-abnf"><![CDATA[Age = delta-seconds Cache-Control = [ cache-directive *( OWS "," OWS cache-directive ) ] Expires = HTTP-date HTTP-date = <HTTP-date, see [HTTP], Section 5.6.7> OWS = <OWS, see [HTTP], Section 5.6.3> cache-directive = token [ "=" ( token / quoted-string ) ] delta-seconds = 1*DIGIT field-name = <field-name, see [HTTP], Section 5.1> quoted-string = <quoted-string, see [HTTP], Section 5.6.4> token = <token, see [HTTP], Section 5.6.2> ]]></sourcecode> </section> <section anchor="changes.from.rfc.7234" title="Changes from RFC 7234"> <t> Handling of duplicate and conflicting cache directives has been clarified. (<xref target="calculating.freshness.lifetime"/>) </t> <t> Cache invalidation of the URIs in the Location and Content-Location header fields is no longerrequired,required but is still allowed. (<xref target="invalidation"/>) </t> <t> Cache invalidation of the URIs in the Location and Content-Location header fields is disallowed when the origin is different; previously, it was the host. (<xref target="invalidation"/>) </t> <t> Handling invalid and multiple Age header field values has been clarified. (<xref target="field.age"/>) </t> <t> Some cache directives defined by this specification now have stronger prohibitions against generating the quoted form of their values, since this has been found to create interoperability problems. Consumers of extension cache directives are no longer required to accept both token and quoted-string forms, but they still need to parse them properly for unknown extensions. (<xref target="field.cache-control"/>) </t> <t> The"public"public and"private"private cache directives were clarified, so that they do not make responses reusable under any condition. (<xref target="cache-response-directive"/>) </t> <t> The"must-understand"must-understand cache directive was introduced; caches are no longer required to understand the semantics of new response status codes unless it is present. (<xref target="cache-response-directive.must-understand"/>) </t> <t> The Warning response header was obsoleted. Much of the information supported by Warning could be gleaned by examining the response, and the remainingwarn-codes —information -- although potentially useful— were-- was entirely advisory. In practice, Warning was not added by caches or intermediaries. (<xref target="field.warning"/>) </t> </section> <sectionanchor="change.log" title="Change Log"> <t>This section is to be removed before publishing as an RFC.</t> <section anchor="changes.since.publication.as.rfc" title="Between RFC7234 and draft 00"> <t> The changes were purely editorial: </t> <ul> <li>Change boilerplate and abstract to indicate the "draft" status, and update references to ancestor specifications.</li> <li>Remove version "1.1" from document title, indicating that this specification applies to all HTTP versions.</li> <li>Adjust historical notes.</li> <li>Update links to sibling specifications.</li> <li>Replace sections listing changes from RFC 2616 by new empty sections referring to RFC 723x.</li> <li>Remove acknowledgements specific to RFC 723x.</li> <li>Move "Acknowledgements" to the very end and make them unnumbered.</li> </ul> </section> <section anchor="changes.since.00" title="Since draft-ietf-httpbis-cache-00"> <t> The changes are purely editorial: </t> <ul> <li>Moved all extensibility tips, registration procedures, and registry tables from the IANA considerations to normative sections, reducing the IANA considerations to just instructions that will be removed prior to publication as an RFC.</li> </ul> </section> <section anchor="changes.since.01" title="Since draft-ietf-httpbis-cache-01"> <ul> <li>Cite RFC 8126 instead of RFC 5226 (<eref target="https://github.com/httpwg/http-core/issues/75" brackets="angle"/>)</li> <li>In <xref target="field.pragma"/>, misleading statement about the relation between Pragma and Cache-Control (<eref target="https://github.com/httpwg/http-core/issues/92" brackets="angle"/>, <eref target="https://www.rfc-editor.org/errata/eid4674" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.02" title="Since draft-ietf-httpbis-cache-02"> <ul> <li>In <xref target="response.cacheability"/>, explain that only final responses are cacheable (<eref target="https://github.com/httpwg/http-core/issues/29" brackets="angle"/>)</li> <li>In <xref target="cache-response-directive"/>, clarify what responses various directives apply to (<eref target="https://github.com/httpwg/http-core/issues/52" brackets="angle"/>)</li> <li>In <xref target="validation.sent"/>, clarify the source of validators in conditional requests (<eref target="https://github.com/httpwg/http-core/issues/110" brackets="angle"/>)</li> <li>Revise <xref target="history.lists"/> to apply to more than just History Lists (<eref target="https://github.com/httpwg/http-core/issues/126" brackets="angle"/>)</li> <li>In <xref target="field.warning"/>, deprecated "Warning" header field (<eref target="https://github.com/httpwg/http-core/issues/139" brackets="angle"/>)</li> <li>In <xref target="caching.authenticated.responses"/>, remove a spurious note (<eref target="https://github.com/httpwg/http-core/issues/141" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.03" title="Since draft-ietf-httpbis-cache-03"> <ul> <li>In <xref target="caching.overview"/>, define what a disconnected cache is (<eref target="https://github.com/httpwg/http-core/issues/5" brackets="angle"/>)</li> <li>In <xref target="constructing.responses.from.caches"/>, clarify language around how to select a response when more than one matches (<eref target="https://github.com/httpwg/http-core/issues/23" brackets="angle"/>)</li> <li>in <xref target="serving.stale.responses"/>, mention stale-while-revalidate and stale-if-error (<eref target="https://github.com/httpwg/http-core/issues/122" brackets="angle"/>)</li> <li>Remove requirements around cache request directives (<eref target="https://github.com/httpwg/http-core/issues/129" brackets="angle"/>)</li> <li>Deprecate Pragma (<eref target="https://github.com/httpwg/http-core/issues/140" brackets="angle"/>)</li> <li>In <xref target="caching.authenticated.responses"/> and <xref target="cache-response-directive"/>, note effect of some directives on authenticated requests (<eref target="https://github.com/httpwg/http-core/issues/161" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.04" title="Since draft-ietf-httpbis-cache-04"> <ul> <li>In <xref target="field.cache-control"/>, remove the registrations for stale-if-error and stale-while-revalidate which happened in RFC 7234 (<eref target="https://github.com/httpwg/http-core/issues/207" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.05" title="Since draft-ietf-httpbis-cache-05"> <ul> <li>In <xref target="incomplete.responses"/>, clarify how weakly framed content is considered for purposes of completeness (<eref target="https://github.com/httpwg/http-core/issues/25" brackets="angle"/>)</li> <li>Throughout, describe Vary and cache key operations more clearly (<eref target="https://github.com/httpwg/http-core/issues/28" brackets="angle"/>)</li> <li>In <xref target="response.cacheability"/>, remove concept of "cacheable methods" in favor of prose (<eref target="https://github.com/httpwg/http-core/issues/54" brackets="angle"/>, <eref target="https://www.rfc-editor.org/errata/eid5300" brackets="angle"/>)</li> <li>Refactored <xref target="security.considerations"/>, and added a section on timing attacks (<eref target="https://github.com/httpwg/http-core/issues/233" brackets="angle"/>)</li> <li>Changed "cacheable by default" to "heuristically cacheable" throughout (<eref target="https://github.com/httpwg/http-core/issues/242" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.06" title="Since draft-ietf-httpbis-cache-06"> <ul> <li>In <xref target="response.cacheability"/> and <xref target="cache-response-directive.must-understand"/>, change response cacheability to only require understanding the response status code if the must-understand cache directive is present (<eref target="https://github.com/httpwg/http-core/issues/120" brackets="angle"/>)</li> <li>Change requirements for handling different forms of cache directives in <xref target="field.cache-control"/> (<eref target="https://github.com/httpwg/http-core/issues/128" brackets="angle"/>)</li> <li>Fix typo in <xref target="cache-response-directive.s-maxage"/> (<eref target="https://github.com/httpwg/http-core/issues/264" brackets="angle"/>)</li> <li>In <xref target="cache-response-directive.public"/> and <xref target="cache-response-directive.private"/>, clarify "private" and "public" so that they do not override all other cache directives (<eref target="https://github.com/httpwg/http-core/issues/268" brackets="angle"/>)</li> <li>In <xref target="response.cacheability"/>, distinguish between private with and without qualifying headers (<eref target="https://github.com/httpwg/http-core/issues/270" brackets="angle"/>)</li> <li>In <xref target="caching.negotiated.responses"/>, clarify that any "*" as a member of Vary will disable caching (<eref target="https://github.com/httpwg/http-core/issues/286" brackets="angle"/>)</li> <li>In <xref target="requirements.notation"/>, reference RFC 8174 as well (<eref target="https://github.com/httpwg/http-core/issues/303" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.07" title="Since draft-ietf-httpbis-cache-07"> <ul> <li>Throughout, replace "effective request URI", "request-target" and similar with "target URI" (<eref target="https://github.com/httpwg/http-core/issues/259" brackets="angle"/>)</li> <li>In <xref target="cache-response-directive.public"/> and <xref target="cache-response-directive.private"/>, make it clear that these directives do not ignore other requirements for caching (<eref target="https://github.com/httpwg/http-core/issues/320" brackets="angle"/>)</li> <li>In <xref target="incomplete.responses"/>, move definition of "complete" into semantics (<eref target="https://github.com/httpwg/http-core/issues/334" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.08" title="Since draft-ietf-httpbis-cache-08"> <ul> <li> <xref target="collected.abnf"/> now uses the sender variant of the "#" list expansion (<eref target="https://github.com/httpwg/http-core/issues/192" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.09" title="Since draft-ietf-httpbis-cache-09"> <ul> <li>In <xref target="field.age"/>, discuss handling of invalid and multiple Age header field values (<eref target="https://github.com/httpwg/http-core/issues/193" brackets="angle"/>)</li> <li>Switch to xml2rfc v3 mode for draft generation (<eref target="https://github.com/httpwg/http-core/issues/394" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.10" title="Since draft-ietf-httpbis-cache-10"> <ul> <li>In <xref target="field.cache-control"/> (<xref target="field.cache-control" format="none">Cache-Control</xref>), adjust ABNF to allow empty lists (<eref target="https://github.com/httpwg/http-core/issues/210" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.11" title="Since draft-ietf-httpbis-cache-11"> <ul> <li>None.</li> </ul> </section> <section anchor="changes.since.12" title="Since draft-ietf-httpbis-cache-12"> <ul> <li>In <xref target="serving.stale.responses"/>, remove 'no-store', as it won't be in cache in the first place (<eref target="https://github.com/httpwg/http-core/issues/447" brackets="angle"/>, <eref target="https://www.rfc-editor.org/errata/eid6279" brackets="angle"/>)</li> <li>In <xref target="storing.fields"/>, make it clear that only response headers need be stored (<eref target="https://github.com/httpwg/http-core/issues/457" brackets="angle"/>)</li> <li>Rewrote "Updating Stored Header Fields" <xref target="update"/> (<eref target="https://github.com/httpwg/http-core/issues/458" brackets="angle"/>)</li> <li>In <xref target="calculating.freshness.lifetime"/> clarify how to handle invalid and conflicting directives (<eref target="https://github.com/httpwg/http-core/issues/460" brackets="angle"/>)</li> <li>In <xref target="validation.response"/>, mention retry of failed validation requests (<eref target="https://github.com/httpwg/http-core/issues/462" brackets="angle"/>)</li> <li>In <xref target="validation.response"/>, clarify requirement on storing a full response to a conditional request (<eref target="https://github.com/httpwg/http-core/issues/463" brackets="angle"/>)</li> <li>In <xref target="field.age"/>, clarify error handling (<eref target="https://github.com/httpwg/http-core/issues/471" brackets="angle"/>)</li> <li>In <xref target="expiration.model"/>, remove spurious "UTC" (<eref target="https://github.com/httpwg/http-core/issues/472" brackets="angle"/>)</li> <li>In <xref target="expiration.model"/>, correct the date-related rule names to consider case-insensitive (<eref target="https://github.com/httpwg/http-core/issues/473" brackets="angle"/>)</li> <li>In <xref target="history.lists"/>, strengthen recommendation for application caches to pay attention to cache directives (<eref target="https://github.com/httpwg/http-core/issues/474" brackets="angle"/>)</li> <li>In <xref target="constructing.responses.from.caches"/>, mention collapsed requests (<eref target="https://github.com/httpwg/http-core/issues/475" brackets="angle"/>)</li> <li>In <xref target="invalidation"/>, relax requirements on Content-Location and Location invalidation (<eref target="https://github.com/httpwg/http-core/issues/478" brackets="angle"/>)</li> <li>In <xref target="freshening.responses"/>, refine the exceptions to update on a 304 (<eref target="https://github.com/httpwg/http-core/issues/488" brackets="angle"/>)</li> <li>Moved table of Cache-Control directives into <xref target="cache.directive.registration"/> (<eref target="https://github.com/httpwg/http-core/issues/506" brackets="angle"/>)</li> <li>In <xref target="notation"/>, remove unused core ABNF rules (<eref target="https://github.com/httpwg/http-core/issues/529" brackets="angle"/>)</li> <li>Changed to using "payload data" when defining requirements about the data being conveyed within a message, instead of the terms "payload body" or "response body" or "representation body", since they often get confused with the HTTP/1.1 message body (which includes transfer coding) (<eref target="https://github.com/httpwg/http-core/issues/553" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.13" title="Since draft-ietf-httpbis-cache-13"> <ul> <li>In <xref target="cache-response-directive.must-revalidate"/>, clarify requirements around generating an error response (<eref target="https://github.com/httpwg/http-core/issues/608" brackets="angle"/>)</li> <li>Changed to using "content" instead of "payload" or "payload data" to avoid confusion with the payload of version-specific messaging frames (<eref target="https://github.com/httpwg/http-core/issues/654" brackets="angle"/>)</li> <li>In <xref target="freshening.responses"/>, clarify how multiple validators are handled (<eref target="https://github.com/httpwg/http-core/issues/659" brackets="angle"/>)</li> <li>In <xref target="age.calculations"/>, <xref target="field.cache-control"/>, and <xref target="cache-response-directive.no-cache"/>, remove notes about very old HTTP/1.0 behaviours (<eref target="https://github.com/httpwg/http-core/issues/660" brackets="angle"/>)</li> <li>In <xref target="cache-response-directive.must-understand"/>, modify operation to be more backwards-compatible with existing implementations (<eref target="https://github.com/httpwg/http-core/issues/661" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.14" title="Since draft-ietf-httpbis-cache-14"> <ul> <li>Fix subsection ordering in <xref target="cache-response-directive"/> (<eref target="https://github.com/httpwg/http-core/issues/674" brackets="angle"/>)</li> <li>In <xref target="caching.overview"/>, define what a cache key is (<eref target="https://github.com/httpwg/http-core/issues/728" brackets="angle"/>)</li> <li>In <xref target="storing.fields"/>, clarify what cache proxy headers apply to (<eref target="https://github.com/httpwg/http-core/issues/729" brackets="angle"/>)</li> <li>In <xref target="cache.poisoning"/>, cache poisoning can affect private caches too (<eref target="https://github.com/httpwg/http-core/issues/730" brackets="angle"/>)</li> <li>In <xref target="field.age"/>, adjust handling of invalid values to match most deployed caches (<eref target="https://github.com/httpwg/http-core/issues/778" brackets="angle"/>)</li> <li>In <xref target="field.expires"/>, mention parsing requirement relaxation (<eref target="https://github.com/httpwg/http-core/issues/779" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.15" title="Since draft-ietf-httpbis-cache-15"> <ul> <li>In <xref target="validation.sent"/>, tune description of relation between cache keys and validators (<eref target="https://github.com/httpwg/http-core/issues/832" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.16" title="Since draft-ietf-httpbis-cache-16"> <t> This draft addresses mostly editorial issues raised during or past IETF Last Call; see <eref target="https://github.com/httpwg/http-core/issues?q=label%3Acaching+created%3A%3E2021-05-26" brackets="angle"/> for a summary. </t> <t> Furthermore: </t> <ul> <li>Addressed Genart last call review comments (<eref target="https://github.com/httpwg/http-core/issues/847" brackets="angle"/>)</li> <li>In <xref target="freshening.responses"/>, clarify that only selectable responses are updated (<eref target="https://github.com/httpwg/http-core/issues/839" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.17" title="Since draft-ietf-httpbis-cache-17"> <ul> <li>Made reference to <xref target="HTTP11"/> informative only (<eref target="https://github.com/httpwg/http-core/issues/911" brackets="angle"/>)</li> <li>Move cache-related aspects of validator use from <xref target="HTTP"/> into <xref target="validation.sent"/> (<eref target="https://github.com/httpwg/http-core/issues/933" brackets="angle"/>)</li> <li>Use term "clock" defined in <xref target="HTTP" section="6.6.1"/> throughout (<eref target="https://github.com/httpwg/http-core/issues/953" brackets="angle"/>)</li> <li>Throughout, disambiguate "selected representation" and "selected response" (now "chosen response") (<eref target="https://github.com/httpwg/http-core/issues/958" brackets="angle"/>)</li> </ul> </section> <section anchor="changes.since.18" title="Since draft-ietf-httpbis-cache-18"> <ul> <li>None.</li> </ul> </section> </section> <sectionanchor="acks" numbered="false" title="Acknowledgements"> <t> See Appendix "Acknowledgements" of <xreftarget="HTTP"/>.target="HTTP"/>, which applies to this document as well. </t> </section> </back> </rfc>