idnits 2.17.1 draft-ietf-httpbis-cache-08.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 (May 26, 2020) is 1423 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 1627, but no explicit reference was found in the text == Unused Reference: 'RFC7234' is defined on line 1675, but no explicit reference was found in the text == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-messaging-08 -- Possible downref: Normative reference to a draft: ref. 'Messaging' == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-semantics-08 -- 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) -- Obsolete informational reference (is this intentional?): RFC 7234 (Obsoleted by RFC 9111) Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 7 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: November 27, 2020 J. Reschke, Ed. 7 greenbytes 8 May 26, 2020 10 HTTP Caching 11 draft-ietf-httpbis-cache-08 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.9. 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 November 27, 2020. 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 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 159 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 43 160 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 162 1. Introduction 164 The Hypertext Transfer Protocol (HTTP) is a stateless application- 165 level request/response protocol that uses extensible semantics and 166 self-descriptive messages for flexible interaction with network-based 167 hypertext information systems. HTTP is defined by a series of 168 documents that collectively form the HTTP/1.1 specification: 170 o "HTTP Semantics" [Semantics] 172 o "HTTP Caching" (this document) 174 o "HTTP/1.1 Messaging" [Messaging] 176 HTTP is typically used for distributed information systems, where 177 performance can be improved by the use of response caches. This 178 document defines aspects of HTTP related to caching and reusing 179 response messages. 181 An HTTP cache is a local store of response messages and the subsystem 182 that controls storage, retrieval, and deletion of messages in it. A 183 cache stores cacheable responses in order to reduce the response time 184 and network bandwidth consumption on future, equivalent requests. 185 Any client or server MAY employ a cache, though a cache cannot be 186 used by a server that is acting as a tunnel. 188 A shared cache is a cache that stores responses to be reused by more 189 than one user; shared caches are usually (but not always) deployed as 190 a part of an intermediary. A private cache, in contrast, is 191 dedicated to a single user; often, they are deployed as a component 192 of a user agent. 194 The goal of caching in HTTP is to significantly improve performance 195 by reusing a prior response message to satisfy a current request. A 196 stored response is considered "fresh", as defined in Section 4.2, if 197 the response can be reused without "validation" (checking with the 198 origin server to see if the cached response remains valid for this 199 request). A fresh response can therefore reduce both latency and 200 network overhead each time it is reused. When a cached response is 201 not fresh, it might still be reusable if it can be freshened by 202 validation (Section 4.3) or if the origin is unavailable 203 (Section 4.2.4). 205 This document obsoletes RFC 7234, with the changes being summarized 206 in Appendix B. 208 1.1. Requirements Notation 210 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 211 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 212 "OPTIONAL" in this document are to be interpreted as described in BCP 213 14 [RFC2119] [RFC8174] when, and only when, they appear in all 214 capitals, as shown here. 216 Conformance criteria and considerations regarding error handling are 217 defined in Section 3 of [Semantics]. 219 1.2. Syntax Notation 221 This specification uses the Augmented Backus-Naur Form (ABNF) 222 notation of [RFC5234], extended with the notation for case- 223 sensitivity in strings defined in [RFC7405]. 225 It also uses a list extension, defined in Section 4.5 of [Semantics], 226 that allows for compact definition of comma-separated lists using a 227 '#' operator (similar to how the '*' operator indicates repetition). 228 Appendix A shows the collected grammar with all list operators 229 expanded to standard ABNF notation. 231 The following core rules are included by reference, as defined in 232 [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF 233 (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), 234 HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line 235 feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any 236 visible [USASCII] character). 238 The rules below are defined in [Semantics]: 240 HTTP-date = 241 OWS = 242 field-name = 243 quoted-string = 244 token = 246 1.3. Delta Seconds 248 The delta-seconds rule specifies a non-negative integer, representing 249 time in seconds. 251 delta-seconds = 1*DIGIT 253 A recipient parsing a delta-seconds value and converting it to binary 254 form ought to use an arithmetic type of at least 31 bits of non- 255 negative integer range. If a cache receives a delta-seconds value 256 greater than the greatest integer it can represent, or if any of its 257 subsequent calculations overflows, the cache MUST consider the value 258 to be either 2147483648 (2^31) or the greatest positive integer it 259 can conveniently represent. 261 Note: The value 2147483648 is here for historical reasons, 262 effectively represents infinity (over 68 years), and does not need 263 to be stored in binary form; an implementation could produce it as 264 a canned string if any overflow occurs, even if the calculations 265 are performed with an arithmetic type incapable of directly 266 representing that number. What matters here is that an overflow 267 be detected and not treated as a negative value in later 268 calculations. 270 2. Overview of Cache Operation 272 Proper cache operation preserves the semantics of HTTP transfers 273 ([Semantics]) while reducing the transfer of information already held 274 in the cache. Although caching is an entirely OPTIONAL feature of 275 HTTP, it can be assumed that reusing a cached response is desirable 276 and that such reuse is the default behavior when no requirement or 277 local configuration prevents it. Therefore, HTTP cache requirements 278 are focused on preventing a cache from either storing a non-reusable 279 response or reusing a stored response inappropriately, rather than 280 mandating that caches always store and reuse particular responses. 282 The base cache key consists of the request method and target URI used 283 to retrieve the stored response; the method determines under which 284 circumstances that response can be used to satisfy a request. 285 However, many HTTP caches in common use today only cache GET 286 responses, and therefore only use the URI as the cache key, 287 forwarding other methods. 289 If a request target is subject to content negotiation, the cache 290 might store multiple responses for it. Caches differentiate these 291 responses by incorporating values of the original request's selecting 292 header fields into the cache key as well, as per Section 4.1. 294 Furthermore, caches might incorporate additional material into the 295 cache key. For example, user agent caches might include the 296 referring site's identity, thereby "double keying" the cache to avoid 297 some privacy risks (see Section 7.2). 299 Most commonly, caches store the successful result of a retrieval 300 request: i.e., a 200 (OK) response to a GET request, which contains a 301 representation of the target resource (Section 7.3.1 of [Semantics]). 302 However, it is also possible to store redirects, negative results 303 (e.g., 404 (Not Found)), incomplete results (e.g., 206 (Partial 304 Content)), and responses to methods other than GET if the method's 305 definition allows such caching and defines something suitable for use 306 as a cache key. 308 A cache is disconnected when it cannot contact the origin server or 309 otherwise find a forward path for a given request. A disconnected 310 cache can serve stale responses in some circumstances 311 (Section 4.2.4). 313 3. Storing Responses in Caches 315 A cache MUST NOT store a response to a request unless: 317 o the request method is understood by the cache; 319 o the response status code is final (see Section 9 of [Semantics]); 321 o if the response status code is 206 or 304, or the "must- 322 understand" cache directive (see Section 5.2) is present: the 323 cache understands the response status code; 325 o the "no-store" cache directive is not present in the response (see 326 Section 5.2); 328 o if the cache is shared: the "private" response directive is either 329 not present or allows a modified response to be stored by a shared 330 cache; see Section 5.2.2.7); 332 o if the cache is shared: the Authorization header field is not 333 present in the request (see Section 8.5.3 of [Semantics]) or a 334 response directive is present that explicitly allows shared 335 caching (see Section 3.3); and, 337 o the response contains at least one of: 339 * a public response directive (see Section 5.2.2.6); 341 * a private response directive, if the cache is not shared (see 342 Section 5.2.2.7); 344 * an Expires header field (see Section 5.3); 346 * a max-age response directive (see Section 5.2.2.9); 348 * if the cache is shared, an s-maxage response directive (see 349 Section 5.2.2.10); 351 * a Cache Control Extension that allows it to be cached (see 352 Section 5.2.3); or, 354 * a status code that is defined as heuristically cacheable (see 355 Section 4.2.2). 357 Note that any of the requirements listed above can be overridden by a 358 cache-control extension; see Section 5.2.3. 360 In this context, a cache has "understood" a request method or a 361 response status code if it recognizes it and implements all specified 362 caching-related behavior. 364 Note that, in normal operation, some caches will not store a response 365 that has neither a cache validator nor an explicit expiration time, 366 as such responses are not usually useful to store. However, caches 367 are not prohibited from storing such responses. 369 3.1. Storing Header and Trailer Fields 371 Caches MUST include all received header fields -- including 372 unrecognised ones -- when storing a response; this assures that new 373 HTTP header fields can be successfully deployed. However, the 374 following exceptions are made: 376 o The Connection header field and fields whose names are listed in 377 it are required by Section 13.1 of [Semantics] to be removed 378 before forwarding the message. This MAY be implemented by doing 379 so before storage. 381 o Likewise, some fields' semantics require them to be removed before 382 forwarding the message, and this MAY be implemented by doing so 383 before storage; see Section 13.1 of [Semantics] for some examples. 385 o Header fields that are specific to a client's proxy configuration 386 MUST NOT be stored, unless the cache incorporates the identity of 387 the proxy into the cache key. Effectively, this is limited to 388 Proxy-Authenticate Section 10.3.2 of [Semantics], Proxy- 389 Authentication-Info Section 10.3.4 of [Semantics], and Proxy- 390 Authorization Section 8.5.4 of [Semantics]. 392 Caches MAY either store trailer fields separately from header fields, 393 or discard them. Caches MUST NOT combine trailer fields with header 394 fields. 396 3.2. Storing Incomplete Responses 398 If the request method is GET, the response status code is 200 (OK), 399 and the entire response header section has been received, a cache MAY 400 store a response body that is not complete (Section 2.1 of 401 [Semantics]) if the stored response is recorded as being incomplete. 402 Likewise, a 206 (Partial Content) response MAY be stored as if it 403 were an incomplete 200 (OK) response. However, a cache MUST NOT 404 store incomplete or partial-content responses if it does not support 405 the Range and Content-Range header fields or if it does not 406 understand the range units used in those fields. 408 A cache MAY complete a stored incomplete response by making a 409 subsequent range request (Section 8.3 of [Semantics]) and combining 410 the successful response with the stored response, as defined in 411 Section 3.4. A cache MUST NOT use an incomplete response to answer 412 requests unless the response has been made complete or the request is 413 partial and specifies a range that is wholly within the incomplete 414 response. A cache MUST NOT send a partial response to a client 415 without explicitly marking it as such using the 206 (Partial Content) 416 status code. 418 3.3. Storing Responses to Authenticated Requests 420 A shared cache MUST NOT use a cached response to a request with an 421 Authorization header field (Section 8.5.3 of [Semantics]) to satisfy 422 any subsequent request unless the response contains a Cache-Control 423 field with a response directive (Section 5.2.2) that allows it to be 424 stored by a shared cache and the cache conforms to the requirements 425 of that directive for that response. 427 In this specification, the following response directives have such an 428 effect: must-revalidate (Section 5.2.2.1), public (Section 5.2.2.6), 429 and s-maxage (Section 5.2.2.10). 431 3.4. Combining Partial Content 433 A response might transfer only a partial representation if the 434 connection closed prematurely or if the request used one or more 435 Range specifiers (Section 8.3 of [Semantics]). After several such 436 transfers, a cache might have received several ranges of the same 437 representation. A cache MAY combine these ranges into a single 438 stored response, and reuse that response to satisfy later requests, 439 if they all share the same strong validator and the cache complies 440 with the client requirements in Section 9.3.7.3 of [Semantics]. 442 When combining the new response with one or more stored responses, a 443 cache MUST use the header fields provided in the new response, aside 444 from Content-Range, to replace all instances of the corresponding 445 header fields in the stored response. 447 4. Constructing Responses from Caches 449 When presented with a request, a cache MUST NOT reuse a stored 450 response, unless: 452 o The presented target URI (Section 5.1 of [Semantics]) and that of 453 the stored response match, and 455 o the request method associated with the stored response allows it 456 to be used for the presented request, and 458 o selecting header fields nominated by the stored response (if any) 459 match those presented (see Section 4.1), and 461 o the stored response does not contain the no-cache cache directive 462 (Section 5.2.2.3), unless it is successfully validated 463 (Section 4.3), and 465 o the stored response is either: 467 * fresh (see Section 4.2), or 469 * allowed to be served stale (see Section 4.2.4), or 471 * successfully validated (see Section 4.3). 473 Note that any of the requirements listed above can be overridden by a 474 cache-control extension; see Section 5.2.3. 476 When a stored response is used to satisfy a request without 477 validation, a cache MUST generate an Age header field (Section 5.1), 478 replacing any present in the response with a value equal to the 479 stored response's current_age; see Section 4.2.3. 481 A cache MUST write through requests with methods that are unsafe 482 (Section 7.2.1 of [Semantics]) to the origin server; i.e., a cache is 483 not allowed to generate a reply to such a request before having 484 forwarded the request and having received a corresponding response. 486 Also, note that unsafe requests might invalidate already-stored 487 responses; see Section 4.4. 489 When more than one suitable response is stored, a cache MUST use the 490 most recent one (as determined by the Date header field). It can 491 also forward the request with "Cache-Control: max-age=0" or "Cache- 492 Control: no-cache" to disambiguate which response to use. 494 A cache that does not have a clock available MUST NOT use stored 495 responses without revalidating them upon every use. 497 4.1. Calculating Cache Keys with Vary 499 When a cache receives a request that can be satisfied by a stored 500 response that has a Vary header field (Section 10.1.4 of 501 [Semantics]), it MUST NOT use that response unless all of the 502 selecting header fields nominated by the Vary header field match in 503 both the original request (i.e., that associated with the stored 504 response), and the presented request. 506 The selecting header fields from two requests are defined to match if 507 and only if those in the first request can be transformed to those in 508 the second request by applying any of the following: 510 o adding or removing whitespace, where allowed in the header field's 511 syntax 513 o combining multiple header fields with the same field name (see 514 Section 4.4 of [Semantics]) 516 o normalizing both header field values in a way that is known to 517 have identical semantics, according to the header field's 518 specification (e.g., reordering field values when order is not 519 significant; case-normalization, where values are defined to be 520 case-insensitive) 522 If (after any normalization that might take place) a header field is 523 absent from a request, it can only match another request if it is 524 also absent there. 526 A Vary header field value containing a member "*" always fails to 527 match. 529 The stored response with matching selecting header fields is known as 530 the selected response. 532 If multiple selected responses are available (potentially including 533 responses without a Vary header field), the cache will need to choose 534 one to use. When a selecting header field has a known mechanism for 535 doing so (e.g., qvalues on Accept and similar request header fields), 536 that mechanism MAY be used to select preferred responses; of the 537 remainder, the most recent response (as determined by the Date header 538 field) is used, as per Section 4. 540 Note that in practice, some resources might send the Vary header 541 field on responses inconsistently. When a cache has multiple 542 responses for a given target URI, and one or more omits the Vary 543 header field, it SHOULD use the most recent non-empty value available 544 to select an appropriate response for the request. 546 If no selected response is available, the cache cannot satisfy the 547 presented request. Typically, it is forwarded to the origin server 548 in a (possibly conditional; see Section 4.3) request. 550 4.2. Freshness 552 A fresh response is one whose age has not yet exceeded its freshness 553 lifetime. Conversely, a stale response is one where it has. 555 A response's freshness lifetime is the length of time between its 556 generation by the origin server and its expiration time. An explicit 557 expiration time is the time at which the origin server intends that a 558 stored response can no longer be used by a cache without further 559 validation, whereas a heuristic expiration time is assigned by a 560 cache when no explicit expiration time is available. 562 A response's age is the time that has passed since it was generated 563 by, or successfully validated with, the origin server. 565 When a response is "fresh" in the cache, it can be used to satisfy 566 subsequent requests without contacting the origin server, thereby 567 improving efficiency. 569 The primary mechanism for determining freshness is for an origin 570 server to provide an explicit expiration time in the future, using 571 either the Expires header field (Section 5.3) or the max-age response 572 directive (Section 5.2.2.9). Generally, origin servers will assign 573 future explicit expiration times to responses in the belief that the 574 representation is not likely to change in a semantically significant 575 way before the expiration time is reached. 577 If an origin server wishes to force a cache to validate every 578 request, it can assign an explicit expiration time in the past to 579 indicate that the response is already stale. Compliant caches will 580 normally validate a stale cached response before reusing it for 581 subsequent requests (see Section 4.2.4). 583 Since origin servers do not always provide explicit expiration times, 584 caches are also allowed to use a heuristic to determine an expiration 585 time under certain circumstances (see Section 4.2.2). 587 The calculation to determine if a response is fresh is: 589 response_is_fresh = (freshness_lifetime > current_age) 591 freshness_lifetime is defined in Section 4.2.1; current_age is 592 defined in Section 4.2.3. 594 Clients can send the max-age or min-fresh request directives 595 (Section 5.2.1) to constrain or relax freshness calculations for the 596 corresponding response. However, caches are not required to honor 597 them. 599 When calculating freshness, to avoid common problems in date parsing: 601 o Although all date formats are specified to be case-sensitive, a 602 cache recipient SHOULD match day, week, and time-zone names case- 603 insensitively. 605 o If a cache recipient's internal implementation of time has less 606 resolution than the value of an HTTP-date, the recipient MUST 607 internally represent a parsed Expires date as the nearest time 608 equal to or earlier than the received value. 610 o A cache recipient MUST NOT allow local time zones to influence the 611 calculation or comparison of an age or expiration time. 613 o A cache recipient SHOULD consider a date with a zone abbreviation 614 other than GMT or UTC to be invalid for calculating expiration. 616 Note that freshness applies only to cache operation; it cannot be 617 used to force a user agent to refresh its display or reload a 618 resource. See Section 6 for an explanation of the difference between 619 caches and history mechanisms. 621 4.2.1. Calculating Freshness Lifetime 623 A cache can calculate the freshness lifetime (denoted as 624 freshness_lifetime) of a response by using the first match of the 625 following: 627 o If the cache is shared and the s-maxage response directive 628 (Section 5.2.2.10) is present, use its value, or 630 o If the max-age response directive (Section 5.2.2.9) is present, 631 use its value, or 633 o If the Expires response header field (Section 5.3) is present, use 634 its value minus the value of the Date response header field, or 636 o Otherwise, no explicit expiration time is present in the response. 637 A heuristic freshness lifetime might be applicable; see 638 Section 4.2.2. 640 Note that this calculation is not vulnerable to clock skew, since all 641 of the information comes from the origin server. 643 When there is more than one value present for a given directive 644 (e.g., two Expires header fields, multiple Cache-Control: max-age 645 directives), the directive's value is considered invalid. Caches are 646 encouraged to consider responses that have invalid freshness 647 information to be stale. 649 4.2.2. Calculating Heuristic Freshness 651 Since origin servers do not always provide explicit expiration times, 652 a cache MAY assign a heuristic expiration time when an explicit time 653 is not specified, employing algorithms that use other header field 654 values (such as the Last-Modified time) to estimate a plausible 655 expiration time. This specification does not provide specific 656 algorithms, but does impose worst-case constraints on their results. 658 A cache MUST NOT use heuristics to determine freshness when an 659 explicit expiration time is present in the stored response. Because 660 of the requirements in Section 3, this means that, effectively, 661 heuristics can only be used on responses without explicit freshness 662 whose status codes are defined as "heuristically cacheable" (e.g., 663 see Section 9.1 of [Semantics]), and those responses without explicit 664 freshness that have been marked as explicitly cacheable (e.g., with a 665 "public" response directive). 667 Note that in previous specifications heuristically cacheable response 668 status codes were called "cacheable by default." 670 If the response has a Last-Modified header field (Section 10.2.2 of 671 [Semantics]), caches are encouraged to use a heuristic expiration 672 value that is no more than some fraction of the interval since that 673 time. A typical setting of this fraction might be 10%. 675 Note: Section 13.9 of [RFC2616] prohibited caches from calculating 676 heuristic freshness for URIs with query components (i.e., those 677 containing '?'). In practice, this has not been widely 678 implemented. Therefore, origin servers are encouraged to send 679 explicit directives (e.g., Cache-Control: no-cache) if they wish 680 to preclude caching. 682 4.2.3. Calculating Age 684 The Age header field is used to convey an estimated age of the 685 response message when obtained from a cache. The Age field value is 686 the cache's estimate of the number of seconds since the response was 687 generated or validated by the origin server. In essence, the Age 688 value is the sum of the time that the response has been resident in 689 each of the caches along the path from the origin server, plus the 690 amount of time it has been in transit along network paths. 692 The following data is used for the age calculation: 694 age_value The term "age_value" denotes the value of the Age header 695 field (Section 5.1), in a form appropriate for arithmetic 696 operation; or 0, if not available. 698 date_value The term "date_value" denotes the value of the Date 699 header field, in a form appropriate for arithmetic operations. 700 See Section 10.1.1.2 of [Semantics] for the definition of the Date 701 header field, and for requirements regarding responses without it. 703 now The term "now" means "the current value of the clock at the host 704 performing the calculation". A host ought to use NTP ([RFC5905]) 705 or some similar protocol to synchronize its clocks to Coordinated 706 Universal Time. 708 request_time The current value of the clock at the host at the time 709 the request resulting in the stored response was made. 711 response_time The current value of the clock at the host at the time 712 the response was received. 714 A response's age can be calculated in two entirely independent ways: 716 1. the "apparent_age": response_time minus date_value, if the local 717 clock is reasonably well synchronized to the origin server's 718 clock. If the result is negative, the result is replaced by 719 zero. 721 2. the "corrected_age_value", if all of the caches along the 722 response path implement HTTP/1.1 or greater. A cache MUST 723 interpret this value relative to the time the request was 724 initiated, not the time that the response was received. 726 apparent_age = max(0, response_time - date_value); 728 response_delay = response_time - request_time; 729 corrected_age_value = age_value + response_delay; 731 These are combined as 733 corrected_initial_age = max(apparent_age, corrected_age_value); 735 unless the cache is confident in the value of the Age header field 736 (e.g., because there are no HTTP/1.0 hops in the Via header field), 737 in which case the corrected_age_value MAY be used as the 738 corrected_initial_age. 740 The current_age of a stored response can then be calculated by adding 741 the amount of time (in seconds) since the stored response was last 742 validated by the origin server to the corrected_initial_age. 744 resident_time = now - response_time; 745 current_age = corrected_initial_age + resident_time; 747 4.2.4. Serving Stale Responses 749 A "stale" response is one that either has explicit expiry information 750 or is allowed to have heuristic expiry calculated, but is not fresh 751 according to the calculations in Section 4.2. 753 A cache MUST NOT generate a stale response if it is prohibited by an 754 explicit in-protocol directive (e.g., by a "no-store" or "no-cache" 755 cache directive, a "must-revalidate" cache-response-directive, or an 756 applicable "s-maxage" or "proxy-revalidate" cache-response-directive; 757 see Section 5.2.2). 759 A cache MUST NOT generate a stale response unless it is disconnected 760 or doing so is explicitly permitted by the client or origin server 761 (e.g., by the max-stale request directive in Section 5.2.1, by 762 extension directives such as those defined in [RFC5861], or by 763 configuration in accordance with an out-of-band contract). 765 4.3. Validation 767 When a cache has one or more stored responses for a requested URI, 768 but cannot serve any of them (e.g., because they are not fresh, or 769 one cannot be selected; see Section 4.1), it can use the conditional 770 request mechanism Section 8.2 of [Semantics] in the forwarded request 771 to give the next inbound server an opportunity to select a valid 772 stored response to use, updating the stored metadata in the process, 773 or to replace the stored response(s) with a new response. This 774 process is known as "validating" or "revalidating" the stored 775 response. 777 4.3.1. Sending a Validation Request 779 When generating a conditional request for validation, a cache starts 780 with either a request it is attempting to satisfy, or -- if it is 781 initiating the request independently -- it synthesises a request 782 using a stored response by copying the method, target URI, and 783 request header fields identified by the Vary header field 784 Section 4.1. 786 It then updates that request with one or more precondition header 787 fields. These contain validator metadata sourced from stored 788 response(s) that have the same cache key. 790 The precondition header fields are then compared by recipients to 791 determine whether any stored response is equivalent to a current 792 representation of the resource. 794 One such validator is the timestamp given in a Last-Modified header 795 field (Section 10.2.2 of [Semantics]), which can be used in an If- 796 Modified-Since header field for response validation, or in an If- 797 Unmodified-Since or If-Range header field for representation 798 selection (i.e., the client is referring specifically to a previously 799 obtained representation with that timestamp). 801 Another validator is the entity-tag given in an ETag field 802 (Section 10.2.3 of [Semantics]). One or more entity-tags, indicating 803 one or more stored responses, can be used in an If-None-Match header 804 field for response validation, or in an If-Match or If-Range header 805 field for representation selection (i.e., the client is referring 806 specifically to one or more previously obtained representations with 807 the listed entity-tags). 809 4.3.2. Handling a Received Validation Request 811 Each client in the request chain may have its own cache, so it is 812 common for a cache at an intermediary to receive conditional requests 813 from other (outbound) caches. Likewise, some user agents make use of 814 conditional requests to limit data transfers to recently modified 815 representations or to complete the transfer of a partially retrieved 816 representation. 818 If a cache receives a request that can be satisfied by reusing one of 819 its stored 200 (OK) or 206 (Partial Content) responses, the cache 820 SHOULD evaluate any applicable conditional header field preconditions 821 received in that request with respect to the corresponding validators 822 contained within the selected response. A cache MUST NOT evaluate 823 conditional header fields that are only applicable to an origin 824 server, found in a request with semantics that cannot be satisfied 825 with a cached response, or applied to a target resource for which it 826 has no stored responses; such preconditions are likely intended for 827 some other (inbound) server. 829 The proper evaluation of conditional requests by a cache depends on 830 the received precondition header fields and their precedence, as 831 defined in Section 8.2.2 of [Semantics]. The If-Match and If- 832 Unmodified-Since conditional header fields are not applicable to a 833 cache. 835 A request containing an If-None-Match header field (Section 8.2.4 of 836 [Semantics]) indicates that the client wants to validate one or more 837 of its own stored responses in comparison to whichever stored 838 response is selected by the cache. If the field value is "*", or if 839 the field value is a list of entity-tags and at least one of them 840 matches the entity-tag of the selected stored response, a cache 841 recipient SHOULD generate a 304 (Not Modified) response (using the 842 metadata of the selected stored response) instead of sending that 843 stored response. 845 When a cache decides to revalidate its own stored responses for a 846 request that contains an If-None-Match list of entity-tags, the cache 847 MAY combine the received list with a list of entity-tags from its own 848 stored set of responses (fresh or stale) and send the union of the 849 two lists as a replacement If-None-Match header field value in the 850 forwarded request. If a stored response contains only partial 851 content, the cache MUST NOT include its entity-tag in the union 852 unless the request is for a range that would be fully satisfied by 853 that partial stored response. If the response to the forwarded 854 request is 304 (Not Modified) and has an ETag field value with an 855 entity-tag that is not in the client's list, the cache MUST generate 856 a 200 (OK) response for the client by reusing its corresponding 857 stored response, as updated by the 304 response metadata 858 (Section 4.3.4). 860 If an If-None-Match header field is not present, a request containing 861 an If-Modified-Since header field (Section 8.2.5 of [Semantics]) 862 indicates that the client wants to validate one or more of its own 863 stored responses by modification date. A cache recipient SHOULD 864 generate a 304 (Not Modified) response (using the metadata of the 865 selected stored response) if one of the following cases is true: 1) 866 the selected stored response has a Last-Modified field value that is 867 earlier than or equal to the conditional timestamp; 2) no Last- 868 Modified field is present in the selected stored response, but it has 869 a Date field value that is earlier than or equal to the conditional 870 timestamp; or, 3) neither Last-Modified nor Date is present in the 871 selected stored response, but the cache recorded it as having been 872 received at a time earlier than or equal to the conditional 873 timestamp. 875 A cache that implements partial responses to range requests, as 876 defined in Section 8.3 of [Semantics], also needs to evaluate a 877 received If-Range header field (Section 8.2.7 of [Semantics]) with 878 respect to its selected stored response. 880 4.3.3. Handling a Validation Response 882 Cache handling of a response to a conditional request is dependent 883 upon its status code: 885 o A 304 (Not Modified) response status code indicates that the 886 stored response can be updated and reused; see Section 4.3.4. 888 o A full response (i.e., one with a payload body) indicates that 889 none of the stored responses nominated in the conditional request 890 is suitable. Instead, the cache MUST use the full response to 891 satisfy the request and MAY replace the stored response(s). 893 o However, if a cache receives a 5xx (Server Error) response while 894 attempting to validate a response, it can either forward this 895 response to the requesting client, or act as if the server failed 896 to respond. In the latter case, the cache MAY send a previously 897 stored response (see Section 4.2.4). 899 4.3.4. Freshening Stored Responses upon Validation 901 When a cache receives a 304 (Not Modified) response and already has 902 one or more stored 200 (OK) responses for the applicable cache key, 903 the cache needs to identify which (if any) are to be updated by the 904 new information provided, and then do so. 906 The stored response(s) to update are identified by using the first 907 match (if any) of the following: 909 o If the new response contains a strong validator (see 910 Section 10.2.1 of [Semantics]), then that strong validator 911 identifies the selected representation for update. All of the 912 stored responses with the same strong validator are identified for 913 update. If none of the stored responses contain the same strong 914 validator, then the cache MUST NOT use the new response to update 915 any stored responses. 917 o If the new response contains a weak validator and that validator 918 corresponds to one of the cache's stored responses, then the most 919 recent of those matching stored responses is identified for 920 update. 922 o If the new response does not include any form of validator (such 923 as in the case where a client generates an If-Modified-Since 924 request from a source other than the Last-Modified response header 925 field), and there is only one stored response, and that stored 926 response also lacks a validator, then that stored response is 927 identified for update. 929 For each stored response identified for update, the cache MUST use 930 the header fields provided in the 304 (Not Modified) response to 931 replace all instances of the corresponding header fields in the 932 stored response, with the following exceptions: 934 o The exceptions to header field storage in Section 3.1 also apply 935 to header field updates. 937 o Caches MUST NOT update the following header fields: Content- 938 Encoding, Content-Length, Content-MD5 (Section 14.15 of 939 [RFC2616]), Content-Range, ETag. 941 4.3.5. Freshening Responses with HEAD 943 A response to the HEAD method is identical to what an equivalent 944 request made with a GET would have been, except it lacks a body. 945 This property of HEAD responses can be used to invalidate or update a 946 cached GET response if the more efficient conditional GET request 947 mechanism is not available (due to no validators being present in the 948 stored response) or if transmission of the representation body is not 949 desired even if it has changed. 951 When a cache makes an inbound HEAD request for a given target URI and 952 receives a 200 (OK) response, the cache SHOULD update or invalidate 953 each of its stored GET responses that could have been selected for 954 that request (see Section 4.1). 956 For each of the stored responses that could have been selected, if 957 the stored response and HEAD response have matching values for any 958 received validator fields (ETag and Last-Modified) and, if the HEAD 959 response has a Content-Length header field, the value of Content- 960 Length matches that of the stored response, the cache SHOULD update 961 the stored response as described below; otherwise, the cache SHOULD 962 consider the stored response to be stale. 964 If a cache updates a stored response with the metadata provided in a 965 HEAD response, the cache MUST use the header fields provided in the 966 HEAD response to replace all instances of the corresponding header 967 fields in the stored response (subject to the exceptions in 968 Section 4.3.4) and append new header fields to the stored response's 969 header section unless otherwise restricted by the Cache-Control 970 header field. 972 4.4. Invalidation 974 Because unsafe request methods (Section 7.2.1 of [Semantics]) such as 975 PUT, POST or DELETE have the potential for changing state on the 976 origin server, intervening caches are required to invalidate stored 977 responses to keep their contents up to date. Invalidate means that 978 the cache will either remove all stored responses whose target URI 979 matches the given URI, or will mark them as "invalid" and in need of 980 a mandatory validation before they can be sent in response to a 981 subsequent request. 983 Note that this does not guarantee that all appropriate responses are 984 invalidated globally; a state-changing request would only invalidate 985 responses in the caches that it travels through. 987 A cache MUST invalidate the target URI (Section 5.1 of [Semantics]) 988 as well as the URI(s) in the Location and Content-Location response 989 header fields (if present) when a non-error status code is received 990 in response to an unsafe request method. 992 However, a cache MUST NOT invalidate a URI from a Location or 993 Content-Location response header field if the host part of that URI 994 differs from the host part in the target URI (Section 5.1 of 995 [Semantics]). This helps prevent denial-of-service attacks. 997 A cache MUST invalidate the target URI (Section 5.1 of [Semantics]) 998 when it receives a non-error response to a request with a method 999 whose safety is unknown. 1001 Here, a "non-error response" is one with a 2xx (Successful) or 3xx 1002 (Redirection) status code. 1004 5. Field Definitions 1006 This section defines the syntax and semantics of HTTP fields related 1007 to caching. 1009 +---------------+-----------+--------------+ 1010 | Field Name | Status | Reference | 1011 +---------------+-----------+--------------+ 1012 | Age | standard | Section 5.1 | 1013 | Cache-Control | standard | Section 5.2 | 1014 | Expires | standard | Section 5.3 | 1015 | Pragma | standard | Section 5.4 | 1016 | Warning | obsoleted | Section 5.5 | 1017 +---------------+-----------+--------------+ 1019 Table 1 1021 5.1. Age 1023 The "Age" header field conveys the sender's estimate of the amount of 1024 time since the response was generated or successfully validated at 1025 the origin server. Age values are calculated as specified in 1026 Section 4.2.3. 1028 Age = delta-seconds 1030 The Age field value is a non-negative integer, representing time in 1031 seconds (see Section 1.3). 1033 The presence of an Age header field implies that the response was not 1034 generated or validated by the origin server for this request. 1035 However, lack of an Age header field does not imply the origin was 1036 contacted, since the response might have been received from an 1037 HTTP/1.0 cache that does not implement Age. 1039 5.2. Cache-Control 1041 The "Cache-Control" header field is used to list directives for 1042 caches along the request/response chain. Such cache directives are 1043 unidirectional in that the presence of a directive in a request does 1044 not imply that the same directive is present in the response, or to 1045 be repeated in it. 1047 See Section 5.2.3 for information about how Cache-Control directives 1048 defined elsewhere are handled. 1050 Note: Some HTTP/1.0 caches might not implement Cache-Control. 1052 A proxy, whether or not it implements a cache, MUST pass cache 1053 directives through in forwarded messages, regardless of their 1054 significance to that application, since the directives might be 1055 applicable to all recipients along the request/response chain. It is 1056 not possible to target a directive to a specific cache. 1058 Cache directives are identified by a token, to be compared case- 1059 insensitively, and have an optional argument, that can use both token 1060 and quoted-string syntax. For the directives defined below that 1061 define arguments, recipients ought to accept both forms, even if a 1062 specific form is required for generation. 1064 Cache-Control = 1#cache-directive 1066 cache-directive = token [ "=" ( token / quoted-string ) ] 1068 For the cache directives defined below, no argument is defined (nor 1069 allowed) unless stated otherwise. 1071 +------------------+-----------------------------------+ 1072 | Cache Directive | Reference | 1073 +------------------+-----------------------------------+ 1074 | max-age | Section 5.2.1.1, Section 5.2.2.9 | 1075 | max-stale | Section 5.2.1.2 | 1076 | min-fresh | Section 5.2.1.3 | 1077 | must-revalidate | Section 5.2.2.1 | 1078 | must-understand | Section 5.2.2.2 | 1079 | no-cache | Section 5.2.1.4, Section 5.2.2.3 | 1080 | no-store | Section 5.2.1.5, Section 5.2.2.4 | 1081 | no-transform | Section 5.2.1.6, Section 5.2.2.5 | 1082 | only-if-cached | Section 5.2.1.7 | 1083 | private | Section 5.2.2.7 | 1084 | proxy-revalidate | Section 5.2.2.8 | 1085 | public | Section 5.2.2.6 | 1086 | s-maxage | Section 5.2.2.10 | 1087 +------------------+-----------------------------------+ 1089 Table 2 1091 5.2.1. Request Cache-Control Directives 1093 This section defines cache request directives. They are advisory; 1094 caches MAY implement them, but are not required to. 1096 5.2.1.1. max-age 1098 Argument syntax: 1100 delta-seconds (see Section 1.3) 1102 The "max-age" request directive indicates that the client prefers a 1103 response whose age is less than or equal to the specified number of 1104 seconds. Unless the max-stale request directive is also present, the 1105 client does not wish to receive a stale response. 1107 This directive uses the token form of the argument syntax: e.g., 1108 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1109 quoted-string form. 1111 5.2.1.2. max-stale 1113 Argument syntax: 1115 delta-seconds (see Section 1.3) 1117 The "max-stale" request directive indicates that the client is 1118 willing to accept a response that has exceeded its freshness 1119 lifetime. If a value is present, then the client is willing to 1120 accept a response that has exceeded its freshness lifetime by no more 1121 than the specified number of seconds. If no value is assigned to 1122 max-stale, then the client is willing to accept a stale response of 1123 any age. 1125 This directive uses the token form of the argument syntax: e.g., 1126 'max-stale=10' not 'max-stale="10"'. A sender MUST NOT generate the 1127 quoted-string form. 1129 5.2.1.3. min-fresh 1131 Argument syntax: 1133 delta-seconds (see Section 1.3) 1135 The "min-fresh" request directive indicates that the client prefers a 1136 response whose freshness lifetime is no less than its current age 1137 plus the specified time in seconds. That is, the client wants a 1138 response that will still be fresh for at least the specified number 1139 of seconds. 1141 This directive uses the token form of the argument syntax: e.g., 1142 'min-fresh=20' not 'min-fresh="20"'. A sender MUST NOT generate the 1143 quoted-string form. 1145 5.2.1.4. no-cache 1147 The "no-cache" request directive indicates that the client prefers 1148 stored response not be used to satisfy the request without successful 1149 validation on the origin server. 1151 5.2.1.5. no-store 1153 The "no-store" request directive indicates that a cache MUST NOT 1154 store any part of either this request or any response to it. This 1155 directive applies to both private and shared caches. "MUST NOT 1156 store" in this context means that the cache MUST NOT intentionally 1157 store the information in non-volatile storage, and MUST make a best- 1158 effort attempt to remove the information from volatile storage as 1159 promptly as possible after forwarding it. 1161 This directive is NOT a reliable or sufficient mechanism for ensuring 1162 privacy. In particular, malicious or compromised caches might not 1163 recognize or obey this directive, and communications networks might 1164 be vulnerable to eavesdropping. 1166 Note that if a request containing this directive is satisfied from a 1167 cache, the no-store request directive does not apply to the already 1168 stored response. 1170 5.2.1.6. no-transform 1172 The "no-transform" request directive indicates that the client is 1173 asking for intermediares (whether or not they implement a cache) to 1174 avoid transforming the payload, as defined in Section 5.7.2 of 1175 [Semantics]. 1177 5.2.1.7. only-if-cached 1179 The "only-if-cached" request directive indicates that the client only 1180 wishes to obtain a stored response. Caches that honor this request 1181 directive SHOULD, upon receiving it, either respond using a stored 1182 response that is consistent with the other constraints of the 1183 request, or respond with a 504 (Gateway Timeout) status code. 1185 5.2.2. Response Cache-Control Directives 1187 This section defines cache response directives. A cache MUST obey 1188 the requirements of the Cache-Control directives defined in this 1189 section. 1191 5.2.2.1. must-revalidate 1193 The "must-revalidate" response directive indicates that once the 1194 response has become stale, a cache MUST NOT reuse that response to 1195 satisfy another request until it has been successfully validated by 1196 the origin, as defined by Section 4.3. 1198 The must-revalidate directive is necessary to support reliable 1199 operation for certain protocol features. In all circumstances a 1200 cache MUST obey the must-revalidate directive; in particular, if a 1201 cache is disconnected, the cache MUST generate a 504 (Gateway 1202 Timeout) response rather than reuse the stale response. 1204 The must-revalidate directive ought to be used by servers if and only 1205 if failure to validate a request on the representation could result 1206 in incorrect operation, such as a silently unexecuted financial 1207 transaction. 1209 The must-revalidate directive also permits a shared cache to reuse a 1210 response to a request containing an Authorization header field, 1211 subject to the above requirement on revalidation (Section 3.3). 1213 5.2.2.2. must-understand 1215 The "must-understand" response directive limits caching of the 1216 response to a cache that understands and conforms to the requirements 1217 for that response's status code. A cache MUST NOT store a response 1218 containing the must-understand directive if the cache does not 1219 understand the response status code. 1221 5.2.2.3. no-cache 1223 Argument syntax: 1225 #field-name 1227 The "no-cache" response directive, in its unqualified form (without 1228 an argument), indicates that the response MUST NOT be used to satisfy 1229 any other request without forwarding it for validation and receiving 1230 a successful response; see Section 4.3. 1232 This allows an origin server to prevent a cache from using the 1233 response to satisfy a request without contacting it, even by caches 1234 that have been configured to send stale responses. 1236 The qualified form of no-cache response directive, with an argument 1237 that lists one or more field names, indicates that a cache MAY use 1238 the response to satisfy a subsequent request, subject to any other 1239 restrictions on caching, if the listed header fields are excluded 1240 from the subsequent response or the subsequent response has been 1241 successfully revalidated with the origin server (updating or removing 1242 those fields). This allows an origin server to prevent the re-use of 1243 certain header fields in a response, while still allowing caching of 1244 the rest of the response. 1246 The field names given are not limited to the set of header fields 1247 defined by this specification. Field names are case-insensitive. 1249 This directive uses the quoted-string form of the argument syntax. A 1250 sender SHOULD NOT generate the token form (even if quoting appears 1251 not to be needed for single-entry lists). 1253 Note: Although it has been back-ported to many implementations, some 1254 HTTP/1.0 caches will not recognize or obey this directive. Also, the 1255 qualified form of the directive is often handled by caches as if an 1256 unqualified no-cache directive was received; i.e., the special 1257 handling for the qualified form is not widely implemented. 1259 5.2.2.4. no-store 1261 The "no-store" response directive indicates that a cache MUST NOT 1262 store any part of either the immediate request or response, and MUST 1263 NOT use the response to satisfy any other request. 1265 This directive applies to both private and shared caches. "MUST NOT 1266 store" in this context means that the cache MUST NOT intentionally 1267 store the information in non-volatile storage, and MUST make a best- 1268 effort attempt to remove the information from volatile storage as 1269 promptly as possible after forwarding it. 1271 This directive is NOT a reliable or sufficient mechanism for ensuring 1272 privacy. In particular, malicious or compromised caches might not 1273 recognize or obey this directive, and communications networks might 1274 be vulnerable to eavesdropping. 1276 5.2.2.5. no-transform 1278 The "no-transform" response directive indicates that an intermediary 1279 (regardless of whether it implements a cache) MUST NOT transform the 1280 payload, as defined in Section 5.7.2 of [Semantics]. 1282 5.2.2.6. public 1284 The "public" response directive indicates that a cache MAY store the 1285 response even if it would otherwise be prohibited, subject to the 1286 constraints defined in Section 3. In other words, public explicitly 1287 marks the response as cacheable. For example, public permits a 1288 shared cache to reuse a response to a request containing an 1289 Authorization header field (Section 3.3). 1291 Note that it is not necessary to add the public directive to a 1292 response that is already cacheable according to Section 3. 1294 If no explicit freshness information is provided on a response with 1295 the public directive, it is heuristically cacheable (Section 4.2.2). 1297 5.2.2.7. private 1299 Argument syntax: 1301 #field-name 1303 The unqualified "private" response directive indicates that a shared 1304 cache MUST NOT store the response (i.e., the response is intended for 1305 a single user). It also indicates that a private cache MAY store the 1306 response, subject the constraints defined in Section 3, even if the 1307 response would not otherwise be heuristically cacheable by a private 1308 cache. 1310 If a qualified private response directive is present, with an 1311 argument that lists one or more field names, then only the listed 1312 fields are limited to a single user: a shared cache MUST NOT store 1313 the listed fields if they are present in the original response, but 1314 MAY store the remainder of the response message without those fields, 1315 subject the constraints defined in Section 3. 1317 The field names given are not limited to the set of header fields 1318 defined by this specification. Field names are case-insensitive. 1320 This directive uses the quoted-string form of the argument syntax. A 1321 sender SHOULD NOT generate the token form (even if quoting appears 1322 not to be needed for single-entry lists). 1324 Note: This usage of the word "private" only controls where the 1325 response can be stored; it cannot ensure the privacy of the message 1326 content. Also, the qualified form of the directive is often handled 1327 by caches as if an unqualified private directive was received; i.e., 1328 the special handling for the qualified form is not widely 1329 implemented. 1331 5.2.2.8. proxy-revalidate 1333 The "proxy-revalidate" response directive indicates that once the 1334 response has become stale, a shared cache MUST NOT reuse that 1335 response to satisfy another request until it has been successfully 1336 validated by the origin, as defined by Section 4.3. This is 1337 analogous to must-revalidate (Section 5.2.2.1), except that proxy- 1338 revalidate does not apply to private caches. 1340 Note that "proxy-revalidate" on its own does not imply that a 1341 response is cacheable. For example, it might be combined with the 1342 public directive (Section 5.2.2.6), allowing the response to be 1343 cached while requiring only a shared cache to revalidate when stale. 1345 5.2.2.9. max-age 1347 Argument syntax: 1349 delta-seconds (see Section 1.3) 1351 The "max-age" response directive indicates that the response is to be 1352 considered stale after its age is greater than the specified number 1353 of seconds. 1355 This directive uses the token form of the argument syntax: e.g., 1356 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1357 quoted-string form. 1359 5.2.2.10. s-maxage 1361 Argument syntax: 1363 delta-seconds (see Section 1.3) 1365 The "s-maxage" response directive indicates that, for a shared cache, 1366 the maximum age specified by this directive overrides the maximum age 1367 specified by either the max-age directive or the Expires header 1368 field. 1370 The s-maxage directive incorporates the proxy-revalidate 1371 (Section 5.2.2.8) response directive's semantics for a shared cache. 1372 A shared cache MUST NOT reuse a stale response with s-maxage to 1373 satisfy another request until it has been successfully validated by 1374 the origin, as defined by Section 4.3. This directive also permits a 1375 shared cache to reuse a response to a request containing an 1376 Authorization header field, subject to the above requirements on 1377 maximum age and revalidation (Section 3.3). 1379 This directive uses the token form of the argument syntax: e.g., 1380 's-maxage=10' not 's-maxage="10"'. A sender MUST NOT generate the 1381 quoted-string form. 1383 5.2.3. Cache Control Extensions 1385 The Cache-Control header field can be extended through the use of one 1386 or more cache-extension tokens, each with an optional value. A cache 1387 MUST ignore unrecognized cache directives. 1389 Informational extensions (those that do not require a change in cache 1390 behavior) can be added without changing the semantics of other 1391 directives. 1393 Behavioral extensions are designed to work by acting as modifiers to 1394 the existing base of cache directives. Both the new directive and 1395 the old directive are supplied, such that applications that do not 1396 understand the new directive will default to the behavior specified 1397 by the old directive, and those that understand the new directive 1398 will recognize it as modifying the requirements associated with the 1399 old directive. In this way, extensions to the existing cache-control 1400 directives can be made without breaking deployed caches. 1402 For example, consider a hypothetical new response directive called 1403 "community" that acts as a modifier to the private directive: in 1404 addition to private caches, any cache that is shared only by members 1405 of the named community is allowed to cache the response. An origin 1406 server wishing to allow the UCI community to use an otherwise private 1407 response in their shared cache(s) could do so by including 1409 Cache-Control: private, community="UCI" 1411 A cache that recognizes such a community cache-extension could 1412 broaden its behavior in accordance with that extension. A cache that 1413 does not recognize the community cache-extension would ignore it and 1414 adhere to the private directive. 1416 New extension directives ought to consider defining: 1418 o What it means for a directive to be specified multiple times, 1420 o When the directive does not take an argument, what it means when 1421 an argument is present, 1423 o When the directive requires an argument, what it means when it is 1424 missing, 1426 o Whether the directive is specific to requests, responses, or able 1427 to be used in either. 1429 5.2.4. Cache Directive Registry 1431 The "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" 1432 defines the namespace for the cache directives. It has been created 1433 and is now maintained at . 1436 A registration MUST include the following fields: 1438 o Cache Directive Name 1440 o Pointer to specification text 1442 Values to be added to this namespace require IETF Review (see 1443 [RFC8126], Section 4.8). 1445 5.3. Expires 1447 The "Expires" header field gives the date/time after which the 1448 response is considered stale. See Section 4.2 for further discussion 1449 of the freshness model. 1451 The presence of an Expires field does not imply that the original 1452 resource will change or cease to exist at, before, or after that 1453 time. 1455 The Expires value is an HTTP-date timestamp, as defined in 1456 Section 10.1.1.1 of [Semantics]. 1458 Expires = HTTP-date 1460 For example 1462 Expires: Thu, 01 Dec 1994 16:00:00 GMT 1464 A cache recipient MUST interpret invalid date formats, especially the 1465 value "0", as representing a time in the past (i.e., "already 1466 expired"). 1468 If a response includes a Cache-Control field with the max-age 1469 directive (Section 5.2.2.9), a recipient MUST ignore the Expires 1470 field. Likewise, if a response includes the s-maxage directive 1471 (Section 5.2.2.10), a shared cache recipient MUST ignore the Expires 1472 field. In both these cases, the value in Expires is only intended 1473 for recipients that have not yet implemented the Cache-Control field. 1475 An origin server without a clock MUST NOT generate an Expires field 1476 unless its value represents a fixed time in the past (always expired) 1477 or its value has been associated with the resource by a system or 1478 user with a reliable clock. 1480 Historically, HTTP required the Expires field value to be no more 1481 than a year in the future. While longer freshness lifetimes are no 1482 longer prohibited, extremely large values have been demonstrated to 1483 cause problems (e.g., clock overflows due to use of 32-bit integers 1484 for time values), and many caches will evict a response far sooner 1485 than that. 1487 5.4. Pragma 1489 The "Pragma" header field was defined for HTTP/1.0 caches, so that 1490 clients could specify a "no-cache" request (as Cache-Control was not 1491 defined until HTTP/1.1). 1493 However, support for Cache-Control is now widespread. As a result, 1494 this specification deprecates Pragma. 1496 Note: Because the meaning of "Pragma: no-cache" in responses was 1497 never specified, it does not provide a reliable replacement for 1498 "Cache-Control: no-cache" in them. 1500 5.5. Warning 1502 The "Warning" header field was used to carry additional information 1503 about the status or transformation of a message that might not be 1504 reflected in the status code. This specification obsoletes it, as it 1505 is not widely generated or surfaced to users. The information it 1506 carried can be gleaned from examining other header fields, such as 1507 Age. 1509 6. Relationship to Applications 1511 Applications using HTTP often specify additional forms of caching. 1512 For example, Web browsers often have history mechanisms such as 1513 "Back" buttons that can be used to redisplay a representation 1514 retrieved earlier in a session. 1516 Likewise, some Web browsers implement caching of images and other 1517 assets within a page view; they may or may not honor HTTP caching 1518 semantics. 1520 The requirements in this specification do not necessarily apply to 1521 how applications use data after it is retrieved from a HTTP cache. 1522 That is, a history mechanism can display a previous representation 1523 even if it has expired, and an application can use cached data in 1524 other ways beyond its freshness lifetime. 1526 This does not prohibit the application from taking HTTP caching into 1527 account; for example, a history mechanism might tell the user that a 1528 view is stale, or it might honor cache directives (e.g., Cache- 1529 Control: no-store). 1531 7. Security Considerations 1533 This section is meant to inform developers, information providers, 1534 and users of known security concerns specific to HTTP caching. More 1535 general security considerations are addressed in HTTP messaging 1536 [Messaging] and semantics [Semantics]. 1538 Caches expose additional potential vulnerabilities, since the 1539 contents of the cache represent an attractive target for malicious 1540 exploitation. Because cache contents persist after an HTTP request 1541 is complete, an attack on the cache can reveal information long after 1542 a user believes that the information has been removed from the 1543 network. Therefore, cache contents need to be protected as sensitive 1544 information. 1546 7.1. Cache Poisoning 1548 Various attacks might be amplified by being stored in a shared cache. 1549 Such "cache poisoning" attacks use the cache to distribute a 1550 malicious payload to many clients, and are especially effective when 1551 an attacker can use implementation flaws, elevated privileges, or 1552 other techniques to insert such a response into a cache. 1554 One common attack vector for cache poisoning is to exploit 1555 differences in message parsing on proxies and in user agents; see 1556 Section 6.3 of [Messaging] for the relevant requirements regarding 1557 HTTP/1.1. 1559 7.2. Timing Attacks 1561 Because one of the primary uses of a cache is to optimise 1562 performance, its use can "leak" information about what resources have 1563 been previously requested. 1565 For example, if a user visits a site and their browser caches some of 1566 its responses, and then navigates to a second site, that site can 1567 attempt to load responses that it knows exists on the first site. If 1568 they load very quickly, it can be assumed that the user has visited 1569 that site, or even a specific page on it. 1571 Such "timing attacks" can be mitigated by adding more information to 1572 the cache key, such as the identity of the referring site (to prevent 1573 the attack described above). This is sometimes called "double 1574 keying." 1576 7.3. Caching of Sensitive Information 1578 Implementation and deployment flaws (as well as misunderstanding of 1579 cache operation) might lead to caching of sensitive information 1580 (e.g., authentication credentials) that is thought to be private, 1581 exposing it to unauthorized parties. 1583 Note that the Set-Cookie response header field [RFC6265] does not 1584 inhibit caching; a cacheable response with a Set-Cookie header field 1585 can be (and often is) used to satisfy subsequent requests to caches. 1586 Servers who wish to control caching of these responses are encouraged 1587 to emit appropriate Cache-Control response header fields. 1589 8. IANA Considerations 1591 The change controller for the following registrations is: "IETF 1592 (iesg@ietf.org) - Internet Engineering Task Force". 1594 8.1. Field Registration 1596 Please update the "Hypertext Transfer Protocol (HTTP) Field Name 1597 Registry" at with the 1598 field names listed in the two tables of Section 5. 1600 8.2. Cache Directive Registration 1602 Please update the "Hypertext Transfer Protocol (HTTP) Cache Directive 1603 Registry" at 1604 with the registration procedure of Section 5.2.4 and the cache 1605 directive names summarized in the table of Section 5.2. 1607 8.3. Warn Code Registry 1609 Please add a note to the "Hypertext Transfer Protocol (HTTP) Warn 1610 Codes" registry at 1611 to the effect that Warning is obsoleted. 1613 9. References 1615 9.1. Normative References 1617 [Messaging] 1618 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1619 Ed., "HTTP/1.1 Messaging", draft-ietf-httpbis-messaging-08 1620 (work in progress), May 2020. 1622 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1623 Requirement Levels", BCP 14, RFC 2119, 1624 DOI 10.17487/RFC2119, March 1997, 1625 . 1627 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1628 Resource Identifier (URI): Generic Syntax", STD 66, 1629 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1630 . 1632 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1633 Specifications: ABNF", STD 68, RFC 5234, 1634 DOI 10.17487/RFC5234, January 2008, 1635 . 1637 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 1638 RFC 7405, DOI 10.17487/RFC7405, December 2014, 1639 . 1641 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1642 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1643 May 2017, . 1645 [Semantics] 1646 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1647 Ed., "HTTP Semantics", draft-ietf-httpbis-semantics-08 1648 (work in progress), May 2020. 1650 [USASCII] American National Standards Institute, "Coded Character 1651 Set -- 7-bit American Standard Code for Information 1652 Interchange", ANSI X3.4, 1986. 1654 9.2. Informative References 1656 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1657 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1658 Transfer Protocol -- HTTP/1.1", RFC 2616, 1659 DOI 10.17487/RFC2616, June 1999, 1660 . 1662 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 1663 Content", RFC 5861, DOI 10.17487/RFC5861, April 2010, 1664 . 1666 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1667 "Network Time Protocol Version 4: Protocol and Algorithms 1668 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1669 . 1671 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1672 DOI 10.17487/RFC6265, April 2011, 1673 . 1675 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1676 Ed., "Hypertext Transfer Protocol (HTTP): Caching", 1677 RFC 7234, DOI 10.17487/RFC7234, June 2014, 1678 . 1680 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1681 Writing an IANA Considerations Section in RFCs", BCP 26, 1682 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1683 . 1685 Appendix A. Collected ABNF 1687 In the collected ABNF below, list rules are expanded as per 1688 Section 4.5 of [Semantics]. 1690 Age = delta-seconds 1692 Cache-Control = [ cache-directive ] *( OWS "," OWS [ cache-directive 1693 ] ) 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 Index 1887 A 1888 Age header field 22 1889 age 12 1891 C 1892 Cache-Control header field 23 1893 cache 4 1894 cache key 6 1896 E 1897 Expires header field 31 1898 explicit expiration time 12 1900 F 1901 Fields 1902 Age 22 1903 Cache-Control 23 1904 Expires 31 1905 Pragma 32 1906 Warning 33 1907 fresh 12 1908 freshness lifetime 12 1910 G 1911 Grammar 1912 Age 22 1913 ALPHA 5 1914 Cache-Control 23 1915 cache-directive 23 1916 CR 5 1917 CRLF 5 1918 CTL 5 1919 delta-seconds 6 1920 DIGIT 5 1921 DQUOTE 5 1922 Expires 32 1923 HEXDIG 5 1924 HTAB 5 1925 LF 5 1926 OCTET 5 1927 SP 5 1928 VCHAR 5 1930 H 1931 Header Fields 1932 Age 22 1933 Cache-Control 23 1934 Expires 31 1935 Pragma 32 1936 Warning 33 1937 heuristic expiration time 12 1938 heuristically cacheable 14 1940 M 1941 max-age (cache directive) 24, 29 1942 max-stale (cache directive) 24 1943 min-fresh (cache directive) 25 1944 must-revalidate (cache directive) 26 1945 must-understand (cache directive) 27 1947 N 1948 no-cache (cache directive) 25, 27 1949 no-store (cache directive) 25, 28 1950 no-transform (cache directive) 26, 28 1952 O 1953 only-if-cached (cache directive) 26 1955 P 1956 Pragma header field 32 1957 private (cache directive) 28 1958 private cache 4 1959 proxy-revalidate (cache directive) 29 1960 public (cache directive) 28 1962 S 1963 s-maxage (cache directive) 30 1964 shared cache 4 1965 stale 12 1966 strong validator 20 1968 V 1969 validator 17 1971 W 1972 Warning header field 33 1974 Acknowledgments 1976 See Appendix "Acknowledgments" of [Semantics]. 1978 Authors' Addresses 1980 Roy T. Fielding (editor) 1981 Adobe 1982 345 Park Ave 1983 San Jose, CA 95110 1984 United States of America 1986 EMail: fielding@gbiv.com 1987 URI: https://roy.gbiv.com/ 1989 Mark Nottingham (editor) 1990 Fastly 1992 EMail: mnot@mnot.net 1993 URI: https://www.mnot.net/ 1995 Julian F. Reschke (editor) 1996 greenbytes GmbH 1997 Hafenweg 16 1998 Muenster 48155 1999 Germany 2001 EMail: julian.reschke@greenbytes.de 2002 URI: https://greenbytes.de/tech/webdav/