idnits 2.17.00 (12 Aug 2021) /tmp/idnits10911/draft-ietf-httpbis-cache-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 11, 2020) is 678 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC3986' is defined on line 1628, but no explicit reference was found in the text == Unused Reference: 'RFC7234' is defined on line 1676, but no explicit reference was found in the text == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-messaging-09 -- Possible downref: Normative reference to a draft: ref. 'Messaging' == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-semantics-09 -- Possible downref: Normative reference to a draft: ref. 'Semantics' -- Possible downref: Non-RFC (?) normative reference: ref. 'USASCII' -- Obsolete informational reference (is this intentional?): RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP Working Group R. Fielding, Ed. 3 Internet-Draft Adobe 4 Obsoletes: 7234 (if approved) M. Nottingham, Ed. 5 Intended status: Standards Track Fastly 6 Expires: January 12, 2021 J. Reschke, Ed. 7 greenbytes 8 July 11, 2020 10 HTTP Caching 11 draft-ietf-httpbis-cache-09 13 Abstract 15 The Hypertext Transfer Protocol (HTTP) is a stateless application- 16 level protocol for distributed, collaborative, hypertext information 17 systems. This document defines HTTP caches and the associated header 18 fields that control cache behavior or indicate cacheable response 19 messages. 21 This document obsoletes RFC 7234. 23 Editorial Note 25 This note is to be removed before publishing as an RFC. 27 Discussion of this draft takes place on the HTTP working group 28 mailing list (ietf-http-wg@w3.org), which is archived at 29 . 31 Working Group information can be found at ; 32 source code and issues list for this draft can be found at 33 . 35 The changes in this draft are summarized in Appendix C.10. 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at https://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on January 12, 2021. 54 Copyright Notice 56 Copyright (c) 2020 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (https://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the Simplified BSD License. 69 This document may contain material from IETF Documents or IETF 70 Contributions published or made publicly available before November 71 10, 2008. The person(s) controlling the copyright in some of this 72 material may not have granted the IETF Trust the right to allow 73 modifications of such material outside the IETF Standards Process. 74 Without obtaining an adequate license from the person(s) controlling 75 the copyright in such materials, this document may not be modified 76 outside the IETF Standards Process, and derivative works of it may 77 not be created outside the IETF Standards Process, except to format 78 it for publication as an RFC or to translate it into languages other 79 than English. 81 Table of Contents 83 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 84 1.1. Requirements Notation . . . . . . . . . . . . . . . . . . 5 85 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 5 86 1.3. Delta Seconds . . . . . . . . . . . . . . . . . . . . . . 6 87 2. Overview of Cache Operation . . . . . . . . . . . . . . . . . 6 88 3. Storing Responses in Caches . . . . . . . . . . . . . . . . . 7 89 3.1. Storing Header and Trailer Fields . . . . . . . . . . . . 8 90 3.2. Storing Incomplete Responses . . . . . . . . . . . . . . 9 91 3.3. Storing Responses to Authenticated Requests . . . . . . . 9 92 3.4. Combining Partial Content . . . . . . . . . . . . . . . . 10 93 4. Constructing Responses from Caches . . . . . . . . . . . . . 10 94 4.1. Calculating Cache Keys with Vary . . . . . . . . . . . . 11 95 4.2. Freshness . . . . . . . . . . . . . . . . . . . . . . . . 12 96 4.2.1. Calculating Freshness Lifetime . . . . . . . . . . . 14 97 4.2.2. Calculating Heuristic Freshness . . . . . . . . . . . 14 98 4.2.3. Calculating Age . . . . . . . . . . . . . . . . . . . 15 99 4.2.4. Serving Stale Responses . . . . . . . . . . . . . . . 16 100 4.3. Validation . . . . . . . . . . . . . . . . . . . . . . . 17 101 4.3.1. Sending a Validation Request . . . . . . . . . . . . 17 102 4.3.2. Handling a Received Validation Request . . . . . . . 18 103 4.3.3. Handling a Validation Response . . . . . . . . . . . 19 104 4.3.4. Freshening Stored Responses upon Validation . . . . . 20 105 4.3.5. Freshening Responses with HEAD . . . . . . . . . . . 20 106 4.4. Invalidation . . . . . . . . . . . . . . . . . . . . . . 21 107 5. Field Definitions . . . . . . . . . . . . . . . . . . . . . . 22 108 5.1. Age . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 109 5.2. Cache-Control . . . . . . . . . . . . . . . . . . . . . . 23 110 5.2.1. Request Cache-Control Directives . . . . . . . . . . 24 111 5.2.1.1. max-age . . . . . . . . . . . . . . . . . . . . . 24 112 5.2.1.2. max-stale . . . . . . . . . . . . . . . . . . . . 24 113 5.2.1.3. min-fresh . . . . . . . . . . . . . . . . . . . . 25 114 5.2.1.4. no-cache . . . . . . . . . . . . . . . . . . . . 25 115 5.2.1.5. no-store . . . . . . . . . . . . . . . . . . . . 25 116 5.2.1.6. no-transform . . . . . . . . . . . . . . . . . . 26 117 5.2.1.7. only-if-cached . . . . . . . . . . . . . . . . . 26 118 5.2.2. Response Cache-Control Directives . . . . . . . . . . 26 119 5.2.2.1. must-revalidate . . . . . . . . . . . . . . . . . 26 120 5.2.2.2. must-understand . . . . . . . . . . . . . . . . . 27 121 5.2.2.3. no-cache . . . . . . . . . . . . . . . . . . . . 27 122 5.2.2.4. no-store . . . . . . . . . . . . . . . . . . . . 28 123 5.2.2.5. no-transform . . . . . . . . . . . . . . . . . . 28 124 5.2.2.6. public . . . . . . . . . . . . . . . . . . . . . 28 125 5.2.2.7. private . . . . . . . . . . . . . . . . . . . . . 28 126 5.2.2.8. proxy-revalidate . . . . . . . . . . . . . . . . 29 127 5.2.2.9. max-age . . . . . . . . . . . . . . . . . . . . . 29 128 5.2.2.10. s-maxage . . . . . . . . . . . . . . . . . . . . 30 129 5.2.3. Cache Control Extensions . . . . . . . . . . . . . . 30 130 5.2.4. Cache Directive Registry . . . . . . . . . . . . . . 31 131 5.3. Expires . . . . . . . . . . . . . . . . . . . . . . . . . 31 132 5.4. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 32 133 5.5. Warning . . . . . . . . . . . . . . . . . . . . . . . . . 33 134 6. Relationship to Applications . . . . . . . . . . . . . . . . 33 135 7. Security Considerations . . . . . . . . . . . . . . . . . . . 33 136 7.1. Cache Poisoning . . . . . . . . . . . . . . . . . . . . . 34 137 7.2. Timing Attacks . . . . . . . . . . . . . . . . . . . . . 34 138 7.3. Caching of Sensitive Information . . . . . . . . . . . . 34 139 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 140 8.1. Field Registration . . . . . . . . . . . . . . . . . . . 35 141 8.2. Cache Directive Registration . . . . . . . . . . . . . . 35 142 8.3. Warn Code Registry . . . . . . . . . . . . . . . . . . . 35 143 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 144 9.1. Normative References . . . . . . . . . . . . . . . . . . 35 145 9.2. Informative References . . . . . . . . . . . . . . . . . 36 146 Appendix A. Collected ABNF . . . . . . . . . . . . . . . . . . . 37 147 Appendix B. Changes from RFC 7234 . . . . . . . . . . . . . . . 37 148 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 38 149 C.1. Between RFC7234 and draft 00 . . . . . . . . . . . . . . 38 150 C.2. Since draft-ietf-httpbis-cache-00 . . . . . . . . . . . . 38 151 C.3. Since draft-ietf-httpbis-cache-01 . . . . . . . . . . . . 38 152 C.4. Since draft-ietf-httpbis-cache-02 . . . . . . . . . . . . 38 153 C.5. Since draft-ietf-httpbis-cache-03 . . . . . . . . . . . . 39 154 C.6. Since draft-ietf-httpbis-cache-04 . . . . . . . . . . . . 39 155 C.7. Since draft-ietf-httpbis-cache-05 . . . . . . . . . . . . 39 156 C.8. Since draft-ietf-httpbis-cache-06 . . . . . . . . . . . . 40 157 C.9. Since draft-ietf-httpbis-cache-07 . . . . . . . . . . . . 40 158 C.10. Since draft-ietf-httpbis-cache-08 . . . . . . . . . . . . 41 159 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 160 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 43 161 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 163 1. Introduction 165 The Hypertext Transfer Protocol (HTTP) is a stateless application- 166 level request/response protocol that uses extensible semantics and 167 self-descriptive messages for flexible interaction with network-based 168 hypertext information systems. HTTP is defined by a series of 169 documents that collectively form the HTTP/1.1 specification: 171 o "HTTP Semantics" [Semantics] 173 o "HTTP Caching" (this document) 175 o "HTTP/1.1 Messaging" [Messaging] 177 HTTP is typically used for distributed information systems, where 178 performance can be improved by the use of response caches. This 179 document defines aspects of HTTP related to caching and reusing 180 response messages. 182 An HTTP cache is a local store of response messages and the subsystem 183 that controls storage, retrieval, and deletion of messages in it. A 184 cache stores cacheable responses in order to reduce the response time 185 and network bandwidth consumption on future, equivalent requests. 186 Any client or server MAY employ a cache, though a cache cannot be 187 used by a server that is acting as a tunnel. 189 A shared cache is a cache that stores responses to be reused by more 190 than one user; shared caches are usually (but not always) deployed as 191 a part of an intermediary. A private cache, in contrast, is 192 dedicated to a single user; often, they are deployed as a component 193 of a user agent. 195 The goal of caching in HTTP is to significantly improve performance 196 by reusing a prior response message to satisfy a current request. A 197 stored response is considered "fresh", as defined in Section 4.2, if 198 the response can be reused without "validation" (checking with the 199 origin server to see if the cached response remains valid for this 200 request). A fresh response can therefore reduce both latency and 201 network overhead each time it is reused. When a cached response is 202 not fresh, it might still be reusable if it can be freshened by 203 validation (Section 4.3) or if the origin is unavailable 204 (Section 4.2.4). 206 This document obsoletes RFC 7234, with the changes being summarized 207 in Appendix B. 209 1.1. Requirements Notation 211 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 212 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 213 "OPTIONAL" in this document are to be interpreted as described in BCP 214 14 [RFC2119] [RFC8174] when, and only when, they appear in all 215 capitals, as shown here. 217 Conformance criteria and considerations regarding error handling are 218 defined in Section 3 of [Semantics]. 220 1.2. Syntax Notation 222 This specification uses the Augmented Backus-Naur Form (ABNF) 223 notation of [RFC5234], extended with the notation for case- 224 sensitivity in strings defined in [RFC7405]. 226 It also uses a list extension, defined in Section 5.5 of [Semantics], 227 that allows for compact definition of comma-separated lists using a 228 '#' operator (similar to how the '*' operator indicates repetition). 229 Appendix A shows the collected grammar with all list operators 230 expanded to standard ABNF notation. 232 The following core rules are included by reference, as defined in 233 [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF 234 (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), 235 HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line 236 feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any 237 visible [USASCII] character). 239 The rules below are defined in [Semantics]: 241 HTTP-date = 242 OWS = 243 field-name = 244 quoted-string = 245 token = 247 1.3. Delta Seconds 249 The delta-seconds rule specifies a non-negative integer, representing 250 time in seconds. 252 delta-seconds = 1*DIGIT 254 A recipient parsing a delta-seconds value and converting it to binary 255 form ought to use an arithmetic type of at least 31 bits of non- 256 negative integer range. If a cache receives a delta-seconds value 257 greater than the greatest integer it can represent, or if any of its 258 subsequent calculations overflows, the cache MUST consider the value 259 to be either 2147483648 (2^31) or the greatest positive integer it 260 can conveniently represent. 262 Note: The value 2147483648 is here for historical reasons, 263 effectively represents infinity (over 68 years), and does not need 264 to be stored in binary form; an implementation could produce it as 265 a canned string if any overflow occurs, even if the calculations 266 are performed with an arithmetic type incapable of directly 267 representing that number. What matters here is that an overflow 268 be detected and not treated as a negative value in later 269 calculations. 271 2. Overview of Cache Operation 273 Proper cache operation preserves the semantics of HTTP transfers 274 ([Semantics]) while reducing the transfer of information already held 275 in the cache. Although caching is an entirely OPTIONAL feature of 276 HTTP, it can be assumed that reusing a cached response is desirable 277 and that such reuse is the default behavior when no requirement or 278 local configuration prevents it. Therefore, HTTP cache requirements 279 are focused on preventing a cache from either storing a non-reusable 280 response or reusing a stored response inappropriately, rather than 281 mandating that caches always store and reuse particular responses. 283 The base cache key consists of the request method and target URI used 284 to retrieve the stored response; the method determines under which 285 circumstances that response can be used to satisfy a request. 286 However, many HTTP caches in common use today only cache GET 287 responses, and therefore only use the URI as the cache key, 288 forwarding other methods. 290 If a request target is subject to content negotiation, the cache 291 might store multiple responses for it. Caches differentiate these 292 responses by incorporating values of the original request's selecting 293 header fields into the cache key as well, as per Section 4.1. 295 Furthermore, caches might incorporate additional material into the 296 cache key. For example, user agent caches might include the 297 referring site's identity, thereby "double keying" the cache to avoid 298 some privacy risks (see Section 7.2). 300 Most commonly, caches store the successful result of a retrieval 301 request: i.e., a 200 (OK) response to a GET request, which contains a 302 representation of the target resource (Section 8.3.1 of [Semantics]). 303 However, it is also possible to store redirects, negative results 304 (e.g., 404 (Not Found)), incomplete results (e.g., 206 (Partial 305 Content)), and responses to methods other than GET if the method's 306 definition allows such caching and defines something suitable for use 307 as a cache key. 309 A cache is disconnected when it cannot contact the origin server or 310 otherwise find a forward path for a given request. A disconnected 311 cache can serve stale responses in some circumstances 312 (Section 4.2.4). 314 3. Storing Responses in Caches 316 A cache MUST NOT store a response to a request unless: 318 o the request method is understood by the cache; 320 o the response status code is final (see Section 10 of [Semantics]); 322 o if the response status code is 206 or 304, or the "must- 323 understand" cache directive (see Section 5.2) is present: the 324 cache understands the response status code; 326 o the "no-store" cache directive is not present in the response (see 327 Section 5.2); 329 o if the cache is shared: the "private" response directive is either 330 not present or allows a modified response to be stored by a shared 331 cache; see Section 5.2.2.7); 333 o if the cache is shared: the Authorization header field is not 334 present in the request (see Section 9.5.3 of [Semantics]) or a 335 response directive is present that explicitly allows shared 336 caching (see Section 3.3); and, 338 o the response contains at least one of: 340 * a public response directive (see Section 5.2.2.6); 342 * a private response directive, if the cache is not shared (see 343 Section 5.2.2.7); 345 * an Expires header field (see Section 5.3); 347 * a max-age response directive (see Section 5.2.2.9); 349 * if the cache is shared, an s-maxage response directive (see 350 Section 5.2.2.10); 352 * a Cache Control Extension that allows it to be cached (see 353 Section 5.2.3); or, 355 * a status code that is defined as heuristically cacheable (see 356 Section 4.2.2). 358 Note that any of the requirements listed above can be overridden by a 359 cache-control extension; see Section 5.2.3. 361 In this context, a cache has "understood" a request method or a 362 response status code if it recognizes it and implements all specified 363 caching-related behavior. 365 Note that, in normal operation, some caches will not store a response 366 that has neither a cache validator nor an explicit expiration time, 367 as such responses are not usually useful to store. However, caches 368 are not prohibited from storing such responses. 370 3.1. Storing Header and Trailer Fields 372 Caches MUST include all received header fields -- including 373 unrecognised ones -- when storing a response; this assures that new 374 HTTP header fields can be successfully deployed. However, the 375 following exceptions are made: 377 o The Connection header field and fields whose names are listed in 378 it are required by Section 9.1 of [Messaging] to be removed before 379 forwarding the message. This MAY be implemented by doing so 380 before storage. 382 o Likewise, some fields' semantics require them to be removed before 383 forwarding the message, and this MAY be implemented by doing so 384 before storage; see Section 9.1 of [Messaging] for some examples. 386 o Header fields that are specific to a client's proxy configuration 387 MUST NOT be stored, unless the cache incorporates the identity of 388 the proxy into the cache key. Effectively, this is limited to 389 Proxy-Authenticate (Section 11.3.2 of [Semantics]), Proxy- 390 Authentication-Info (Section 11.3.4 of [Semantics]), and Proxy- 391 Authorization (Section 9.5.4 of [Semantics]). 393 Caches MAY either store trailer fields separately from header fields, 394 or discard them. Caches MUST NOT combine trailer fields with header 395 fields. 397 3.2. Storing Incomplete Responses 399 If the request method is GET, the response status code is 200 (OK), 400 and the entire response header section has been received, a cache MAY 401 store a response body that is not complete (Section 2.1 of 402 [Semantics]) if the stored response is recorded as being incomplete. 403 Likewise, a 206 (Partial Content) response MAY be stored as if it 404 were an incomplete 200 (OK) response. However, a cache MUST NOT 405 store incomplete or partial-content responses if it does not support 406 the Range and Content-Range header fields or if it does not 407 understand the range units used in those fields. 409 A cache MAY complete a stored incomplete response by making a 410 subsequent range request (Section 9.3 of [Semantics]) and combining 411 the successful response with the stored response, as defined in 412 Section 3.4. A cache MUST NOT use an incomplete response to answer 413 requests unless the response has been made complete or the request is 414 partial and specifies a range that is wholly within the incomplete 415 response. A cache MUST NOT send a partial response to a client 416 without explicitly marking it as such using the 206 (Partial Content) 417 status code. 419 3.3. Storing Responses to Authenticated Requests 421 A shared cache MUST NOT use a cached response to a request with an 422 Authorization header field (Section 9.5.3 of [Semantics]) to satisfy 423 any subsequent request unless the response contains a Cache-Control 424 field with a response directive (Section 5.2.2) that allows it to be 425 stored by a shared cache and the cache conforms to the requirements 426 of that directive for that response. 428 In this specification, the following response directives have such an 429 effect: must-revalidate (Section 5.2.2.1), public (Section 5.2.2.6), 430 and s-maxage (Section 5.2.2.10). 432 3.4. Combining Partial Content 434 A response might transfer only a partial representation if the 435 connection closed prematurely or if the request used one or more 436 Range specifiers (Section 9.3 of [Semantics]). After several such 437 transfers, a cache might have received several ranges of the same 438 representation. A cache MAY combine these ranges into a single 439 stored response, and reuse that response to satisfy later requests, 440 if they all share the same strong validator and the cache complies 441 with the client requirements in Section 10.3.7.3 of [Semantics]. 443 When combining the new response with one or more stored responses, a 444 cache MUST use the header fields provided in the new response, aside 445 from Content-Range, to replace all instances of the corresponding 446 header fields in the stored response. 448 4. Constructing Responses from Caches 450 When presented with a request, a cache MUST NOT reuse a stored 451 response, unless: 453 o The presented target URI (Section 6.1 of [Semantics]) and that of 454 the stored response match, and 456 o the request method associated with the stored response allows it 457 to be used for the presented request, and 459 o selecting header fields nominated by the stored response (if any) 460 match those presented (see Section 4.1), and 462 o the stored response does not contain the no-cache cache directive 463 (Section 5.2.2.3), unless it is successfully validated 464 (Section 4.3), and 466 o the stored response is either: 468 * fresh (see Section 4.2), or 470 * allowed to be served stale (see Section 4.2.4), or 472 * successfully validated (see Section 4.3). 474 Note that any of the requirements listed above can be overridden by a 475 cache-control extension; see Section 5.2.3. 477 When a stored response is used to satisfy a request without 478 validation, a cache MUST generate an Age header field (Section 5.1), 479 replacing any present in the response with a value equal to the 480 stored response's current_age; see Section 4.2.3. 482 A cache MUST write through requests with methods that are unsafe 483 (Section 8.2.1 of [Semantics]) to the origin server; i.e., a cache is 484 not allowed to generate a reply to such a request before having 485 forwarded the request and having received a corresponding response. 487 Also, note that unsafe requests might invalidate already-stored 488 responses; see Section 4.4. 490 When more than one suitable response is stored, a cache MUST use the 491 most recent one (as determined by the Date header field). It can 492 also forward the request with "Cache-Control: max-age=0" or "Cache- 493 Control: no-cache" to disambiguate which response to use. 495 A cache that does not have a clock available MUST NOT use stored 496 responses without revalidating them upon every use. 498 4.1. Calculating Cache Keys with Vary 500 When a cache receives a request that can be satisfied by a stored 501 response that has a Vary header field (Section 11.1.4 of 502 [Semantics]), it MUST NOT use that response unless all of the 503 selecting header fields nominated by the Vary header field match in 504 both the original request (i.e., that associated with the stored 505 response), and the presented request. 507 The selecting header fields from two requests are defined to match if 508 and only if those in the first request can be transformed to those in 509 the second request by applying any of the following: 511 o adding or removing whitespace, where allowed in the header field's 512 syntax 514 o combining multiple header fields with the same field name (see 515 Section 5.4 of [Semantics]) 517 o normalizing both header field values in a way that is known to 518 have identical semantics, according to the header field's 519 specification (e.g., reordering field values when order is not 520 significant; case-normalization, where values are defined to be 521 case-insensitive) 523 If (after any normalization that might take place) a header field is 524 absent from a request, it can only match another request if it is 525 also absent there. 527 A Vary header field value containing a member "*" always fails to 528 match. 530 The stored response with matching selecting header fields is known as 531 the selected response. 533 If multiple selected responses are available (potentially including 534 responses without a Vary header field), the cache will need to choose 535 one to use. When a selecting header field has a known mechanism for 536 doing so (e.g., qvalues on Accept and similar request header fields), 537 that mechanism MAY be used to select preferred responses; of the 538 remainder, the most recent response (as determined by the Date header 539 field) is used, as per Section 4. 541 Note that in practice, some resources might send the Vary header 542 field on responses inconsistently. When a cache has multiple 543 responses for a given target URI, and one or more omits the Vary 544 header field, it SHOULD use the most recent non-empty value available 545 to select an appropriate response for the request. 547 If no selected response is available, the cache cannot satisfy the 548 presented request. Typically, it is forwarded to the origin server 549 in a (possibly conditional; see Section 4.3) request. 551 4.2. Freshness 553 A fresh response is one whose age has not yet exceeded its freshness 554 lifetime. Conversely, a stale response is one where it has. 556 A response's freshness lifetime is the length of time between its 557 generation by the origin server and its expiration time. An explicit 558 expiration time is the time at which the origin server intends that a 559 stored response can no longer be used by a cache without further 560 validation, whereas a heuristic expiration time is assigned by a 561 cache when no explicit expiration time is available. 563 A response's age is the time that has passed since it was generated 564 by, or successfully validated with, the origin server. 566 When a response is "fresh" in the cache, it can be used to satisfy 567 subsequent requests without contacting the origin server, thereby 568 improving efficiency. 570 The primary mechanism for determining freshness is for an origin 571 server to provide an explicit expiration time in the future, using 572 either the Expires header field (Section 5.3) or the max-age response 573 directive (Section 5.2.2.9). Generally, origin servers will assign 574 future explicit expiration times to responses in the belief that the 575 representation is not likely to change in a semantically significant 576 way before the expiration time is reached. 578 If an origin server wishes to force a cache to validate every 579 request, it can assign an explicit expiration time in the past to 580 indicate that the response is already stale. Compliant caches will 581 normally validate a stale cached response before reusing it for 582 subsequent requests (see Section 4.2.4). 584 Since origin servers do not always provide explicit expiration times, 585 caches are also allowed to use a heuristic to determine an expiration 586 time under certain circumstances (see Section 4.2.2). 588 The calculation to determine if a response is fresh is: 590 response_is_fresh = (freshness_lifetime > current_age) 592 freshness_lifetime is defined in Section 4.2.1; current_age is 593 defined in Section 4.2.3. 595 Clients can send the max-age or min-fresh request directives 596 (Section 5.2.1) to constrain or relax freshness calculations for the 597 corresponding response. However, caches are not required to honor 598 them. 600 When calculating freshness, to avoid common problems in date parsing: 602 o Although all date formats are specified to be case-sensitive, a 603 cache recipient SHOULD match day, week, and time-zone names case- 604 insensitively. 606 o If a cache recipient's internal implementation of time has less 607 resolution than the value of an HTTP-date, the recipient MUST 608 internally represent a parsed Expires date as the nearest time 609 equal to or earlier than the received value. 611 o A cache recipient MUST NOT allow local time zones to influence the 612 calculation or comparison of an age or expiration time. 614 o A cache recipient SHOULD consider a date with a zone abbreviation 615 other than GMT or UTC to be invalid for calculating expiration. 617 Note that freshness applies only to cache operation; it cannot be 618 used to force a user agent to refresh its display or reload a 619 resource. See Section 6 for an explanation of the difference between 620 caches and history mechanisms. 622 4.2.1. Calculating Freshness Lifetime 624 A cache can calculate the freshness lifetime (denoted as 625 freshness_lifetime) of a response by using the first match of the 626 following: 628 o If the cache is shared and the s-maxage response directive 629 (Section 5.2.2.10) is present, use its value, or 631 o If the max-age response directive (Section 5.2.2.9) is present, 632 use its value, or 634 o If the Expires response header field (Section 5.3) is present, use 635 its value minus the value of the Date response header field, or 637 o Otherwise, no explicit expiration time is present in the response. 638 A heuristic freshness lifetime might be applicable; see 639 Section 4.2.2. 641 Note that this calculation is not vulnerable to clock skew, since all 642 of the information comes from the origin server. 644 When there is more than one value present for a given directive 645 (e.g., two Expires header fields, multiple Cache-Control: max-age 646 directives), the directive's value is considered invalid. Caches are 647 encouraged to consider responses that have invalid freshness 648 information to be stale. 650 4.2.2. Calculating Heuristic Freshness 652 Since origin servers do not always provide explicit expiration times, 653 a cache MAY assign a heuristic expiration time when an explicit time 654 is not specified, employing algorithms that use other header field 655 values (such as the Last-Modified time) to estimate a plausible 656 expiration time. This specification does not provide specific 657 algorithms, but does impose worst-case constraints on their results. 659 A cache MUST NOT use heuristics to determine freshness when an 660 explicit expiration time is present in the stored response. Because 661 of the requirements in Section 3, this means that, effectively, 662 heuristics can only be used on responses without explicit freshness 663 whose status codes are defined as "heuristically cacheable" (e.g., 664 see Section 10.1 of [Semantics]), and those responses without 665 explicit freshness that have been marked as explicitly cacheable 666 (e.g., with a "public" response directive). 668 Note that in previous specifications heuristically cacheable response 669 status codes were called "cacheable by default." 671 If the response has a Last-Modified header field (Section 11.2.2 of 672 [Semantics]), caches are encouraged to use a heuristic expiration 673 value that is no more than some fraction of the interval since that 674 time. A typical setting of this fraction might be 10%. 676 Note: Section 13.9 of [RFC2616] prohibited caches from calculating 677 heuristic freshness for URIs with query components (i.e., those 678 containing '?'). In practice, this has not been widely 679 implemented. Therefore, origin servers are encouraged to send 680 explicit directives (e.g., Cache-Control: no-cache) if they wish 681 to preclude caching. 683 4.2.3. Calculating Age 685 The Age header field is used to convey an estimated age of the 686 response message when obtained from a cache. The Age field value is 687 the cache's estimate of the number of seconds since the response was 688 generated or validated by the origin server. In essence, the Age 689 value is the sum of the time that the response has been resident in 690 each of the caches along the path from the origin server, plus the 691 amount of time it has been in transit along network paths. 693 The following data is used for the age calculation: 695 age_value The term "age_value" denotes the value of the Age header 696 field (Section 5.1), in a form appropriate for arithmetic 697 operation; or 0, if not available. 699 date_value The term "date_value" denotes the value of the Date 700 header field, in a form appropriate for arithmetic operations. 701 See Section 11.1.1 of [Semantics] for the definition of the Date 702 header field, and for requirements regarding responses without it. 704 now The term "now" means "the current value of the clock at the host 705 performing the calculation". A host ought to use NTP ([RFC5905]) 706 or some similar protocol to synchronize its clocks to Coordinated 707 Universal Time. 709 request_time The current value of the clock at the host at the time 710 the request resulting in the stored response was made. 712 response_time The current value of the clock at the host at the time 713 the response was received. 715 A response's age can be calculated in two entirely independent ways: 717 1. the "apparent_age": response_time minus date_value, if the local 718 clock is reasonably well synchronized to the origin server's 719 clock. If the result is negative, the result is replaced by 720 zero. 722 2. the "corrected_age_value", if all of the caches along the 723 response path implement HTTP/1.1 or greater. A cache MUST 724 interpret this value relative to the time the request was 725 initiated, not the time that the response was received. 727 apparent_age = max(0, response_time - date_value); 729 response_delay = response_time - request_time; 730 corrected_age_value = age_value + response_delay; 732 These are combined as 734 corrected_initial_age = max(apparent_age, corrected_age_value); 736 unless the cache is confident in the value of the Age header field 737 (e.g., because there are no HTTP/1.0 hops in the Via header field), 738 in which case the corrected_age_value MAY be used as the 739 corrected_initial_age. 741 The current_age of a stored response can then be calculated by adding 742 the amount of time (in seconds) since the stored response was last 743 validated by the origin server to the corrected_initial_age. 745 resident_time = now - response_time; 746 current_age = corrected_initial_age + resident_time; 748 4.2.4. Serving Stale Responses 750 A "stale" response is one that either has explicit expiry information 751 or is allowed to have heuristic expiry calculated, but is not fresh 752 according to the calculations in Section 4.2. 754 A cache MUST NOT generate a stale response if it is prohibited by an 755 explicit in-protocol directive (e.g., by a "no-store" or "no-cache" 756 cache directive, a "must-revalidate" cache-response-directive, or an 757 applicable "s-maxage" or "proxy-revalidate" cache-response-directive; 758 see Section 5.2.2). 760 A cache MUST NOT generate a stale response unless it is disconnected 761 or doing so is explicitly permitted by the client or origin server 762 (e.g., by the max-stale request directive in Section 5.2.1, by 763 extension directives such as those defined in [RFC5861], or by 764 configuration in accordance with an out-of-band contract). 766 4.3. Validation 768 When a cache has one or more stored responses for a requested URI, 769 but cannot serve any of them (e.g., because they are not fresh, or 770 one cannot be selected; see Section 4.1), it can use the conditional 771 request mechanism Section 9.2 of [Semantics] in the forwarded request 772 to give the next inbound server an opportunity to select a valid 773 stored response to use, updating the stored metadata in the process, 774 or to replace the stored response(s) with a new response. This 775 process is known as "validating" or "revalidating" the stored 776 response. 778 4.3.1. Sending a Validation Request 780 When generating a conditional request for validation, a cache starts 781 with either a request it is attempting to satisfy, or -- if it is 782 initiating the request independently -- it synthesises a request 783 using a stored response by copying the method, target URI, and 784 request header fields identified by the Vary header field 785 Section 4.1. 787 It then updates that request with one or more precondition header 788 fields. These contain validator metadata sourced from stored 789 response(s) that have the same cache key. 791 The precondition header fields are then compared by recipients to 792 determine whether any stored response is equivalent to a current 793 representation of the resource. 795 One such validator is the timestamp given in a Last-Modified header 796 field (Section 11.2.2 of [Semantics]), which can be used in an If- 797 Modified-Since header field for response validation, or in an If- 798 Unmodified-Since or If-Range header field for representation 799 selection (i.e., the client is referring specifically to a previously 800 obtained representation with that timestamp). 802 Another validator is the entity-tag given in an ETag field 803 (Section 11.2.3 of [Semantics]). One or more entity-tags, indicating 804 one or more stored responses, can be used in an If-None-Match header 805 field for response validation, or in an If-Match or If-Range header 806 field for representation selection (i.e., the client is referring 807 specifically to one or more previously obtained representations with 808 the listed entity-tags). 810 4.3.2. Handling a Received Validation Request 812 Each client in the request chain may have its own cache, so it is 813 common for a cache at an intermediary to receive conditional requests 814 from other (outbound) caches. Likewise, some user agents make use of 815 conditional requests to limit data transfers to recently modified 816 representations or to complete the transfer of a partially retrieved 817 representation. 819 If a cache receives a request that can be satisfied by reusing one of 820 its stored 200 (OK) or 206 (Partial Content) responses, the cache 821 SHOULD evaluate any applicable conditional header field preconditions 822 received in that request with respect to the corresponding validators 823 contained within the selected response. A cache MUST NOT evaluate 824 conditional header fields that are only applicable to an origin 825 server, found in a request with semantics that cannot be satisfied 826 with a cached response, or applied to a target resource for which it 827 has no stored responses; such preconditions are likely intended for 828 some other (inbound) server. 830 The proper evaluation of conditional requests by a cache depends on 831 the received precondition header fields and their precedence, as 832 defined in Section 9.2.2 of [Semantics]. The If-Match and If- 833 Unmodified-Since conditional header fields are not applicable to a 834 cache. 836 A request containing an If-None-Match header field (Section 9.2.4 of 837 [Semantics]) indicates that the client wants to validate one or more 838 of its own stored responses in comparison to whichever stored 839 response is selected by the cache. If the field value is "*", or if 840 the field value is a list of entity-tags and at least one of them 841 matches the entity-tag of the selected stored response, a cache 842 recipient SHOULD generate a 304 (Not Modified) response (using the 843 metadata of the selected stored response) instead of sending that 844 stored response. 846 When a cache decides to revalidate its own stored responses for a 847 request that contains an If-None-Match list of entity-tags, the cache 848 MAY combine the received list with a list of entity-tags from its own 849 stored set of responses (fresh or stale) and send the union of the 850 two lists as a replacement If-None-Match header field value in the 851 forwarded request. If a stored response contains only partial 852 content, the cache MUST NOT include its entity-tag in the union 853 unless the request is for a range that would be fully satisfied by 854 that partial stored response. If the response to the forwarded 855 request is 304 (Not Modified) and has an ETag field value with an 856 entity-tag that is not in the client's list, the cache MUST generate 857 a 200 (OK) response for the client by reusing its corresponding 858 stored response, as updated by the 304 response metadata 859 (Section 4.3.4). 861 If an If-None-Match header field is not present, a request containing 862 an If-Modified-Since header field (Section 9.2.5 of [Semantics]) 863 indicates that the client wants to validate one or more of its own 864 stored responses by modification date. A cache recipient SHOULD 865 generate a 304 (Not Modified) response (using the metadata of the 866 selected stored response) if one of the following cases is true: 1) 867 the selected stored response has a Last-Modified field value that is 868 earlier than or equal to the conditional timestamp; 2) no Last- 869 Modified field is present in the selected stored response, but it has 870 a Date field value that is earlier than or equal to the conditional 871 timestamp; or, 3) neither Last-Modified nor Date is present in the 872 selected stored response, but the cache recorded it as having been 873 received at a time earlier than or equal to the conditional 874 timestamp. 876 A cache that implements partial responses to range requests, as 877 defined in Section 9.3 of [Semantics], also needs to evaluate a 878 received If-Range header field (Section 9.2.7 of [Semantics]) with 879 respect to its selected stored response. 881 4.3.3. Handling a Validation Response 883 Cache handling of a response to a conditional request is dependent 884 upon its status code: 886 o A 304 (Not Modified) response status code indicates that the 887 stored response can be updated and reused; see Section 4.3.4. 889 o A full response (i.e., one with a payload body) indicates that 890 none of the stored responses nominated in the conditional request 891 is suitable. Instead, the cache MUST use the full response to 892 satisfy the request and MAY replace the stored response(s). 894 o However, if a cache receives a 5xx (Server Error) response while 895 attempting to validate a response, it can either forward this 896 response to the requesting client, or act as if the server failed 897 to respond. In the latter case, the cache MAY send a previously 898 stored response (see Section 4.2.4). 900 4.3.4. Freshening Stored Responses upon Validation 902 When a cache receives a 304 (Not Modified) response and already has 903 one or more stored 200 (OK) responses for the applicable cache key, 904 the cache needs to identify which (if any) are to be updated by the 905 new information provided, and then do so. 907 The stored response(s) to update are identified by using the first 908 match (if any) of the following: 910 o If the new response contains a strong validator (see 911 Section 11.2.1 of [Semantics]), then that strong validator 912 identifies the selected representation for update. All of the 913 stored responses with the same strong validator are identified for 914 update. If none of the stored responses contain the same strong 915 validator, then the cache MUST NOT use the new response to update 916 any stored responses. 918 o If the new response contains a weak validator and that validator 919 corresponds to one of the cache's stored responses, then the most 920 recent of those matching stored responses is identified for 921 update. 923 o If the new response does not include any form of validator (such 924 as in the case where a client generates an If-Modified-Since 925 request from a source other than the Last-Modified response header 926 field), and there is only one stored response, and that stored 927 response also lacks a validator, then that stored response is 928 identified for update. 930 For each stored response identified for update, the cache MUST use 931 the header fields provided in the 304 (Not Modified) response to 932 replace all instances of the corresponding header fields in the 933 stored response, with the following exceptions: 935 o The exceptions to header field storage in Section 3.1 also apply 936 to header field updates. 938 o Caches MUST NOT update the following header fields: Content- 939 Encoding, Content-Length, Content-MD5 (Section 14.15 of 940 [RFC2616]), Content-Range, ETag. 942 4.3.5. Freshening Responses with HEAD 944 A response to the HEAD method is identical to what an equivalent 945 request made with a GET would have been, except it lacks a body. 946 This property of HEAD responses can be used to invalidate or update a 947 cached GET response if the more efficient conditional GET request 948 mechanism is not available (due to no validators being present in the 949 stored response) or if transmission of the representation body is not 950 desired even if it has changed. 952 When a cache makes an inbound HEAD request for a given target URI and 953 receives a 200 (OK) response, the cache SHOULD update or invalidate 954 each of its stored GET responses that could have been selected for 955 that request (see Section 4.1). 957 For each of the stored responses that could have been selected, if 958 the stored response and HEAD response have matching values for any 959 received validator fields (ETag and Last-Modified) and, if the HEAD 960 response has a Content-Length header field, the value of Content- 961 Length matches that of the stored response, the cache SHOULD update 962 the stored response as described below; otherwise, the cache SHOULD 963 consider the stored response to be stale. 965 If a cache updates a stored response with the metadata provided in a 966 HEAD response, the cache MUST use the header fields provided in the 967 HEAD response to replace all instances of the corresponding header 968 fields in the stored response (subject to the exceptions in 969 Section 4.3.4) and append new header fields to the stored response's 970 header section unless otherwise restricted by the Cache-Control 971 header field. 973 4.4. Invalidation 975 Because unsafe request methods (Section 8.2.1 of [Semantics]) such as 976 PUT, POST or DELETE have the potential for changing state on the 977 origin server, intervening caches are required to invalidate stored 978 responses to keep their contents up to date. Invalidate means that 979 the cache will either remove all stored responses whose target URI 980 matches the given URI, or will mark them as "invalid" and in need of 981 a mandatory validation before they can be sent in response to a 982 subsequent request. 984 Note that this does not guarantee that all appropriate responses are 985 invalidated globally; a state-changing request would only invalidate 986 responses in the caches that it travels through. 988 A cache MUST invalidate the target URI (Section 6.1 of [Semantics]) 989 as well as the URI(s) in the Location and Content-Location response 990 header fields (if present) when a non-error status code is received 991 in response to an unsafe request method. 993 However, a cache MUST NOT invalidate a URI from a Location or 994 Content-Location response header field if the host part of that URI 995 differs from the host part in the target URI (Section 6.1 of 996 [Semantics]). This helps prevent denial-of-service attacks. 998 A cache MUST invalidate the target URI (Section 6.1 of [Semantics]) 999 when it receives a non-error response to a request with a method 1000 whose safety is unknown. 1002 Here, a "non-error response" is one with a 2xx (Successful) or 3xx 1003 (Redirection) status code. 1005 5. Field Definitions 1007 This section defines the syntax and semantics of HTTP fields related 1008 to caching. 1010 +---------------+-----------+--------------+ 1011 | Field Name | Status | Reference | 1012 +---------------+-----------+--------------+ 1013 | Age | standard | Section 5.1 | 1014 | Cache-Control | standard | Section 5.2 | 1015 | Expires | standard | Section 5.3 | 1016 | Pragma | standard | Section 5.4 | 1017 | Warning | obsoleted | Section 5.5 | 1018 +---------------+-----------+--------------+ 1020 Table 1 1022 5.1. Age 1024 The "Age" header field conveys the sender's estimate of the amount of 1025 time since the response was generated or successfully validated at 1026 the origin server. Age values are calculated as specified in 1027 Section 4.2.3. 1029 Age = delta-seconds 1031 The Age field value is a non-negative integer, representing time in 1032 seconds (see Section 1.3). 1034 The presence of an Age header field implies that the response was not 1035 generated or validated by the origin server for this request. 1036 However, lack of an Age header field does not imply the origin was 1037 contacted, since the response might have been received from an 1038 HTTP/1.0 cache that does not implement Age. 1040 5.2. Cache-Control 1042 The "Cache-Control" header field is used to list directives for 1043 caches along the request/response chain. Such cache directives are 1044 unidirectional in that the presence of a directive in a request does 1045 not imply that the same directive is present in the response, or to 1046 be repeated in it. 1048 See Section 5.2.3 for information about how Cache-Control directives 1049 defined elsewhere are handled. 1051 Note: Some HTTP/1.0 caches might not implement Cache-Control. 1053 A proxy, whether or not it implements a cache, MUST pass cache 1054 directives through in forwarded messages, regardless of their 1055 significance to that application, since the directives might be 1056 applicable to all recipients along the request/response chain. It is 1057 not possible to target a directive to a specific cache. 1059 Cache directives are identified by a token, to be compared case- 1060 insensitively, and have an optional argument, that can use both token 1061 and quoted-string syntax. For the directives defined below that 1062 define arguments, recipients ought to accept both forms, even if a 1063 specific form is required for generation. 1065 Cache-Control = 1#cache-directive 1067 cache-directive = token [ "=" ( token / quoted-string ) ] 1069 For the cache directives defined below, no argument is defined (nor 1070 allowed) unless stated otherwise. 1072 +------------------+-----------------------------------+ 1073 | Cache Directive | Reference | 1074 +------------------+-----------------------------------+ 1075 | max-age | Section 5.2.1.1, Section 5.2.2.9 | 1076 | max-stale | Section 5.2.1.2 | 1077 | min-fresh | Section 5.2.1.3 | 1078 | must-revalidate | Section 5.2.2.1 | 1079 | must-understand | Section 5.2.2.2 | 1080 | no-cache | Section 5.2.1.4, Section 5.2.2.3 | 1081 | no-store | Section 5.2.1.5, Section 5.2.2.4 | 1082 | no-transform | Section 5.2.1.6, Section 5.2.2.5 | 1083 | only-if-cached | Section 5.2.1.7 | 1084 | private | Section 5.2.2.7 | 1085 | proxy-revalidate | Section 5.2.2.8 | 1086 | public | Section 5.2.2.6 | 1087 | s-maxage | Section 5.2.2.10 | 1088 +------------------+-----------------------------------+ 1090 Table 2 1092 5.2.1. Request Cache-Control Directives 1094 This section defines cache request directives. They are advisory; 1095 caches MAY implement them, but are not required to. 1097 5.2.1.1. max-age 1099 Argument syntax: 1101 delta-seconds (see Section 1.3) 1103 The "max-age" request directive indicates that the client prefers a 1104 response whose age is less than or equal to the specified number of 1105 seconds. Unless the max-stale request directive is also present, the 1106 client does not wish to receive a stale response. 1108 This directive uses the token form of the argument syntax: e.g., 1109 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1110 quoted-string form. 1112 5.2.1.2. max-stale 1114 Argument syntax: 1116 delta-seconds (see Section 1.3) 1118 The "max-stale" request directive indicates that the client is 1119 willing to accept a response that has exceeded its freshness 1120 lifetime. If a value is present, then the client is willing to 1121 accept a response that has exceeded its freshness lifetime by no more 1122 than the specified number of seconds. If no value is assigned to 1123 max-stale, then the client is willing to accept a stale response of 1124 any age. 1126 This directive uses the token form of the argument syntax: e.g., 1127 'max-stale=10' not 'max-stale="10"'. A sender MUST NOT generate the 1128 quoted-string form. 1130 5.2.1.3. min-fresh 1132 Argument syntax: 1134 delta-seconds (see Section 1.3) 1136 The "min-fresh" request directive indicates that the client prefers a 1137 response whose freshness lifetime is no less than its current age 1138 plus the specified time in seconds. That is, the client wants a 1139 response that will still be fresh for at least the specified number 1140 of seconds. 1142 This directive uses the token form of the argument syntax: e.g., 1143 'min-fresh=20' not 'min-fresh="20"'. A sender MUST NOT generate the 1144 quoted-string form. 1146 5.2.1.4. no-cache 1148 The "no-cache" request directive indicates that the client prefers 1149 stored response not be used to satisfy the request without successful 1150 validation on the origin server. 1152 5.2.1.5. no-store 1154 The "no-store" request directive indicates that a cache MUST NOT 1155 store any part of either this request or any response to it. This 1156 directive applies to both private and shared caches. "MUST NOT 1157 store" in this context means that the cache MUST NOT intentionally 1158 store the information in non-volatile storage, and MUST make a best- 1159 effort attempt to remove the information from volatile storage as 1160 promptly as possible after forwarding it. 1162 This directive is NOT a reliable or sufficient mechanism for ensuring 1163 privacy. In particular, malicious or compromised caches might not 1164 recognize or obey this directive, and communications networks might 1165 be vulnerable to eavesdropping. 1167 Note that if a request containing this directive is satisfied from a 1168 cache, the no-store request directive does not apply to the already 1169 stored response. 1171 5.2.1.6. no-transform 1173 The "no-transform" request directive indicates that the client is 1174 asking for intermediares (whether or not they implement a cache) to 1175 avoid transforming the payload, as defined in Section 6.7.2 of 1176 [Semantics]. 1178 5.2.1.7. only-if-cached 1180 The "only-if-cached" request directive indicates that the client only 1181 wishes to obtain a stored response. Caches that honor this request 1182 directive SHOULD, upon receiving it, either respond using a stored 1183 response that is consistent with the other constraints of the 1184 request, or respond with a 504 (Gateway Timeout) status code. 1186 5.2.2. Response Cache-Control Directives 1188 This section defines cache response directives. A cache MUST obey 1189 the requirements of the Cache-Control directives defined in this 1190 section. 1192 5.2.2.1. must-revalidate 1194 The "must-revalidate" response directive indicates that once the 1195 response has become stale, a cache MUST NOT reuse that response to 1196 satisfy another request until it has been successfully validated by 1197 the origin, as defined by Section 4.3. 1199 The must-revalidate directive is necessary to support reliable 1200 operation for certain protocol features. In all circumstances a 1201 cache MUST obey the must-revalidate directive; in particular, if a 1202 cache is disconnected, the cache MUST generate a 504 (Gateway 1203 Timeout) response rather than reuse the stale response. 1205 The must-revalidate directive ought to be used by servers if and only 1206 if failure to validate a request on the representation could result 1207 in incorrect operation, such as a silently unexecuted financial 1208 transaction. 1210 The must-revalidate directive also permits a shared cache to reuse a 1211 response to a request containing an Authorization header field, 1212 subject to the above requirement on revalidation (Section 3.3). 1214 5.2.2.2. must-understand 1216 The "must-understand" response directive limits caching of the 1217 response to a cache that understands and conforms to the requirements 1218 for that response's status code. A cache MUST NOT store a response 1219 containing the must-understand directive if the cache does not 1220 understand the response status code. 1222 5.2.2.3. no-cache 1224 Argument syntax: 1226 #field-name 1228 The "no-cache" response directive, in its unqualified form (without 1229 an argument), indicates that the response MUST NOT be used to satisfy 1230 any other request without forwarding it for validation and receiving 1231 a successful response; see Section 4.3. 1233 This allows an origin server to prevent a cache from using the 1234 response to satisfy a request without contacting it, even by caches 1235 that have been configured to send stale responses. 1237 The qualified form of no-cache response directive, with an argument 1238 that lists one or more field names, indicates that a cache MAY use 1239 the response to satisfy a subsequent request, subject to any other 1240 restrictions on caching, if the listed header fields are excluded 1241 from the subsequent response or the subsequent response has been 1242 successfully revalidated with the origin server (updating or removing 1243 those fields). This allows an origin server to prevent the re-use of 1244 certain header fields in a response, while still allowing caching of 1245 the rest of the response. 1247 The field names given are not limited to the set of header fields 1248 defined by this specification. Field names are case-insensitive. 1250 This directive uses the quoted-string form of the argument syntax. A 1251 sender SHOULD NOT generate the token form (even if quoting appears 1252 not to be needed for single-entry lists). 1254 Note: Although it has been back-ported to many implementations, some 1255 HTTP/1.0 caches will not recognize or obey this directive. Also, the 1256 qualified form of the directive is often handled by caches as if an 1257 unqualified no-cache directive was received; i.e., the special 1258 handling for the qualified form is not widely implemented. 1260 5.2.2.4. no-store 1262 The "no-store" response directive indicates that a cache MUST NOT 1263 store any part of either the immediate request or response, and MUST 1264 NOT use the response to satisfy any other request. 1266 This directive applies to both private and shared caches. "MUST NOT 1267 store" in this context means that the cache MUST NOT intentionally 1268 store the information in non-volatile storage, and MUST make a best- 1269 effort attempt to remove the information from volatile storage as 1270 promptly as possible after forwarding it. 1272 This directive is NOT a reliable or sufficient mechanism for ensuring 1273 privacy. In particular, malicious or compromised caches might not 1274 recognize or obey this directive, and communications networks might 1275 be vulnerable to eavesdropping. 1277 5.2.2.5. no-transform 1279 The "no-transform" response directive indicates that an intermediary 1280 (regardless of whether it implements a cache) MUST NOT transform the 1281 payload, as defined in Section 6.7.2 of [Semantics]. 1283 5.2.2.6. public 1285 The "public" response directive indicates that a cache MAY store the 1286 response even if it would otherwise be prohibited, subject to the 1287 constraints defined in Section 3. In other words, public explicitly 1288 marks the response as cacheable. For example, public permits a 1289 shared cache to reuse a response to a request containing an 1290 Authorization header field (Section 3.3). 1292 Note that it is not necessary to add the public directive to a 1293 response that is already cacheable according to Section 3. 1295 If no explicit freshness information is provided on a response with 1296 the public directive, it is heuristically cacheable (Section 4.2.2). 1298 5.2.2.7. private 1300 Argument syntax: 1302 #field-name 1304 The unqualified "private" response directive indicates that a shared 1305 cache MUST NOT store the response (i.e., the response is intended for 1306 a single user). It also indicates that a private cache MAY store the 1307 response, subject the constraints defined in Section 3, even if the 1308 response would not otherwise be heuristically cacheable by a private 1309 cache. 1311 If a qualified private response directive is present, with an 1312 argument that lists one or more field names, then only the listed 1313 fields are limited to a single user: a shared cache MUST NOT store 1314 the listed fields if they are present in the original response, but 1315 MAY store the remainder of the response message without those fields, 1316 subject the constraints defined in Section 3. 1318 The field names given are not limited to the set of header fields 1319 defined by this specification. Field names are case-insensitive. 1321 This directive uses the quoted-string form of the argument syntax. A 1322 sender SHOULD NOT generate the token form (even if quoting appears 1323 not to be needed for single-entry lists). 1325 Note: This usage of the word "private" only controls where the 1326 response can be stored; it cannot ensure the privacy of the message 1327 content. Also, the qualified form of the directive is often handled 1328 by caches as if an unqualified private directive was received; i.e., 1329 the special handling for the qualified form is not widely 1330 implemented. 1332 5.2.2.8. proxy-revalidate 1334 The "proxy-revalidate" response directive indicates that once the 1335 response has become stale, a shared cache MUST NOT reuse that 1336 response to satisfy another request until it has been successfully 1337 validated by the origin, as defined by Section 4.3. This is 1338 analogous to must-revalidate (Section 5.2.2.1), except that proxy- 1339 revalidate does not apply to private caches. 1341 Note that "proxy-revalidate" on its own does not imply that a 1342 response is cacheable. For example, it might be combined with the 1343 public directive (Section 5.2.2.6), allowing the response to be 1344 cached while requiring only a shared cache to revalidate when stale. 1346 5.2.2.9. max-age 1348 Argument syntax: 1350 delta-seconds (see Section 1.3) 1352 The "max-age" response directive indicates that the response is to be 1353 considered stale after its age is greater than the specified number 1354 of seconds. 1356 This directive uses the token form of the argument syntax: e.g., 1357 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1358 quoted-string form. 1360 5.2.2.10. s-maxage 1362 Argument syntax: 1364 delta-seconds (see Section 1.3) 1366 The "s-maxage" response directive indicates that, for a shared cache, 1367 the maximum age specified by this directive overrides the maximum age 1368 specified by either the max-age directive or the Expires header 1369 field. 1371 The s-maxage directive incorporates the proxy-revalidate 1372 (Section 5.2.2.8) response directive's semantics for a shared cache. 1373 A shared cache MUST NOT reuse a stale response with s-maxage to 1374 satisfy another request until it has been successfully validated by 1375 the origin, as defined by Section 4.3. This directive also permits a 1376 shared cache to reuse a response to a request containing an 1377 Authorization header field, subject to the above requirements on 1378 maximum age and revalidation (Section 3.3). 1380 This directive uses the token form of the argument syntax: e.g., 1381 's-maxage=10' not 's-maxage="10"'. A sender MUST NOT generate the 1382 quoted-string form. 1384 5.2.3. Cache Control Extensions 1386 The Cache-Control header field can be extended through the use of one 1387 or more cache-extension tokens, each with an optional value. A cache 1388 MUST ignore unrecognized cache directives. 1390 Informational extensions (those that do not require a change in cache 1391 behavior) can be added without changing the semantics of other 1392 directives. 1394 Behavioral extensions are designed to work by acting as modifiers to 1395 the existing base of cache directives. Both the new directive and 1396 the old directive are supplied, such that applications that do not 1397 understand the new directive will default to the behavior specified 1398 by the old directive, and those that understand the new directive 1399 will recognize it as modifying the requirements associated with the 1400 old directive. In this way, extensions to the existing cache-control 1401 directives can be made without breaking deployed caches. 1403 For example, consider a hypothetical new response directive called 1404 "community" that acts as a modifier to the private directive: in 1405 addition to private caches, any cache that is shared only by members 1406 of the named community is allowed to cache the response. An origin 1407 server wishing to allow the UCI community to use an otherwise private 1408 response in their shared cache(s) could do so by including 1410 Cache-Control: private, community="UCI" 1412 A cache that recognizes such a community cache-extension could 1413 broaden its behavior in accordance with that extension. A cache that 1414 does not recognize the community cache-extension would ignore it and 1415 adhere to the private directive. 1417 New extension directives ought to consider defining: 1419 o What it means for a directive to be specified multiple times, 1421 o When the directive does not take an argument, what it means when 1422 an argument is present, 1424 o When the directive requires an argument, what it means when it is 1425 missing, 1427 o Whether the directive is specific to requests, responses, or able 1428 to be used in either. 1430 5.2.4. Cache Directive Registry 1432 The "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" 1433 defines the namespace for the cache directives. It has been created 1434 and is now maintained at . 1437 A registration MUST include the following fields: 1439 o Cache Directive Name 1441 o Pointer to specification text 1443 Values to be added to this namespace require IETF Review (see 1444 [RFC8126], Section 4.8). 1446 5.3. Expires 1448 The "Expires" header field gives the date/time after which the 1449 response is considered stale. See Section 4.2 for further discussion 1450 of the freshness model. 1452 The presence of an Expires field does not imply that the original 1453 resource will change or cease to exist at, before, or after that 1454 time. 1456 The Expires value is an HTTP-date timestamp, as defined in 1457 Section 5.4.1.5 of [Semantics]. 1459 Expires = HTTP-date 1461 For example 1463 Expires: Thu, 01 Dec 1994 16:00:00 GMT 1465 A cache recipient MUST interpret invalid date formats, especially the 1466 value "0", as representing a time in the past (i.e., "already 1467 expired"). 1469 If a response includes a Cache-Control field with the max-age 1470 directive (Section 5.2.2.9), a recipient MUST ignore the Expires 1471 field. Likewise, if a response includes the s-maxage directive 1472 (Section 5.2.2.10), a shared cache recipient MUST ignore the Expires 1473 field. In both these cases, the value in Expires is only intended 1474 for recipients that have not yet implemented the Cache-Control field. 1476 An origin server without a clock MUST NOT generate an Expires field 1477 unless its value represents a fixed time in the past (always expired) 1478 or its value has been associated with the resource by a system or 1479 user with a reliable clock. 1481 Historically, HTTP required the Expires field value to be no more 1482 than a year in the future. While longer freshness lifetimes are no 1483 longer prohibited, extremely large values have been demonstrated to 1484 cause problems (e.g., clock overflows due to use of 32-bit integers 1485 for time values), and many caches will evict a response far sooner 1486 than that. 1488 5.4. Pragma 1490 The "Pragma" header field was defined for HTTP/1.0 caches, so that 1491 clients could specify a "no-cache" request (as Cache-Control was not 1492 defined until HTTP/1.1). 1494 However, support for Cache-Control is now widespread. As a result, 1495 this specification deprecates Pragma. 1497 Note: Because the meaning of "Pragma: no-cache" in responses was 1498 never specified, it does not provide a reliable replacement for 1499 "Cache-Control: no-cache" in them. 1501 5.5. Warning 1503 The "Warning" header field was used to carry additional information 1504 about the status or transformation of a message that might not be 1505 reflected in the status code. This specification obsoletes it, as it 1506 is not widely generated or surfaced to users. The information it 1507 carried can be gleaned from examining other header fields, such as 1508 Age. 1510 6. Relationship to Applications 1512 Applications using HTTP often specify additional forms of caching. 1513 For example, Web browsers often have history mechanisms such as 1514 "Back" buttons that can be used to redisplay a representation 1515 retrieved earlier in a session. 1517 Likewise, some Web browsers implement caching of images and other 1518 assets within a page view; they may or may not honor HTTP caching 1519 semantics. 1521 The requirements in this specification do not necessarily apply to 1522 how applications use data after it is retrieved from a HTTP cache. 1523 That is, a history mechanism can display a previous representation 1524 even if it has expired, and an application can use cached data in 1525 other ways beyond its freshness lifetime. 1527 This does not prohibit the application from taking HTTP caching into 1528 account; for example, a history mechanism might tell the user that a 1529 view is stale, or it might honor cache directives (e.g., Cache- 1530 Control: no-store). 1532 7. Security Considerations 1534 This section is meant to inform developers, information providers, 1535 and users of known security concerns specific to HTTP caching. More 1536 general security considerations are addressed in HTTP messaging 1537 [Messaging] and semantics [Semantics]. 1539 Caches expose additional potential vulnerabilities, since the 1540 contents of the cache represent an attractive target for malicious 1541 exploitation. Because cache contents persist after an HTTP request 1542 is complete, an attack on the cache can reveal information long after 1543 a user believes that the information has been removed from the 1544 network. Therefore, cache contents need to be protected as sensitive 1545 information. 1547 7.1. Cache Poisoning 1549 Various attacks might be amplified by being stored in a shared cache. 1550 Such "cache poisoning" attacks use the cache to distribute a 1551 malicious payload to many clients, and are especially effective when 1552 an attacker can use implementation flaws, elevated privileges, or 1553 other techniques to insert such a response into a cache. 1555 One common attack vector for cache poisoning is to exploit 1556 differences in message parsing on proxies and in user agents; see 1557 Section 6.3 of [Messaging] for the relevant requirements regarding 1558 HTTP/1.1. 1560 7.2. Timing Attacks 1562 Because one of the primary uses of a cache is to optimise 1563 performance, its use can "leak" information about what resources have 1564 been previously requested. 1566 For example, if a user visits a site and their browser caches some of 1567 its responses, and then navigates to a second site, that site can 1568 attempt to load responses that it knows exists on the first site. If 1569 they load very quickly, it can be assumed that the user has visited 1570 that site, or even a specific page on it. 1572 Such "timing attacks" can be mitigated by adding more information to 1573 the cache key, such as the identity of the referring site (to prevent 1574 the attack described above). This is sometimes called "double 1575 keying." 1577 7.3. Caching of Sensitive Information 1579 Implementation and deployment flaws (as well as misunderstanding of 1580 cache operation) might lead to caching of sensitive information 1581 (e.g., authentication credentials) that is thought to be private, 1582 exposing it to unauthorized parties. 1584 Note that the Set-Cookie response header field [RFC6265] does not 1585 inhibit caching; a cacheable response with a Set-Cookie header field 1586 can be (and often is) used to satisfy subsequent requests to caches. 1587 Servers who wish to control caching of these responses are encouraged 1588 to emit appropriate Cache-Control response header fields. 1590 8. IANA Considerations 1592 The change controller for the following registrations is: "IETF 1593 (iesg@ietf.org) - Internet Engineering Task Force". 1595 8.1. Field Registration 1597 Please update the "Hypertext Transfer Protocol (HTTP) Field Name 1598 Registry" at with the 1599 field names listed in the two tables of Section 5. 1601 8.2. Cache Directive Registration 1603 Please update the "Hypertext Transfer Protocol (HTTP) Cache Directive 1604 Registry" at 1605 with the registration procedure of Section 5.2.4 and the cache 1606 directive names summarized in the table of Section 5.2. 1608 8.3. Warn Code Registry 1610 Please add a note to the "Hypertext Transfer Protocol (HTTP) Warn 1611 Codes" registry at 1612 to the effect that Warning is obsoleted. 1614 9. References 1616 9.1. Normative References 1618 [Messaging] 1619 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1620 Ed., "HTTP/1.1 Messaging", draft-ietf-httpbis-messaging-09 1621 (work in progress), July 2020. 1623 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1624 Requirement Levels", BCP 14, RFC 2119, 1625 DOI 10.17487/RFC2119, March 1997, 1626 . 1628 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1629 Resource Identifier (URI): Generic Syntax", STD 66, 1630 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1631 . 1633 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1634 Specifications: ABNF", STD 68, RFC 5234, 1635 DOI 10.17487/RFC5234, January 2008, 1636 . 1638 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 1639 RFC 7405, DOI 10.17487/RFC7405, December 2014, 1640 . 1642 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1643 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1644 May 2017, . 1646 [Semantics] 1647 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1648 Ed., "HTTP Semantics", draft-ietf-httpbis-semantics-09 1649 (work in progress), July 2020. 1651 [USASCII] American National Standards Institute, "Coded Character 1652 Set -- 7-bit American Standard Code for Information 1653 Interchange", ANSI X3.4, 1986. 1655 9.2. Informative References 1657 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1658 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1659 Transfer Protocol -- HTTP/1.1", RFC 2616, 1660 DOI 10.17487/RFC2616, June 1999, 1661 . 1663 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 1664 Content", RFC 5861, DOI 10.17487/RFC5861, April 2010, 1665 . 1667 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1668 "Network Time Protocol Version 4: Protocol and Algorithms 1669 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1670 . 1672 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1673 DOI 10.17487/RFC6265, April 2011, 1674 . 1676 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1677 Ed., "Hypertext Transfer Protocol (HTTP): Caching", 1678 RFC 7234, DOI 10.17487/RFC7234, June 2014, 1679 . 1681 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1682 Writing an IANA Considerations Section in RFCs", BCP 26, 1683 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1684 . 1686 Appendix A. Collected ABNF 1688 In the collected ABNF below, list rules are expanded as per 1689 Section 5.5.1 of [Semantics]. 1691 Age = delta-seconds 1693 Cache-Control = cache-directive *( OWS "," OWS cache-directive ) 1695 Expires = HTTP-date 1697 HTTP-date = 1699 OWS = 1701 cache-directive = token [ "=" ( token / quoted-string ) ] 1703 delta-seconds = 1*DIGIT 1705 field-name = 1707 quoted-string = 1709 token = 1711 Appendix B. Changes from RFC 7234 1713 Some cache directives defined by this specification now have stronger 1714 prohibitions against generating the quoted form of their values, 1715 since this has been found to create interoperability problems. 1716 Consumers of extension cache directives are no longer required to 1717 accept both token and quoted-string forms, but they still need to 1718 properly parse them for unknown extensions. (Section 5.2) 1720 The "public" and "private" cache directives were clarified, so that 1721 they do not make responses reusable under any condition. 1722 (Section 5.2.2) 1724 The "must-understand" cache directive was introduced; caches are no 1725 longer required to understand the semantics of new response status 1726 codes unless it is present. (Section 5.2.2.2) 1728 The Warning response header was obsoleted. Much of the information 1729 supported by Warning could be gleaned by examining the response, and 1730 the remaining warn-codes -- although potentially useful -- were 1731 entirely advisory. In practice, Warning was not added by caches or 1732 intermediaries. (Section 5.5) 1734 Appendix C. Change Log 1736 This section is to be removed before publishing as an RFC. 1738 C.1. Between RFC7234 and draft 00 1740 The changes were purely editorial: 1742 o Change boilerplate and abstract to indicate the "draft" status, 1743 and update references to ancestor specifications. 1745 o Remove version "1.1" from document title, indicating that this 1746 specification applies to all HTTP versions. 1748 o Adjust historical notes. 1750 o Update links to sibling specifications. 1752 o Replace sections listing changes from RFC 2616 by new empty 1753 sections referring to RFC 723x. 1755 o Remove acknowledgements specific to RFC 723x. 1757 o Move "Acknowledgements" to the very end and make them unnumbered. 1759 C.2. Since draft-ietf-httpbis-cache-00 1761 The changes are purely editorial: 1763 o Moved all extensibility tips, registration procedures, and 1764 registry tables from the IANA considerations to normative 1765 sections, reducing the IANA considerations to just instructions 1766 that will be removed prior to publication as an RFC. 1768 C.3. Since draft-ietf-httpbis-cache-01 1770 o Cite RFC 8126 instead of RFC 5226 () 1773 o In Section 5.4, misleading statement about the relation between 1774 Pragma and Cache-Control (, ) 1777 C.4. Since draft-ietf-httpbis-cache-02 1779 o In Section 3, explain that only final responses are cacheable 1780 () 1782 o In Section 5.2.2, clarify what responses various directives apply 1783 to () 1785 o In Section 4.3.1, clarify the source of validators in conditional 1786 requests () 1788 o Revise Section 6 to apply to more than just History Lists 1789 () 1791 o In Section 5.5, deprecated "Warning" header field 1792 () 1794 o In Section 3.3, remove a spurious note 1795 () 1797 C.5. Since draft-ietf-httpbis-cache-03 1799 o In Section 2, define what a disconnected cache is 1800 () 1802 o In Section 4, clarify language around how to select a response 1803 when more than one matches () 1806 o in Section 4.2.4, mention stale-while-revalidate and stale-if- 1807 error () 1809 o Remove requirements around cache request directives 1810 () 1812 o Deprecate Pragma () 1815 o In Section 3.3 and Section 5.2.2, note effect of some directives 1816 on authenticated requests () 1819 C.6. Since draft-ietf-httpbis-cache-04 1821 o In Section 5.2, remove the registrations for stale-if-error and 1822 stale-while-revalidate which happened in RFC 7234 1823 () 1825 C.7. Since draft-ietf-httpbis-cache-05 1827 o In Section 3.2, clarify how weakly framed content is considered 1828 for purposes of completeness () 1831 o Throughout, describe Vary and cache key operations more clearly 1832 () 1834 o In Section 3, remove concept of "cacheable methods" in favor of 1835 prose (, 1836 ) 1838 o Refactored Section 7, and added a section on timing attacks 1839 () 1841 o Changed "cacheable by default" to "heuristically cacheable" 1842 throughout () 1844 C.8. Since draft-ietf-httpbis-cache-06 1846 o In Section 3 and Section 5.2.2.2, change response cacheability to 1847 only require understanding the response status code if the must- 1848 understand cache directive is present () 1851 o Change requirements for handling different forms of cache 1852 directives in Section 5.2 () 1855 o Fix typo in Section 5.2.2.10 () 1858 o In Section 5.2.2.6 and Section 5.2.2.7, clarify "private" and 1859 "public" so that they do not override all other cache directives 1860 () 1862 o In Section 3, distinguish between private with and without 1863 qualifying headers () 1866 o In Section 4.1, clarify that any "*" as a member of Vary will 1867 disable caching () 1869 o In Section 1.1, reference RFC 8174 as well 1870 () 1872 C.9. Since draft-ietf-httpbis-cache-07 1874 o Throughout, replace "effective request URI", "request-target" and 1875 similar with "target URI" () 1878 o In Section 5.2.2.6 and Section 5.2.2.7, make it clear that these 1879 directives do not ignore other requirements for caching 1880 () 1882 o In Section 3.2, move definition of "complete" into semantics 1883 () 1885 C.10. Since draft-ietf-httpbis-cache-08 1887 o Appendix A now uses the sender variant of the "#" list expansion 1888 () 1890 Index 1892 A 1893 Age header field 22 1894 age 12 1896 C 1897 Cache-Control header field 23 1898 cache 4 1899 cache key 6 1901 E 1902 Expires header field 31 1903 explicit expiration time 12 1905 F 1906 Fields 1907 Age 22 1908 Cache-Control 23 1909 Expires 31 1910 Pragma 32 1911 Warning 33 1912 fresh 12 1913 freshness lifetime 12 1915 G 1916 Grammar 1917 Age 22 1918 ALPHA 5 1919 Cache-Control 23 1920 cache-directive 23 1921 CR 5 1922 CRLF 5 1923 CTL 5 1924 delta-seconds 6 1925 DIGIT 5 1926 DQUOTE 5 1927 Expires 32 1928 HEXDIG 5 1929 HTAB 5 1930 LF 5 1931 OCTET 5 1932 SP 5 1933 VCHAR 5 1935 H 1936 Header Fields 1937 Age 22 1938 Cache-Control 23 1939 Expires 31 1940 Pragma 32 1941 Warning 33 1942 heuristic expiration time 12 1943 heuristically cacheable 14 1945 M 1946 max-age (cache directive) 24, 29 1947 max-stale (cache directive) 24 1948 min-fresh (cache directive) 25 1949 must-revalidate (cache directive) 26 1950 must-understand (cache directive) 27 1952 N 1953 no-cache (cache directive) 25, 27 1954 no-store (cache directive) 25, 28 1955 no-transform (cache directive) 26, 28 1957 O 1958 only-if-cached (cache directive) 26 1960 P 1961 Pragma header field 32 1962 private (cache directive) 28 1963 private cache 4 1964 proxy-revalidate (cache directive) 29 1965 public (cache directive) 28 1967 S 1968 s-maxage (cache directive) 30 1969 shared cache 4 1970 stale 12 1971 strong validator 20 1973 V 1974 validator 17 1976 W 1977 Warning header field 33 1979 Acknowledgments 1981 See Appendix "Acknowledgments" of [Semantics]. 1983 Authors' Addresses 1985 Roy T. Fielding (editor) 1986 Adobe 1987 345 Park Ave 1988 San Jose, CA 95110 1989 United States of America 1991 EMail: fielding@gbiv.com 1992 URI: https://roy.gbiv.com/ 1994 Mark Nottingham (editor) 1995 Fastly 1997 EMail: mnot@mnot.net 1998 URI: https://www.mnot.net/ 2000 Julian F. Reschke (editor) 2001 greenbytes GmbH 2002 Hafenweg 16 2003 Muenster 48155 2004 Germany 2006 EMail: julian.reschke@greenbytes.de 2007 URI: https://greenbytes.de/tech/webdav/