idnits 2.17.00 (12 Aug 2021) /tmp/idnits61448/draft-ietf-httpbis-cache-07.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 (March 7, 2020) is 804 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 1595, but no explicit reference was found in the text == Unused Reference: 'RFC7234' is defined on line 1643, but no explicit reference was found in the text == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-messaging-07 -- Possible downref: Normative reference to a draft: ref. 'Messaging' == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-semantics-07 -- 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: September 8, 2020 J. Reschke, Ed. 7 greenbytes 8 March 7, 2020 10 HTTP Caching 11 draft-ietf-httpbis-cache-07 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.8. 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 September 8, 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 Incomplete Responses . . . . . . . . . . . . . . 8 90 3.2. Storing Responses to Authenticated Requests . . . . . . . 9 91 3.3. Combining Partial Content . . . . . . . . . . . . . . . . 9 92 4. Constructing Responses from Caches . . . . . . . . . . . . . 10 93 4.1. Calculating Cache Keys with Vary . . . . . . . . . . . . 11 94 4.2. Freshness . . . . . . . . . . . . . . . . . . . . . . . . 12 95 4.2.1. Calculating Freshness Lifetime . . . . . . . . . . . 13 96 4.2.2. Calculating Heuristic Freshness . . . . . . . . . . . 14 97 4.2.3. Calculating Age . . . . . . . . . . . . . . . . . . . 15 98 4.2.4. Serving Stale Responses . . . . . . . . . . . . . . . 16 99 4.3. Validation . . . . . . . . . . . . . . . . . . . . . . . 16 100 4.3.1. Sending a Validation Request . . . . . . . . . . . . 17 101 4.3.2. Handling a Received Validation Request . . . . . . . 17 102 4.3.3. Handling a Validation Response . . . . . . . . . . . 19 103 4.3.4. Freshening Stored Responses upon Validation . . . . . 19 104 4.3.5. Freshening Responses with HEAD . . . . . . . . . . . 20 105 4.4. Invalidation . . . . . . . . . . . . . . . . . . . . . . 21 106 5. Field Definitions . . . . . . . . . . . . . . . . . . . . . . 21 107 5.1. Age . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 108 5.2. Cache-Control . . . . . . . . . . . . . . . . . . . . . . 22 109 5.2.1. Request Cache-Control Directives . . . . . . . . . . 23 110 5.2.1.1. max-age . . . . . . . . . . . . . . . . . . . . . 23 111 5.2.1.2. max-stale . . . . . . . . . . . . . . . . . . . . 24 112 5.2.1.3. min-fresh . . . . . . . . . . . . . . . . . . . . 24 113 5.2.1.4. no-cache . . . . . . . . . . . . . . . . . . . . 24 114 5.2.1.5. no-store . . . . . . . . . . . . . . . . . . . . 25 115 5.2.1.6. no-transform . . . . . . . . . . . . . . . . . . 25 116 5.2.1.7. only-if-cached . . . . . . . . . . . . . . . . . 25 117 5.2.2. Response Cache-Control Directives . . . . . . . . . . 25 118 5.2.2.1. must-revalidate . . . . . . . . . . . . . . . . . 25 119 5.2.2.2. must-understand . . . . . . . . . . . . . . . . . 26 120 5.2.2.3. no-cache . . . . . . . . . . . . . . . . . . . . 26 121 5.2.2.4. no-store . . . . . . . . . . . . . . . . . . . . 27 122 5.2.2.5. no-transform . . . . . . . . . . . . . . . . . . 27 123 5.2.2.6. public . . . . . . . . . . . . . . . . . . . . . 27 124 5.2.2.7. private . . . . . . . . . . . . . . . . . . . . . 28 125 5.2.2.8. proxy-revalidate . . . . . . . . . . . . . . . . 28 126 5.2.2.9. max-age . . . . . . . . . . . . . . . . . . . . . 29 127 5.2.2.10. s-maxage . . . . . . . . . . . . . . . . . . . . 29 128 5.2.3. Cache Control Extensions . . . . . . . . . . . . . . 29 129 5.2.4. Cache Directive Registry . . . . . . . . . . . . . . 30 130 5.3. Expires . . . . . . . . . . . . . . . . . . . . . . . . . 31 131 5.4. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 32 132 5.5. Warning . . . . . . . . . . . . . . . . . . . . . . . . . 32 133 6. Relationship to Applications . . . . . . . . . . . . . . . . 32 134 7. Security Considerations . . . . . . . . . . . . . . . . . . . 33 135 7.1. Cache Poisoning . . . . . . . . . . . . . . . . . . . . . 33 136 7.2. Timing Attacks . . . . . . . . . . . . . . . . . . . . . 33 137 7.3. Caching of Sensitive Information . . . . . . . . . . . . 34 138 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 139 8.1. Field Registration . . . . . . . . . . . . . . . . . . . 34 140 8.2. Cache Directive Registration . . . . . . . . . . . . . . 34 141 8.3. Warn Code Registry . . . . . . . . . . . . . . . . . . . 34 142 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 143 9.1. Normative References . . . . . . . . . . . . . . . . . . 34 144 9.2. Informative References . . . . . . . . . . . . . . . . . 35 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 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 158 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 42 159 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 161 1. Introduction 163 The Hypertext Transfer Protocol (HTTP) is a stateless application- 164 level request/response protocol that uses extensible semantics and 165 self-descriptive messages for flexible interaction with network-based 166 hypertext information systems. HTTP is defined by a series of 167 documents that collectively form the HTTP/1.1 specification: 169 o "HTTP Semantics" [Semantics] 171 o "HTTP Caching" (this document) 173 o "HTTP/1.1 Messaging" [Messaging] 175 HTTP is typically used for distributed information systems, where 176 performance can be improved by the use of response caches. This 177 document defines aspects of HTTP related to caching and reusing 178 response messages. 180 An HTTP cache is a local store of response messages and the subsystem 181 that controls storage, retrieval, and deletion of messages in it. A 182 cache stores cacheable responses in order to reduce the response time 183 and network bandwidth consumption on future, equivalent requests. 184 Any client or server MAY employ a cache, though a cache cannot be 185 used by a server that is acting as a tunnel. 187 A shared cache is a cache that stores responses to be reused by more 188 than one user; shared caches are usually (but not always) deployed as 189 a part of an intermediary. A private cache, in contrast, is 190 dedicated to a single user; often, they are deployed as a component 191 of a user agent. 193 The goal of caching in HTTP is to significantly improve performance 194 by reusing a prior response message to satisfy a current request. A 195 stored response is considered "fresh", as defined in Section 4.2, if 196 the response can be reused without "validation" (checking with the 197 origin server to see if the cached response remains valid for this 198 request). A fresh response can therefore reduce both latency and 199 network overhead each time it is reused. When a cached response is 200 not fresh, it might still be reusable if it can be freshened by 201 validation (Section 4.3) or if the origin is unavailable 202 (Section 4.2.4). 204 This document obsoletes RFC 7234, with the changes being summarized 205 in Appendix B. 207 1.1. Requirements Notation 209 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 210 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 211 "OPTIONAL" in this document are to be interpreted as described in BCP 212 14 [RFC2119] [RFC8174] when, and only when, they appear in all 213 capitals, as shown here. 215 Conformance criteria and considerations regarding error handling are 216 defined in Section 3 of [Semantics]. 218 1.2. Syntax Notation 220 This specification uses the Augmented Backus-Naur Form (ABNF) 221 notation of [RFC5234], extended with the notation for case- 222 sensitivity in strings defined in [RFC7405]. 224 It also uses a list extension, defined in Section 4.5 of [Semantics], 225 that allows for compact definition of comma-separated lists using a 226 '#' operator (similar to how the '*' operator indicates repetition). 227 Appendix A shows the collected grammar with all list operators 228 expanded to standard ABNF notation. 230 The following core rules are included by reference, as defined in 231 [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF 232 (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), 233 HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line 234 feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any 235 visible [USASCII] character). 237 The rules below are defined in [Semantics]: 239 HTTP-date = 240 OWS = 241 field-name = 242 quoted-string = 243 token = 245 1.3. Delta Seconds 247 The delta-seconds rule specifies a non-negative integer, representing 248 time in seconds. 250 delta-seconds = 1*DIGIT 252 A recipient parsing a delta-seconds value and converting it to binary 253 form ought to use an arithmetic type of at least 31 bits of non- 254 negative integer range. If a cache receives a delta-seconds value 255 greater than the greatest integer it can represent, or if any of its 256 subsequent calculations overflows, the cache MUST consider the value 257 to be either 2147483648 (2^31) or the greatest positive integer it 258 can conveniently represent. 260 Note: The value 2147483648 is here for historical reasons, 261 effectively represents infinity (over 68 years), and does not need 262 to be stored in binary form; an implementation could produce it as 263 a canned string if any overflow occurs, even if the calculations 264 are performed with an arithmetic type incapable of directly 265 representing that number. What matters here is that an overflow 266 be detected and not treated as a negative value in later 267 calculations. 269 2. Overview of Cache Operation 271 Proper cache operation preserves the semantics of HTTP transfers 272 ([Semantics]) while reducing the transfer of information already held 273 in the cache. Although caching is an entirely OPTIONAL feature of 274 HTTP, it can be assumed that reusing a cached response is desirable 275 and that such reuse is the default behavior when no requirement or 276 local configuration prevents it. Therefore, HTTP cache requirements 277 are focused on preventing a cache from either storing a non-reusable 278 response or reusing a stored response inappropriately, rather than 279 mandating that caches always store and reuse particular responses. 281 The base cache key consists of the request method and target URI used 282 to retrieve the stored response; the method determines under which 283 circumstances that response can be used to satisfy a request. 284 However, many HTTP caches in common use today only cache GET 285 responses, and therefore only use the URI as the cache key, 286 forwarding other methods. 288 If a request target is subject to content negotiation, the cache 289 might store multiple responses for it. Caches differentiate these 290 responses by incorporating values of the original request's selecting 291 header fields into the cache key as well, as per Section 4.1. 293 Furthermore, caches might incorporate additional material into the 294 cache key. For example, user agent caches might include the 295 referring site's identity, thereby "double keying" the cache to avoid 296 some privacy risks (see Section 7.2). 298 Most commonly, caches store the successful result of a retrieval 299 request: i.e., a 200 (OK) response to a GET request, which contains a 300 representation of the resource identified by the request target 301 (Section 7.3.1 of [Semantics]). However, it is also possible to 302 store redirects, negative results (e.g., 404 (Not Found)), incomplete 303 results (e.g., 206 (Partial Content)), and responses to methods other 304 than GET if the method's definition allows such caching and defines 305 something suitable for use as a cache key. 307 A cache is disconnected when it cannot contact the origin server or 308 otherwise find a forward path for a given request. A disconnected 309 cache can serve stale responses in some circumstances 310 (Section 4.2.4). 312 3. Storing Responses in Caches 314 A cache MUST NOT store a response to a request unless: 316 o the request method is understood by the cache; 318 o the response status code is final (see Section 9 of [Semantics]); 320 o if the response status code is 206 or 304, or the "must- 321 understand" cache directive (see Section 5.2) is present: the 322 cache understands the response status code; 324 o the "no-store" cache directive is not present in the response (see 325 Section 5.2); 327 o if the cache is shared: the "private" response directive is either 328 not present or allows a modified response to be stored by a shared 329 cache; see Section 5.2.2.7); 331 o if the cache is shared: the Authorization header field is not 332 present in the request (see Section 8.5.3 of [Semantics]) or a 333 response directive is present that explicitly allows shared 334 caching (see Section 3.2); and, 336 o the response contains at least one of: 338 * a public response directive (see Section 5.2.2.6); 340 * an Expires header field (see Section 5.3); 342 * a max-age response directive (see Section 5.2.2.9); 344 * if the cache is shared, an s-maxage response directive (see 345 Section 5.2.2.10); 347 * a Cache Control Extension that allows it to be cached (see 348 Section 5.2.3); or, 350 * a status code that is defined as heuristically cacheable (see 351 Section 4.2.2). 353 Note that any of the requirements listed above can be overridden by a 354 cache-control extension; see Section 5.2.3. 356 In this context, a cache has "understood" a request method or a 357 response status code if it recognizes it and implements all specified 358 caching-related behavior. 360 Note that, in normal operation, some caches will not store a response 361 that has neither a cache validator nor an explicit expiration time, 362 as such responses are not usually useful to store. However, caches 363 are not prohibited from storing such responses. 365 3.1. Storing Incomplete Responses 367 A response message is considered complete when all of the octets 368 indicated by its framing are available. Note that, when no explicit 369 framing is provided, a response message that is ended by the 370 connection's close is considered complete even though it might be 371 indistinguishable from an incomplete response (see [Messaging], 372 Section 6.3). A cache SHOULD consider a close-terminated response 373 incomplete if the connection termination is detected to be an error. 374 A server that wishes to avoid premature termination resulting in an 375 incorrect cached response SHOULD send the response with explicit 376 framing. 378 If the request method is GET, the response status code is 200 (OK), 379 and the entire response header section has been received, a cache MAY 380 store an incomplete response message body if the stored response is 381 recorded as incomplete. Likewise, a 206 (Partial Content) response 382 MAY be stored as if it were an incomplete 200 (OK) response. 383 However, a cache MUST NOT store incomplete or partial-content 384 responses if it does not support the Range and Content-Range header 385 fields or if it does not understand the range units used in those 386 fields. 388 A cache MAY complete a stored incomplete response by making a 389 subsequent range request (Section 8.3 of [Semantics]) and combining 390 the successful response with the stored response, as defined in 391 Section 3.3. A cache MUST NOT use an incomplete response to answer 392 requests unless the response has been made complete or the request is 393 partial and specifies a range that is wholly within the incomplete 394 response. A cache MUST NOT send a partial response to a client 395 without explicitly marking it as such using the 206 (Partial Content) 396 status code. 398 3.2. Storing Responses to Authenticated Requests 400 A shared cache MUST NOT use a cached response to a request with an 401 Authorization header field (Section 8.5.3 of [Semantics]) to satisfy 402 any subsequent request unless the response contains a Cache-Control 403 field with a response directive (Section 5.2.2) that allows it to be 404 stored by a shared cache and the cache conforms to the requirements 405 of that directive for that response. 407 In this specification, the following response directives have such an 408 effect: must-revalidate (Section 5.2.2.1), public (Section 5.2.2.6), 409 and s-maxage (Section 5.2.2.10). 411 3.3. Combining Partial Content 413 A response might transfer only a partial representation if the 414 connection closed prematurely or if the request used one or more 415 Range specifiers (Section 8.3 of [Semantics]). After several such 416 transfers, a cache might have received several ranges of the same 417 representation. A cache MAY combine these ranges into a single 418 stored response, and reuse that response to satisfy later requests, 419 if they all share the same strong validator and the cache complies 420 with the client requirements in Section 9.3.7.3 of [Semantics]. 422 When combining the new response with one or more stored responses, a 423 cache MUST use the header fields provided in the new response, aside 424 from Content-Range, to replace all instances of the corresponding 425 header fields in the stored response. 427 4. Constructing Responses from Caches 429 When presented with a request, a cache MUST NOT reuse a stored 430 response, unless: 432 o The presented effective request URI (Section 5.5 of [Semantics]) 433 and that of the stored response match, and 435 o the request method associated with the stored response allows it 436 to be used for the presented request, and 438 o selecting header fields nominated by the stored response (if any) 439 match those presented (see Section 4.1), and 441 o the stored response does not contain the no-cache cache directive 442 (Section 5.2.2.3), unless it is successfully validated 443 (Section 4.3), and 445 o the stored response is either: 447 * fresh (see Section 4.2), or 449 * allowed to be served stale (see Section 4.2.4), or 451 * successfully validated (see Section 4.3). 453 Note that any of the requirements listed above can be overridden by a 454 cache-control extension; see Section 5.2.3. 456 When a stored response is used to satisfy a request without 457 validation, a cache MUST generate an Age header field (Section 5.1), 458 replacing any present in the response with a value equal to the 459 stored response's current_age; see Section 4.2.3. 461 A cache MUST write through requests with methods that are unsafe 462 (Section 7.2.1 of [Semantics]) to the origin server; i.e., a cache is 463 not allowed to generate a reply to such a request before having 464 forwarded the request and having received a corresponding response. 466 Also, note that unsafe requests might invalidate already-stored 467 responses; see Section 4.4. 469 When more than one suitable response is stored, a cache MUST use the 470 most recent one (as determined by the Date header field). It can 471 also forward the request with "Cache-Control: max-age=0" or "Cache- 472 Control: no-cache" to disambiguate which response to use. 474 A cache that does not have a clock available MUST NOT use stored 475 responses without revalidating them upon every use. 477 4.1. Calculating Cache Keys with Vary 479 When a cache receives a request that can be satisfied by a stored 480 response that has a Vary header field (Section 10.1.4 of 481 [Semantics]), it MUST NOT use that response unless all of the 482 selecting header fields nominated by the Vary header field match in 483 both the original request (i.e., that associated with the stored 484 response), and the presented request. 486 The selecting header fields from two requests are defined to match if 487 and only if those in the first request can be transformed to those in 488 the second request by applying any of the following: 490 o adding or removing whitespace, where allowed in the header field's 491 syntax 493 o combining multiple header fields with the same field name (see 494 Section 4.4 of [Semantics]) 496 o normalizing both header field values in a way that is known to 497 have identical semantics, according to the header field's 498 specification (e.g., reordering field values when order is not 499 significant; case-normalization, where values are defined to be 500 case-insensitive) 502 If (after any normalization that might take place) a header field is 503 absent from a request, it can only match another request if it is 504 also absent there. 506 A Vary header field value containing a member "*" always fails to 507 match. 509 The stored response with matching selecting header fields is known as 510 the selected response. 512 If multiple selected responses are available (potentially including 513 responses without a Vary header field), the cache will need to choose 514 one to use. When a selecting header field has a known mechanism for 515 doing so (e.g., qvalues on Accept and similar request header fields), 516 that mechanism MAY be used to select preferred responses; of the 517 remainder, the most recent response (as determined by the Date header 518 field) is used, as per Section 4. 520 Note that in practice, some resources might send the Vary header 521 field on responses inconsistently. When a cache has multiple 522 responses for a given target URI, and one or more omits the Vary 523 header field, it SHOULD use the most recent non-empty value available 524 to select an appropriate response for the request. 526 If no selected response is available, the cache cannot satisfy the 527 presented request. Typically, it is forwarded to the origin server 528 in a (possibly conditional; see Section 4.3) request. 530 4.2. Freshness 532 A fresh response is one whose age has not yet exceeded its freshness 533 lifetime. Conversely, a stale response is one where it has. 535 A response's freshness lifetime is the length of time between its 536 generation by the origin server and its expiration time. An explicit 537 expiration time is the time at which the origin server intends that a 538 stored response can no longer be used by a cache without further 539 validation, whereas a heuristic expiration time is assigned by a 540 cache when no explicit expiration time is available. 542 A response's age is the time that has passed since it was generated 543 by, or successfully validated with, the origin server. 545 When a response is "fresh" in the cache, it can be used to satisfy 546 subsequent requests without contacting the origin server, thereby 547 improving efficiency. 549 The primary mechanism for determining freshness is for an origin 550 server to provide an explicit expiration time in the future, using 551 either the Expires header field (Section 5.3) or the max-age response 552 directive (Section 5.2.2.9). Generally, origin servers will assign 553 future explicit expiration times to responses in the belief that the 554 representation is not likely to change in a semantically significant 555 way before the expiration time is reached. 557 If an origin server wishes to force a cache to validate every 558 request, it can assign an explicit expiration time in the past to 559 indicate that the response is already stale. Compliant caches will 560 normally validate a stale cached response before reusing it for 561 subsequent requests (see Section 4.2.4). 563 Since origin servers do not always provide explicit expiration times, 564 caches are also allowed to use a heuristic to determine an expiration 565 time under certain circumstances (see Section 4.2.2). 567 The calculation to determine if a response is fresh is: 569 response_is_fresh = (freshness_lifetime > current_age) 571 freshness_lifetime is defined in Section 4.2.1; current_age is 572 defined in Section 4.2.3. 574 Clients can send the max-age or min-fresh request directives 575 (Section 5.2.1) to constrain or relax freshness calculations for the 576 corresponding response. However, caches are not required to honor 577 them. 579 When calculating freshness, to avoid common problems in date parsing: 581 o Although all date formats are specified to be case-sensitive, a 582 cache recipient SHOULD match day, week, and time-zone names case- 583 insensitively. 585 o If a cache recipient's internal implementation of time has less 586 resolution than the value of an HTTP-date, the recipient MUST 587 internally represent a parsed Expires date as the nearest time 588 equal to or earlier than the received value. 590 o A cache recipient MUST NOT allow local time zones to influence the 591 calculation or comparison of an age or expiration time. 593 o A cache recipient SHOULD consider a date with a zone abbreviation 594 other than GMT or UTC to be invalid for calculating expiration. 596 Note that freshness applies only to cache operation; it cannot be 597 used to force a user agent to refresh its display or reload a 598 resource. See Section 6 for an explanation of the difference between 599 caches and history mechanisms. 601 4.2.1. Calculating Freshness Lifetime 603 A cache can calculate the freshness lifetime (denoted as 604 freshness_lifetime) of a response by using the first match of the 605 following: 607 o If the cache is shared and the s-maxage response directive 608 (Section 5.2.2.10) is present, use its value, or 610 o If the max-age response directive (Section 5.2.2.9) is present, 611 use its value, or 613 o If the Expires response header field (Section 5.3) is present, use 614 its value minus the value of the Date response header field, or 616 o Otherwise, no explicit expiration time is present in the response. 617 A heuristic freshness lifetime might be applicable; see 618 Section 4.2.2. 620 Note that this calculation is not vulnerable to clock skew, since all 621 of the information comes from the origin server. 623 When there is more than one value present for a given directive 624 (e.g., two Expires header fields, multiple Cache-Control: max-age 625 directives), the directive's value is considered invalid. Caches are 626 encouraged to consider responses that have invalid freshness 627 information to be stale. 629 4.2.2. Calculating Heuristic Freshness 631 Since origin servers do not always provide explicit expiration times, 632 a cache MAY assign a heuristic expiration time when an explicit time 633 is not specified, employing algorithms that use other header field 634 values (such as the Last-Modified time) to estimate a plausible 635 expiration time. This specification does not provide specific 636 algorithms, but does impose worst-case constraints on their results. 638 A cache MUST NOT use heuristics to determine freshness when an 639 explicit expiration time is present in the stored response. Because 640 of the requirements in Section 3, this means that, effectively, 641 heuristics can only be used on responses without explicit freshness 642 whose status codes are defined as "heuristically cacheable" (e.g., 643 see Section 9.1 of [Semantics]), and those responses without explicit 644 freshness that have been marked as explicitly cacheable (e.g., with a 645 "public" response directive). 647 Note that in previous specifications heuristically cacheable response 648 status codes were called "cacheable by default." 650 If the response has a Last-Modified header field (Section 10.2.2 of 651 [Semantics]), caches are encouraged to use a heuristic expiration 652 value that is no more than some fraction of the interval since that 653 time. A typical setting of this fraction might be 10%. 655 Note: Section 13.9 of [RFC2616] prohibited caches from calculating 656 heuristic freshness for URIs with query components (i.e., those 657 containing '?'). In practice, this has not been widely 658 implemented. Therefore, origin servers are encouraged to send 659 explicit directives (e.g., Cache-Control: no-cache) if they wish 660 to preclude caching. 662 4.2.3. Calculating Age 664 The Age header field is used to convey an estimated age of the 665 response message when obtained from a cache. The Age field value is 666 the cache's estimate of the number of seconds since the response was 667 generated or validated by the origin server. In essence, the Age 668 value is the sum of the time that the response has been resident in 669 each of the caches along the path from the origin server, plus the 670 amount of time it has been in transit along network paths. 672 The following data is used for the age calculation: 674 age_value The term "age_value" denotes the value of the Age header 675 field (Section 5.1), in a form appropriate for arithmetic 676 operation; or 0, if not available. 678 date_value The term "date_value" denotes the value of the Date 679 header field, in a form appropriate for arithmetic operations. 680 See Section 10.1.1.2 of [Semantics] for the definition of the Date 681 header field, and for requirements regarding responses without it. 683 now The term "now" means "the current value of the clock at the host 684 performing the calculation". A host ought to use NTP ([RFC5905]) 685 or some similar protocol to synchronize its clocks to Coordinated 686 Universal Time. 688 request_time The current value of the clock at the host at the time 689 the request resulting in the stored response was made. 691 response_time The current value of the clock at the host at the time 692 the response was received. 694 A response's age can be calculated in two entirely independent ways: 696 1. the "apparent_age": response_time minus date_value, if the local 697 clock is reasonably well synchronized to the origin server's 698 clock. If the result is negative, the result is replaced by 699 zero. 701 2. the "corrected_age_value", if all of the caches along the 702 response path implement HTTP/1.1 or greater. A cache MUST 703 interpret this value relative to the time the request was 704 initiated, not the time that the response was received. 706 apparent_age = max(0, response_time - date_value); 708 response_delay = response_time - request_time; 709 corrected_age_value = age_value + response_delay; 711 These are combined as 713 corrected_initial_age = max(apparent_age, corrected_age_value); 715 unless the cache is confident in the value of the Age header field 716 (e.g., because there are no HTTP/1.0 hops in the Via header field), 717 in which case the corrected_age_value MAY be used as the 718 corrected_initial_age. 720 The current_age of a stored response can then be calculated by adding 721 the amount of time (in seconds) since the stored response was last 722 validated by the origin server to the corrected_initial_age. 724 resident_time = now - response_time; 725 current_age = corrected_initial_age + resident_time; 727 4.2.4. Serving Stale Responses 729 A "stale" response is one that either has explicit expiry information 730 or is allowed to have heuristic expiry calculated, but is not fresh 731 according to the calculations in Section 4.2. 733 A cache MUST NOT generate a stale response if it is prohibited by an 734 explicit in-protocol directive (e.g., by a "no-store" or "no-cache" 735 cache directive, a "must-revalidate" cache-response-directive, or an 736 applicable "s-maxage" or "proxy-revalidate" cache-response-directive; 737 see Section 5.2.2). 739 A cache MUST NOT generate a stale response unless it is disconnected 740 or doing so is explicitly permitted by the client or origin server 741 (e.g., by the max-stale request directive in Section 5.2.1, by 742 extension directives such as those defined in [RFC5861], or by 743 configuration in accordance with an out-of-band contract). 745 4.3. Validation 747 When a cache has one or more stored responses for a requested URI, 748 but cannot serve any of them (e.g., because they are not fresh, or 749 one cannot be selected; see Section 4.1), it can use the conditional 750 request mechanism Section 8.2 of [Semantics] in the forwarded request 751 to give the next inbound server an opportunity to select a valid 752 stored response to use, updating the stored metadata in the process, 753 or to replace the stored response(s) with a new response. This 754 process is known as "validating" or "revalidating" the stored 755 response. 757 4.3.1. Sending a Validation Request 759 When generating a conditional request for validation, a cache starts 760 with either a request it is attempting to satisfy, or -- if it is 761 initiating the request independently -- it synthesises a request 762 using a stored response by copying the method, request-target, and 763 request header fields identified by the Vary header field 764 Section 4.1. 766 It then updates that request with one or more precondition header 767 fields. These contain validator metadata sourced from stored 768 response(s) that have the same cache key. 770 The precondition header fields are then compared by recipients to 771 determine whether any stored response is equivalent to a current 772 representation of the resource. 774 One such validator is the timestamp given in a Last-Modified header 775 field (Section 10.2.2 of [Semantics]), which can be used in an If- 776 Modified-Since header field for response validation, or in an If- 777 Unmodified-Since or If-Range header field for representation 778 selection (i.e., the client is referring specifically to a previously 779 obtained representation with that timestamp). 781 Another validator is the entity-tag given in an ETag field 782 (Section 10.2.3 of [Semantics]). One or more entity-tags, indicating 783 one or more stored responses, can be used in an If-None-Match header 784 field for response validation, or in an If-Match or If-Range header 785 field for representation selection (i.e., the client is referring 786 specifically to one or more previously obtained representations with 787 the listed entity-tags). 789 4.3.2. Handling a Received Validation Request 791 Each client in the request chain may have its own cache, so it is 792 common for a cache at an intermediary to receive conditional requests 793 from other (outbound) caches. Likewise, some user agents make use of 794 conditional requests to limit data transfers to recently modified 795 representations or to complete the transfer of a partially retrieved 796 representation. 798 If a cache receives a request that can be satisfied by reusing one of 799 its stored 200 (OK) or 206 (Partial Content) responses, the cache 800 SHOULD evaluate any applicable conditional header field preconditions 801 received in that request with respect to the corresponding validators 802 contained within the selected response. A cache MUST NOT evaluate 803 conditional header fields that are only applicable to an origin 804 server, found in a request with semantics that cannot be satisfied 805 with a cached response, or applied to a target resource for which it 806 has no stored responses; such preconditions are likely intended for 807 some other (inbound) server. 809 The proper evaluation of conditional requests by a cache depends on 810 the received precondition header fields and their precedence, as 811 defined in Section 8.2.2 of [Semantics]. The If-Match and If- 812 Unmodified-Since conditional header fields are not applicable to a 813 cache. 815 A request containing an If-None-Match header field (Section 8.2.4 of 816 [Semantics]) indicates that the client wants to validate one or more 817 of its own stored responses in comparison to whichever stored 818 response is selected by the cache. If the field value is "*", or if 819 the field value is a list of entity-tags and at least one of them 820 matches the entity-tag of the selected stored response, a cache 821 recipient SHOULD generate a 304 (Not Modified) response (using the 822 metadata of the selected stored response) instead of sending that 823 stored response. 825 When a cache decides to revalidate its own stored responses for a 826 request that contains an If-None-Match list of entity-tags, the cache 827 MAY combine the received list with a list of entity-tags from its own 828 stored set of responses (fresh or stale) and send the union of the 829 two lists as a replacement If-None-Match header field value in the 830 forwarded request. If a stored response contains only partial 831 content, the cache MUST NOT include its entity-tag in the union 832 unless the request is for a range that would be fully satisfied by 833 that partial stored response. If the response to the forwarded 834 request is 304 (Not Modified) and has an ETag field value with an 835 entity-tag that is not in the client's list, the cache MUST generate 836 a 200 (OK) response for the client by reusing its corresponding 837 stored response, as updated by the 304 response metadata 838 (Section 4.3.4). 840 If an If-None-Match header field is not present, a request containing 841 an If-Modified-Since header field (Section 8.2.5 of [Semantics]) 842 indicates that the client wants to validate one or more of its own 843 stored responses by modification date. A cache recipient SHOULD 844 generate a 304 (Not Modified) response (using the metadata of the 845 selected stored response) if one of the following cases is true: 1) 846 the selected stored response has a Last-Modified field value that is 847 earlier than or equal to the conditional timestamp; 2) no Last- 848 Modified field is present in the selected stored response, but it has 849 a Date field value that is earlier than or equal to the conditional 850 timestamp; or, 3) neither Last-Modified nor Date is present in the 851 selected stored response, but the cache recorded it as having been 852 received at a time earlier than or equal to the conditional 853 timestamp. 855 A cache that implements partial responses to range requests, as 856 defined in Section 8.3 of [Semantics], also needs to evaluate a 857 received If-Range header field (Section 8.2.7 of [Semantics]) with 858 respect to its selected stored response. 860 4.3.3. Handling a Validation Response 862 Cache handling of a response to a conditional request is dependent 863 upon its status code: 865 o A 304 (Not Modified) response status code indicates that the 866 stored response can be updated and reused; see Section 4.3.4. 868 o A full response (i.e., one with a payload body) indicates that 869 none of the stored responses nominated in the conditional request 870 is suitable. Instead, the cache MUST use the full response to 871 satisfy the request and MAY replace the stored response(s). 873 o However, if a cache receives a 5xx (Server Error) response while 874 attempting to validate a response, it can either forward this 875 response to the requesting client, or act as if the server failed 876 to respond. In the latter case, the cache MAY send a previously 877 stored response (see Section 4.2.4). 879 4.3.4. Freshening Stored Responses upon Validation 881 When a cache receives a 304 (Not Modified) response and already has 882 one or more stored 200 (OK) responses for the applicable cache key, 883 the cache needs to identify which (if any) are to be updated by the 884 new information provided, and then do so. 886 The stored response(s) to update are identified by using the first 887 match (if any) of the following: 889 o If the new response contains a strong validator (see 890 Section 10.2.1 of [Semantics]), then that strong validator 891 identifies the selected representation for update. All of the 892 stored responses with the same strong validator are identified for 893 update. If none of the stored responses contain the same strong 894 validator, then the cache MUST NOT use the new response to update 895 any stored responses. 897 o If the new response contains a weak validator and that validator 898 corresponds to one of the cache's stored responses, then the most 899 recent of those matching stored responses is identified for 900 update. 902 o If the new response does not include any form of validator (such 903 as in the case where a client generates an If-Modified-Since 904 request from a source other than the Last-Modified response header 905 field), and there is only one stored response, and that stored 906 response also lacks a validator, then that stored response is 907 identified for update. 909 For each stored response identified for update, the cache MUST use 910 the header fields provided in the 304 (Not Modified) response to 911 replace all instances of the corresponding header fields in the 912 stored response. 914 4.3.5. Freshening Responses with HEAD 916 A response to the HEAD method is identical to what an equivalent 917 request made with a GET would have been, except it lacks a body. 918 This property of HEAD responses can be used to invalidate or update a 919 cached GET response if the more efficient conditional GET request 920 mechanism is not available (due to no validators being present in the 921 stored response) or if transmission of the representation body is not 922 desired even if it has changed. 924 When a cache makes an inbound HEAD request for a given request target 925 and receives a 200 (OK) response, the cache SHOULD update or 926 invalidate each of its stored GET responses that could have been 927 selected for that request (see Section 4.1). 929 For each of the stored responses that could have been selected, if 930 the stored response and HEAD response have matching values for any 931 received validator fields (ETag and Last-Modified) and, if the HEAD 932 response has a Content-Length header field, the value of Content- 933 Length matches that of the stored response, the cache SHOULD update 934 the stored response as described below; otherwise, the cache SHOULD 935 consider the stored response to be stale. 937 If a cache updates a stored response with the metadata provided in a 938 HEAD response, the cache MUST use the header fields provided in the 939 HEAD response to replace all instances of the corresponding header 940 fields in the stored response and append new header fields to the 941 stored response's header section unless otherwise restricted by the 942 Cache-Control header field. 944 4.4. Invalidation 946 Because unsafe request methods (Section 7.2.1 of [Semantics]) such as 947 PUT, POST or DELETE have the potential for changing state on the 948 origin server, intervening caches can use them to keep their contents 949 up to date. 951 A cache MUST invalidate the effective Request URI (Section 5.5 of 952 [Semantics]) as well as the URI(s) in the Location and Content- 953 Location response header fields (if present) when a non-error status 954 code is received in response to an unsafe request method. 956 However, a cache MUST NOT invalidate a URI from a Location or 957 Content-Location response header field if the host part of that URI 958 differs from the host part in the effective request URI (Section 5.5 959 of [Semantics]). This helps prevent denial-of-service attacks. 961 A cache MUST invalidate the effective request URI (Section 5.5 of 962 [Semantics]) when it receives a non-error response to a request with 963 a method whose safety is unknown. 965 Here, a "non-error response" is one with a 2xx (Successful) or 3xx 966 (Redirection) status code. "Invalidate" means that the cache will 967 either remove all stored responses related to the effective request 968 URI or will mark these as "invalid" and in need of a mandatory 969 validation before they can be sent in response to a subsequent 970 request. 972 Note that this does not guarantee that all appropriate responses are 973 invalidated. For example, a state-changing request might invalidate 974 responses in the caches it travels through, but relevant responses 975 still might be stored in other caches that it has not. 977 5. Field Definitions 979 This section defines the syntax and semantics of HTTP fields related 980 to caching. 982 +---------------+-----------+--------------+ 983 | Field Name | Status | Reference | 984 +---------------+-----------+--------------+ 985 | Age | standard | Section 5.1 | 986 | Cache-Control | standard | Section 5.2 | 987 | Expires | standard | Section 5.3 | 988 | Pragma | standard | Section 5.4 | 989 | Warning | obsoleted | Section 5.5 | 990 +---------------+-----------+--------------+ 992 Table 1 994 5.1. Age 996 The "Age" header field conveys the sender's estimate of the amount of 997 time since the response was generated or successfully validated at 998 the origin server. Age values are calculated as specified in 999 Section 4.2.3. 1001 Age = delta-seconds 1003 The Age field value is a non-negative integer, representing time in 1004 seconds (see Section 1.3). 1006 The presence of an Age header field implies that the response was not 1007 generated or validated by the origin server for this request. 1008 However, lack of an Age header field does not imply the origin was 1009 contacted, since the response might have been received from an 1010 HTTP/1.0 cache that does not implement Age. 1012 5.2. Cache-Control 1014 The "Cache-Control" header field is used to list directives for 1015 caches along the request/response chain. Such cache directives are 1016 unidirectional in that the presence of a directive in a request does 1017 not imply that the same directive is present in the response, or to 1018 be repeated in it. 1020 See Section 5.2.3 for information about how Cache-Control directives 1021 defined elsewhere are handled. 1023 Note: Some HTTP/1.0 caches might not implement Cache-Control. 1025 A proxy, whether or not it implements a cache, MUST pass cache 1026 directives through in forwarded messages, regardless of their 1027 significance to that application, since the directives might be 1028 applicable to all recipients along the request/response chain. It is 1029 not possible to target a directive to a specific cache. 1031 Cache directives are identified by a token, to be compared case- 1032 insensitively, and have an optional argument, that can use both token 1033 and quoted-string syntax. For the directives defined below that 1034 define arguments, recipients ought to accept both forms, even if a 1035 specific form is required for generation. 1037 Cache-Control = 1#cache-directive 1039 cache-directive = token [ "=" ( token / quoted-string ) ] 1041 For the cache directives defined below, no argument is defined (nor 1042 allowed) unless stated otherwise. 1044 +------------------+-----------------------------------+ 1045 | Cache Directive | Reference | 1046 +------------------+-----------------------------------+ 1047 | max-age | Section 5.2.1.1, Section 5.2.2.9 | 1048 | max-stale | Section 5.2.1.2 | 1049 | min-fresh | Section 5.2.1.3 | 1050 | must-revalidate | Section 5.2.2.1 | 1051 | must-understand | Section 5.2.2.2 | 1052 | no-cache | Section 5.2.1.4, Section 5.2.2.3 | 1053 | no-store | Section 5.2.1.5, Section 5.2.2.4 | 1054 | no-transform | Section 5.2.1.6, Section 5.2.2.5 | 1055 | only-if-cached | Section 5.2.1.7 | 1056 | private | Section 5.2.2.7 | 1057 | proxy-revalidate | Section 5.2.2.8 | 1058 | public | Section 5.2.2.6 | 1059 | s-maxage | Section 5.2.2.10 | 1060 +------------------+-----------------------------------+ 1062 Table 2 1064 5.2.1. Request Cache-Control Directives 1066 This section defines cache request directives. They are advisory; 1067 caches MAY implement them, but are not required to. 1069 5.2.1.1. max-age 1071 Argument syntax: 1073 delta-seconds (see Section 1.3) 1075 The "max-age" request directive indicates that the client prefers a 1076 response whose age is less than or equal to the specified number of 1077 seconds. Unless the max-stale request directive is also present, the 1078 client does not wish to receive a stale response. 1080 This directive uses the token form of the argument syntax: e.g., 1081 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1082 quoted-string form. 1084 5.2.1.2. max-stale 1086 Argument syntax: 1088 delta-seconds (see Section 1.3) 1090 The "max-stale" request directive indicates that the client is 1091 willing to accept a response that has exceeded its freshness 1092 lifetime. If a value is present, then the client is willing to 1093 accept a response that has exceeded its freshness lifetime by no more 1094 than the specified number of seconds. If no value is assigned to 1095 max-stale, then the client is willing to accept a stale response of 1096 any age. 1098 This directive uses the token form of the argument syntax: e.g., 1099 'max-stale=10' not 'max-stale="10"'. A sender MUST NOT generate the 1100 quoted-string form. 1102 5.2.1.3. min-fresh 1104 Argument syntax: 1106 delta-seconds (see Section 1.3) 1108 The "min-fresh" request directive indicates that the client prefers a 1109 response whose freshness lifetime is no less than its current age 1110 plus the specified time in seconds. That is, the client wants a 1111 response that will still be fresh for at least the specified number 1112 of seconds. 1114 This directive uses the token form of the argument syntax: e.g., 1115 'min-fresh=20' not 'min-fresh="20"'. A sender MUST NOT generate the 1116 quoted-string form. 1118 5.2.1.4. no-cache 1120 The "no-cache" request directive indicates that the client prefers 1121 stored response not be used to satisfy the request without successful 1122 validation on the origin server. 1124 5.2.1.5. no-store 1126 The "no-store" request directive indicates that a cache MUST NOT 1127 store any part of either this request or any response to it. This 1128 directive applies to both private and shared caches. "MUST NOT 1129 store" in this context means that the cache MUST NOT intentionally 1130 store the information in non-volatile storage, and MUST make a best- 1131 effort attempt to remove the information from volatile storage as 1132 promptly as possible after forwarding it. 1134 This directive is NOT a reliable or sufficient mechanism for ensuring 1135 privacy. In particular, malicious or compromised caches might not 1136 recognize or obey this directive, and communications networks might 1137 be vulnerable to eavesdropping. 1139 Note that if a request containing this directive is satisfied from a 1140 cache, the no-store request directive does not apply to the already 1141 stored response. 1143 5.2.1.6. no-transform 1145 The "no-transform" request directive indicates that the client is 1146 asking for intermediares (whether or not they implement a cache) to 1147 avoid transforming the payload, as defined in Section 5.7.2 of 1148 [Semantics]. 1150 5.2.1.7. only-if-cached 1152 The "only-if-cached" request directive indicates that the client only 1153 wishes to obtain a stored response. Caches that honor this request 1154 directive SHOULD, upon receiving it, either respond using a stored 1155 response that is consistent with the other constraints of the 1156 request, or respond with a 504 (Gateway Timeout) status code. 1158 5.2.2. Response Cache-Control Directives 1160 This section defines cache response directives. A cache MUST obey 1161 the requirements of the Cache-Control directives defined in this 1162 section. 1164 5.2.2.1. must-revalidate 1166 The "must-revalidate" response directive indicates that once the 1167 response has become stale, a cache MUST NOT reuse that response to 1168 satisfy another request until it has been successfully validated by 1169 the origin, as defined by Section 4.3. 1171 The must-revalidate directive is necessary to support reliable 1172 operation for certain protocol features. In all circumstances a 1173 cache MUST obey the must-revalidate directive; in particular, if a 1174 cache is disconnected, the cache MUST generate a 504 (Gateway 1175 Timeout) response rather than reuse the stale response. 1177 The must-revalidate directive ought to be used by servers if and only 1178 if failure to validate a request on the representation could result 1179 in incorrect operation, such as a silently unexecuted financial 1180 transaction. 1182 The must-revalidate directive also permits a shared cache to reuse a 1183 response to a request containing an Authorization header field, 1184 subject to the above requirement on revalidation (Section 3.2). 1186 5.2.2.2. must-understand 1188 The "must-understand" response directive limits caching of the 1189 response to a cache that understands and conforms to the requirements 1190 for that response's status code. A cache MUST NOT store a response 1191 containing the must-understand directive if the cache does not 1192 understand the response status code. 1194 5.2.2.3. no-cache 1196 Argument syntax: 1198 #field-name 1200 The "no-cache" response directive, in its unqualified form (without 1201 an argument), indicates that the response MUST NOT be used to satisfy 1202 any other request without forwarding it for validation and receiving 1203 a successful response; see Section 4.3. 1205 This allows an origin server to prevent a cache from using the 1206 response to satisfy a request without contacting it, even by caches 1207 that have been configured to send stale responses. 1209 The qualified form of no-cache response directive, with an argument 1210 that lists one or more field names, indicates that a cache MAY use 1211 the response to satisfy a subsequent request, subject to any other 1212 restrictions on caching, if the listed header fields are excluded 1213 from the subsequent response or the subsequent response has been 1214 successfully revalidated with the origin server (updating or removing 1215 those fields). This allows an origin server to prevent the re-use of 1216 certain header fields in a response, while still allowing caching of 1217 the rest of the response. 1219 The field names given are not limited to the set of header fields 1220 defined by this specification. Field names are case-insensitive. 1222 This directive uses the quoted-string form of the argument syntax. A 1223 sender SHOULD NOT generate the token form (even if quoting appears 1224 not to be needed for single-entry lists). 1226 Note: Although it has been back-ported to many implementations, some 1227 HTTP/1.0 caches will not recognize or obey this directive. Also, the 1228 qualified form of the directive is often handled by caches as if an 1229 unqualified no-cache directive was received; i.e., the special 1230 handling for the qualified form is not widely implemented. 1232 5.2.2.4. no-store 1234 The "no-store" response directive indicates that a cache MUST NOT 1235 store any part of either the immediate request or response, and MUST 1236 NOT use the response to satisfy any other request. 1238 This directive applies to both private and shared caches. "MUST NOT 1239 store" in this context means that the cache MUST NOT intentionally 1240 store the information in non-volatile storage, and MUST make a best- 1241 effort attempt to remove the information from volatile storage as 1242 promptly as possible after forwarding it. 1244 This directive is NOT a reliable or sufficient mechanism for ensuring 1245 privacy. In particular, malicious or compromised caches might not 1246 recognize or obey this directive, and communications networks might 1247 be vulnerable to eavesdropping. 1249 5.2.2.5. no-transform 1251 The "no-transform" response directive indicates that an intermediary 1252 (regardless of whether it implements a cache) MUST NOT transform the 1253 payload, as defined in Section 5.7.2 of [Semantics]. 1255 5.2.2.6. public 1257 The "public" response directive indicates that a cache MAY store the 1258 response even if it would otherwise be prohibited, subject to the 1259 constraints of any other response directives present. In other 1260 words, public explicitly marks the response as cacheable. For 1261 example, public permits a shared cache to reuse a response to a 1262 request containing an Authorization header field (Section 3.2). 1264 If no explicit freshness information is provided, the response is is 1265 heuristically cacheable (Section 4.2.2). 1267 5.2.2.7. private 1269 Argument syntax: 1271 #field-name 1273 The unqualified "private" response directive indicates that a shared 1274 cache MUST NOT store the response (i.e., the response is intended for 1275 a single user). It also indicates that a private cache MAY store the 1276 response, subject to any other cache directives present, even if the 1277 response would not otherwise be heuristically cacheable by a private 1278 cache. 1280 If a qualified private response directive is present, with an 1281 argument that lists one or more field names, then only the listed 1282 fields are limited to a single user: a shared cache MUST NOT store 1283 the listed fields if they are present in the original response, but 1284 MAY store the remainder of the response message without those fields. 1286 The field names given are not limited to the set of header fields 1287 defined by this specification. Field names are case-insensitive. 1289 This directive uses the quoted-string form of the argument syntax. A 1290 sender SHOULD NOT generate the token form (even if quoting appears 1291 not to be needed for single-entry lists). 1293 Note: This usage of the word "private" only controls where the 1294 response can be stored; it cannot ensure the privacy of the message 1295 content. Also, the qualified form of the directive is often handled 1296 by caches as if an unqualified private directive was received; i.e., 1297 the special handling for the qualified form is not widely 1298 implemented. 1300 5.2.2.8. proxy-revalidate 1302 The "proxy-revalidate" response directive indicates that once the 1303 response has become stale, a shared cache MUST NOT reuse that 1304 response to satisfy another request until it has been successfully 1305 validated by the origin, as defined by Section 4.3. This is 1306 analogous to must-revalidate (Section 5.2.2.1), except that proxy- 1307 revalidate does not apply to private caches. 1309 Note that "proxy-revalidate" on its own does not imply that a 1310 response is cacheable. For example, it might be combined with the 1311 public directive (Section 5.2.2.6), allowing the response to be 1312 cached while requiring only a shared cache to revalidate when stale. 1314 5.2.2.9. max-age 1316 Argument syntax: 1318 delta-seconds (see Section 1.3) 1320 The "max-age" response directive indicates that the response is to be 1321 considered stale after its age is greater than the specified number 1322 of seconds. 1324 This directive uses the token form of the argument syntax: e.g., 1325 'max-age=5' not 'max-age="5"'. A sender MUST NOT generate the 1326 quoted-string form. 1328 5.2.2.10. s-maxage 1330 Argument syntax: 1332 delta-seconds (see Section 1.3) 1334 The "s-maxage" response directive indicates that, for a shared cache, 1335 the maximum age specified by this directive overrides the maximum age 1336 specified by either the max-age directive or the Expires header 1337 field. 1339 The s-maxage directive incorporates the proxy-revalidate 1340 (Section 5.2.2.8) response directive's semantics for a shared cache. 1341 A shared cache MUST NOT reuse a stale response with s-maxage to 1342 satisfy another request until it has been successfully validated by 1343 the origin, as defined by Section 4.3. This directive also permits a 1344 shared cache to reuse a response to a request containing an 1345 Authorization header field, subject to the above requirements on 1346 maximum age and revalidation (Section 3.2). 1348 This directive uses the token form of the argument syntax: e.g., 1349 's-maxage=10' not 's-maxage="10"'. A sender MUST NOT generate the 1350 quoted-string form. 1352 5.2.3. Cache Control Extensions 1354 The Cache-Control header field can be extended through the use of one 1355 or more cache-extension tokens, each with an optional value. A cache 1356 MUST ignore unrecognized cache directives. 1358 Informational extensions (those that do not require a change in cache 1359 behavior) can be added without changing the semantics of other 1360 directives. 1362 Behavioral extensions are designed to work by acting as modifiers to 1363 the existing base of cache directives. Both the new directive and 1364 the old directive are supplied, such that applications that do not 1365 understand the new directive will default to the behavior specified 1366 by the old directive, and those that understand the new directive 1367 will recognize it as modifying the requirements associated with the 1368 old directive. In this way, extensions to the existing cache-control 1369 directives can be made without breaking deployed caches. 1371 For example, consider a hypothetical new response directive called 1372 "community" that acts as a modifier to the private directive: in 1373 addition to private caches, any cache that is shared only by members 1374 of the named community is allowed to cache the response. An origin 1375 server wishing to allow the UCI community to use an otherwise private 1376 response in their shared cache(s) could do so by including 1378 Cache-Control: private, community="UCI" 1380 A cache that recognizes such a community cache-extension could 1381 broaden its behavior in accordance with that extension. A cache that 1382 does not recognize the community cache-extension would ignore it and 1383 adhere to the private directive. 1385 New extension directives ought to consider defining: 1387 o What it means for a directive to be specified multiple times, 1389 o When the directive does not take an argument, what it means when 1390 an argument is present, 1392 o When the directive requires an argument, what it means when it is 1393 missing, 1395 o Whether the directive is specific to requests, responses, or able 1396 to be used in either. 1398 5.2.4. Cache Directive Registry 1400 The "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" 1401 defines the namespace for the cache directives. It has been created 1402 and is now maintained at . 1405 A registration MUST include the following fields: 1407 o Cache Directive Name 1409 o Pointer to specification text 1410 Values to be added to this namespace require IETF Review (see 1411 [RFC8126], Section 4.8). 1413 5.3. Expires 1415 The "Expires" header field gives the date/time after which the 1416 response is considered stale. See Section 4.2 for further discussion 1417 of the freshness model. 1419 The presence of an Expires field does not imply that the original 1420 resource will change or cease to exist at, before, or after that 1421 time. 1423 The Expires value is an HTTP-date timestamp, as defined in 1424 Section 10.1.1.1 of [Semantics]. 1426 Expires = HTTP-date 1428 For example 1430 Expires: Thu, 01 Dec 1994 16:00:00 GMT 1432 A cache recipient MUST interpret invalid date formats, especially the 1433 value "0", as representing a time in the past (i.e., "already 1434 expired"). 1436 If a response includes a Cache-Control field with the max-age 1437 directive (Section 5.2.2.9), a recipient MUST ignore the Expires 1438 field. Likewise, if a response includes the s-maxage directive 1439 (Section 5.2.2.10), a shared cache recipient MUST ignore the Expires 1440 field. In both these cases, the value in Expires is only intended 1441 for recipients that have not yet implemented the Cache-Control field. 1443 An origin server without a clock MUST NOT generate an Expires field 1444 unless its value represents a fixed time in the past (always expired) 1445 or its value has been associated with the resource by a system or 1446 user with a reliable clock. 1448 Historically, HTTP required the Expires field value to be no more 1449 than a year in the future. While longer freshness lifetimes are no 1450 longer prohibited, extremely large values have been demonstrated to 1451 cause problems (e.g., clock overflows due to use of 32-bit integers 1452 for time values), and many caches will evict a response far sooner 1453 than that. 1455 5.4. Pragma 1457 The "Pragma" header field was defined for HTTP/1.0 caches, so that 1458 clients could specify a "no-cache" request (as Cache-Control was not 1459 defined until HTTP/1.1). 1461 However, support for Cache-Control is now widespread. As a result, 1462 this specification deprecates Pragma. 1464 Note: Because the meaning of "Pragma: no-cache" in responses was 1465 never specified, it does not provide a reliable replacement for 1466 "Cache-Control: no-cache" in them. 1468 5.5. Warning 1470 The "Warning" header field was used to carry additional information 1471 about the status or transformation of a message that might not be 1472 reflected in the status code. This specification obsoletes it, as it 1473 is not widely generated or surfaced to users. The information it 1474 carried can be gleaned from examining other header fields, such as 1475 Age. 1477 6. Relationship to Applications 1479 Applications using HTTP often specify additional forms of caching. 1480 For example, Web browsers often have history mechanisms such as 1481 "Back" buttons that can be used to redisplay a representation 1482 retrieved earlier in a session. 1484 Likewise, some Web browsers implement caching of images and other 1485 assets within a page view; they may or may not honor HTTP caching 1486 semantics. 1488 The requirements in this specification do not necessarily apply to 1489 how applications use data after it is retrieved from a HTTP cache. 1490 That is, a history mechanism can display a previous representation 1491 even if it has expired, and an application can use cached data in 1492 other ways beyond its freshness lifetime. 1494 This does not prohibit the application from taking HTTP caching into 1495 account; for example, a history mechanism might tell the user that a 1496 view is stale, or it might honor cache directives (e.g., Cache- 1497 Control: no-store). 1499 7. Security Considerations 1501 This section is meant to inform developers, information providers, 1502 and users of known security concerns specific to HTTP caching. More 1503 general security considerations are addressed in HTTP messaging 1504 [Messaging] and semantics [Semantics]. 1506 Caches expose additional potential vulnerabilities, since the 1507 contents of the cache represent an attractive target for malicious 1508 exploitation. Because cache contents persist after an HTTP request 1509 is complete, an attack on the cache can reveal information long after 1510 a user believes that the information has been removed from the 1511 network. Therefore, cache contents need to be protected as sensitive 1512 information. 1514 7.1. Cache Poisoning 1516 Various attacks might be amplified by being stored in a shared cache. 1517 Such "cache poisoning" attacks use the cache to distribute a 1518 malicious payload to many clients, and are especially effective when 1519 an attacker can use implementation flaws, elevated privileges, or 1520 other techniques to insert such a response into a cache. 1522 One common attack vector for cache poisoning is to exploit 1523 differences in message parsing on proxies and in user agents; see 1524 Section 6.3 of [Messaging] for the relevant requirements regarding 1525 HTTP/1.1. 1527 7.2. Timing Attacks 1529 Because one of the primary uses of a cache is to optimise 1530 performance, its use can "leak" information about what resources have 1531 been previously requested. 1533 For example, if a user visits a site and their browser caches some of 1534 its responses, and then navigates to a second site, that site can 1535 attempt to load responses that it knows exists on the first site. If 1536 they load very quickly, it can be assumed that the user has visited 1537 that site, or even a specific page on it. 1539 Such "timing attacks" can be mitigated by adding more information to 1540 the cache key, such as the identity of the referring site (to prevent 1541 the attack described above). This is sometimes called "double 1542 keying." 1544 7.3. Caching of Sensitive Information 1546 Implementation and deployment flaws (as well as misunderstanding of 1547 cache operation) might lead to caching of sensitive information 1548 (e.g., authentication credentials) that is thought to be private, 1549 exposing it to unauthorized parties. 1551 Note that the Set-Cookie response header field [RFC6265] does not 1552 inhibit caching; a cacheable response with a Set-Cookie header field 1553 can be (and often is) used to satisfy subsequent requests to caches. 1554 Servers who wish to control caching of these responses are encouraged 1555 to emit appropriate Cache-Control response header fields. 1557 8. IANA Considerations 1559 The change controller for the following registrations is: "IETF 1560 (iesg@ietf.org) - Internet Engineering Task Force". 1562 8.1. Field Registration 1564 Please update the "Hypertext Transfer Protocol (HTTP) Field Name 1565 Registry" at with the 1566 field names listed in the two tables of Section 5. 1568 8.2. Cache Directive Registration 1570 Please update the "Hypertext Transfer Protocol (HTTP) Cache Directive 1571 Registry" at 1572 with the registration procedure of Section 5.2.4 and the cache 1573 directive names summarized in the table of Section 5.2. 1575 8.3. Warn Code Registry 1577 Please add a note to the "Hypertext Transfer Protocol (HTTP) Warn 1578 Codes" registry at 1579 to the effect that Warning is obsoleted. 1581 9. References 1583 9.1. Normative References 1585 [Messaging] 1586 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1587 Ed., "HTTP/1.1 Messaging", draft-ietf-httpbis-messaging-07 1588 (work in progress), March 2020. 1590 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1591 Requirement Levels", BCP 14, RFC 2119, 1592 DOI 10.17487/RFC2119, March 1997, 1593 . 1595 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1596 Resource Identifier (URI): Generic Syntax", STD 66, 1597 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1598 . 1600 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1601 Specifications: ABNF", STD 68, RFC 5234, 1602 DOI 10.17487/RFC5234, January 2008, 1603 . 1605 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 1606 RFC 7405, DOI 10.17487/RFC7405, December 2014, 1607 . 1609 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1610 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1611 May 2017, . 1613 [Semantics] 1614 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1615 Ed., "HTTP Semantics", draft-ietf-httpbis-semantics-07 1616 (work in progress), March 2020. 1618 [USASCII] American National Standards Institute, "Coded Character 1619 Set -- 7-bit American Standard Code for Information 1620 Interchange", ANSI X3.4, 1986. 1622 9.2. Informative References 1624 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1625 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1626 Transfer Protocol -- HTTP/1.1", RFC 2616, 1627 DOI 10.17487/RFC2616, June 1999, 1628 . 1630 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 1631 Content", RFC 5861, DOI 10.17487/RFC5861, April 2010, 1632 . 1634 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1635 "Network Time Protocol Version 4: Protocol and Algorithms 1636 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1637 . 1639 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1640 DOI 10.17487/RFC6265, April 2011, 1641 . 1643 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1644 Ed., "Hypertext Transfer Protocol (HTTP): Caching", 1645 RFC 7234, DOI 10.17487/RFC7234, June 2014, 1646 . 1648 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1649 Writing an IANA Considerations Section in RFCs", BCP 26, 1650 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1651 . 1653 Appendix A. Collected ABNF 1655 In the collected ABNF below, list rules are expanded as per 1656 Section 4.5 of [Semantics]. 1658 Age = delta-seconds 1660 Cache-Control = [ cache-directive ] *( OWS "," OWS [ cache-directive 1661 ] ) 1663 Expires = HTTP-date 1665 HTTP-date = 1667 OWS = 1669 cache-directive = token [ "=" ( token / quoted-string ) ] 1671 delta-seconds = 1*DIGIT 1673 field-name = 1675 quoted-string = 1677 token = 1679 Appendix B. Changes from RFC 7234 1681 Some cache directives defined by this specification now have stronger 1682 prohibitions against generating the quoted form of their values, 1683 since this has been found to create interoperability problems. 1684 Consumers of extension cache directives are no longer required to 1685 accept both token and quoted-string forms, but they still need to 1686 properly parse them for unknown extensions. (Section 5.2) 1688 The "public" and "private" cache directives were clarified, so that 1689 they do not make responses reusable under any condition. 1690 (Section 5.2.2) 1692 The "must-understand" cache directive was introduced; caches are no 1693 longer required to understand the semantics of new response status 1694 codes unless it is present. (Section 5.2.2.2) 1696 The Warning response header was obsoleted. Much of the information 1697 supported by Warning could be gleaned by examining the response), and 1698 the remaining warn-codes -- although potentially useful -- were 1699 entirely advisory, and in practice were not added by caches or 1700 intermediaries. (Section 5.5) 1702 Appendix C. Change Log 1704 This section is to be removed before publishing as an RFC. 1706 C.1. Between RFC7234 and draft 00 1708 The changes were purely editorial: 1710 o Change boilerplate and abstract to indicate the "draft" status, 1711 and update references to ancestor specifications. 1713 o Remove version "1.1" from document title, indicating that this 1714 specification applies to all HTTP versions. 1716 o Adjust historical notes. 1718 o Update links to sibling specifications. 1720 o Replace sections listing changes from RFC 2616 by new empty 1721 sections referring to RFC 723x. 1723 o Remove acknowledgements specific to RFC 723x. 1725 o Move "Acknowledgements" to the very end and make them unnumbered. 1727 C.2. Since draft-ietf-httpbis-cache-00 1729 The changes are purely editorial: 1731 o Moved all extensibility tips, registration procedures, and 1732 registry tables from the IANA considerations to normative 1733 sections, reducing the IANA considerations to just instructions 1734 that will be removed prior to publication as an RFC. 1736 C.3. Since draft-ietf-httpbis-cache-01 1738 o Cite RFC 8126 instead of RFC 5226 () 1741 o In Section 5.4, misleading statement about the relation between 1742 Pragma and Cache-Control (, ) 1745 C.4. Since draft-ietf-httpbis-cache-02 1747 o In Section 3, explain that only final responses are cacheable 1748 () 1750 o In Section 5.2.2, clarify what responses various directives apply 1751 to () 1753 o In Section 4.3.1, clarify the source of validators in conditional 1754 requests () 1756 o Revise Section 6 to apply to more than just History Lists 1757 () 1759 o In Section 5.5, deprecated "Warning" header field 1760 () 1762 o In Section 3.2, remove a spurious note 1763 () 1765 C.5. Since draft-ietf-httpbis-cache-03 1767 o In Section 2, define what a disconnected cache is 1768 () 1770 o In Section 4, clarify language around how to select a response 1771 when more than one matches () 1774 o in Section 4.2.4, mention stale-while-revalidate and stale-if- 1775 error () 1777 o Remove requirements around cache request directives 1778 () 1780 o Deprecate Pragma () 1783 o In Section 3.2 and Section 5.2.2, note effect of some directives 1784 on authenticated requests () 1787 C.6. Since draft-ietf-httpbis-cache-04 1789 o In Section 5.2, remove the registrations for stale-if-error and 1790 stale-while-revalidate which happened in RFC 7234 1791 () 1793 C.7. Since draft-ietf-httpbis-cache-05 1795 o In Section 3.1, clarify how weakly framed content is considered 1796 for purposes of completeness () 1799 o Throughout, describe Vary and cache key operations more clearly 1800 () 1802 o In Section 3, remove concept of "cacheable methods" in favor of 1803 prose (, 1804 ) 1806 o Refactored Section 7, and added a section on timing attacks 1807 () 1809 o Changed "cacheable by default" to "heuristically cacheable" 1810 throughout () 1812 C.8. Since draft-ietf-httpbis-cache-06 1814 o In Section 3 and Section 5.2.2.2, change response cacheability to 1815 only require understanding the response status code if the must- 1816 understand cache directive is present () 1819 o Change requirements for handling different forms of cache 1820 directives in Section 5.2 () 1823 o Fix typo in Section 5.2.2.10 () 1826 o In Section 5.2.2.6 and Section 5.2.2.7, clarify "private" and 1827 "public" so that they do not override all other cache directives 1828 () 1830 o In Section 3, distinguish between private with and without 1831 qualifying headers () 1834 o In Section 4.1, clarify that any "*" as a member of Vary will 1835 disable caching () 1837 o In Section 1.1, reference RFC 8174 as well 1838 () 1840 Index 1842 A 1843 Age header field 22 1844 age 12 1846 C 1847 Cache-Control header field 22 1848 cache 4 1849 cache key 6 1851 E 1852 Expires header field 31 1853 explicit expiration time 12 1855 F 1856 Fields 1857 Age 22 1858 Cache-Control 22 1859 Expires 31 1860 Pragma 32 1861 Warning 32 1862 fresh 12 1863 freshness lifetime 12 1865 G 1866 Grammar 1867 Age 22 1868 ALPHA 5 1869 Cache-Control 23 1870 cache-directive 23 1871 CR 5 1872 CRLF 5 1873 CTL 5 1874 delta-seconds 6 1875 DIGIT 5 1876 DQUOTE 5 1877 Expires 31 1878 HEXDIG 5 1879 HTAB 5 1880 LF 5 1881 OCTET 5 1882 SP 5 1883 VCHAR 5 1885 H 1886 Header Fields 1887 Age 22 1888 Cache-Control 22 1889 Expires 31 1890 Pragma 32 1891 Warning 32 1892 heuristic expiration time 12 1893 heuristically cacheable 14 1895 M 1896 max-age (cache directive) 23, 29 1897 max-stale (cache directive) 24 1898 min-fresh (cache directive) 24 1899 must-revalidate (cache directive) 25 1900 must-understand (cache directive) 26 1902 N 1903 no-cache (cache directive) 24, 26 1904 no-store (cache directive) 25, 27 1905 no-transform (cache directive) 25, 27 1907 O 1908 only-if-cached (cache directive) 25 1910 P 1911 Pragma header field 32 1912 private (cache directive) 28 1913 private cache 4 1914 proxy-revalidate (cache directive) 28 1915 public (cache directive) 27 1917 S 1918 s-maxage (cache directive) 29 1919 shared cache 4 1920 stale 12 1921 strong validator 19 1923 V 1924 validator 17 1926 W 1927 Warning header field 32 1929 Acknowledgments 1931 See Appendix "Acknowledgments" of [Semantics]. 1933 Authors' Addresses 1935 Roy T. Fielding (editor) 1936 Adobe 1937 345 Park Ave 1938 San Jose, CA 95110 1939 United States of America 1941 EMail: fielding@gbiv.com 1942 URI: https://roy.gbiv.com/ 1944 Mark Nottingham (editor) 1945 Fastly 1947 EMail: mnot@mnot.net 1948 URI: https://www.mnot.net/ 1950 Julian F. Reschke (editor) 1951 greenbytes GmbH 1952 Hafenweg 16 1953 Muenster 48155 1954 Germany 1956 EMail: julian.reschke@greenbytes.de 1957 URI: https://greenbytes.de/tech/webdav/