idnits 2.17.00 (12 Aug 2021) /tmp/idnits6167/draft-ietf-httpbis-cache-00.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 (April 3, 2018) is 1508 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: 'RFC7234' is defined on line 1716, but no explicit reference was found in the text == Outdated reference: A later version (-01) exists of draft-ietf-httpbis-auth-00 == Outdated reference: A later version (-01) exists of draft-ietf-httpbis-conditional-00 == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-messaging-00 -- Possible downref: Normative reference to a draft: ref. 'MESSGNG' == Outdated reference: A later version (-01) exists of draft-ietf-httpbis-range-00 == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-semantics-00 -- Possible downref: Normative reference to a draft: ref. 'SEMNTCS' -- 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 5226 (Obsoleted by RFC 8126) Summary: 0 errors (**), 0 flaws (~~), 8 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: October 5, 2018 J. Reschke, Ed. 7 greenbytes 8 April 3, 2018 10 Hypertext Transfer Protocol (HTTP): Caching 11 draft-ietf-httpbis-cache-00 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 D.1. 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 October 5, 2018. 54 Copyright Notice 56 Copyright (c) 2018 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. Conformance and Error Handling . . . . . . . . . . . . . 4 85 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 4 86 1.2.1. Delta Seconds . . . . . . . . . . . . . . . . . . . . 5 87 2. Overview of Cache Operation . . . . . . . . . . . . . . . . . 5 88 3. Storing Responses in Caches . . . . . . . . . . . . . . . . . 6 89 3.1. Storing Incomplete Responses . . . . . . . . . . . . . . 7 90 3.2. Storing Responses to Authenticated Requests . . . . . . . 7 91 3.3. Combining Partial Content . . . . . . . . . . . . . . . . 8 92 4. Constructing Responses from Caches . . . . . . . . . . . . . 8 93 4.1. Calculating Secondary Keys with Vary . . . . . . . . . . 9 94 4.2. Freshness . . . . . . . . . . . . . . . . . . . . . . . . 10 95 4.2.1. Calculating Freshness Lifetime . . . . . . . . . . . 12 96 4.2.2. Calculating Heuristic Freshness . . . . . . . . . . . 12 97 4.2.3. Calculating Age . . . . . . . . . . . . . . . . . . . 13 98 4.2.4. Serving Stale Responses . . . . . . . . . . . . . . . 15 99 4.3. Validation . . . . . . . . . . . . . . . . . . . . . . . 15 100 4.3.1. Sending a Validation Request . . . . . . . . . . . . 15 101 4.3.2. Handling a Received Validation Request . . . . . . . 16 102 4.3.3. Handling a Validation Response . . . . . . . . . . . 17 103 4.3.4. Freshening Stored Responses upon Validation . . . . . 18 104 4.3.5. Freshening Responses via HEAD . . . . . . . . . . . . 19 105 4.4. Invalidation . . . . . . . . . . . . . . . . . . . . . . 19 106 5. Header Field Definitions . . . . . . . . . . . . . . . . . . 20 107 5.1. Age . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 108 5.2. Cache-Control . . . . . . . . . . . . . . . . . . . . . . 21 109 5.2.1. Request Cache-Control Directives . . . . . . . . . . 21 110 5.2.2. Response Cache-Control Directives . . . . . . . . . . 23 111 5.2.3. Cache Control Extensions . . . . . . . . . . . . . . 26 112 5.3. Expires . . . . . . . . . . . . . . . . . . . . . . . . . 27 113 5.4. Pragma . . . . . . . . . . . . . . . . . . . . . . . . . 28 114 5.5. Warning . . . . . . . . . . . . . . . . . . . . . . . . . 29 115 5.5.1. Warning: 110 - "Response is Stale" . . . . . . . . . 31 116 5.5.2. Warning: 111 - "Revalidation Failed" . . . . . . . . 31 117 5.5.3. Warning: 112 - "Disconnected Operation" . . . . . . . 31 118 5.5.4. Warning: 113 - "Heuristic Expiration" . . . . . . . . 31 119 5.5.5. Warning: 199 - "Miscellaneous Warning" . . . . . . . 31 120 5.5.6. Warning: 214 - "Transformation Applied" . . . . . . . 31 121 5.5.7. Warning: 299 - "Miscellaneous Persistent Warning" . . 31 122 6. History Lists . . . . . . . . . . . . . . . . . . . . . . . . 32 123 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 124 7.1. Cache Directive Registry . . . . . . . . . . . . . . . . 32 125 7.1.1. Procedure . . . . . . . . . . . . . . . . . . . . . . 32 126 7.1.2. Considerations for New Cache Control Directives . . . 32 127 7.1.3. Registrations . . . . . . . . . . . . . . . . . . . . 33 128 7.2. Warn Code Registry . . . . . . . . . . . . . . . . . . . 33 129 7.2.1. Procedure . . . . . . . . . . . . . . . . . . . . . . 33 130 7.2.2. Registrations . . . . . . . . . . . . . . . . . . . . 34 131 7.3. Header Field Registration . . . . . . . . . . . . . . . . 34 132 8. Security Considerations . . . . . . . . . . . . . . . . . . . 34 133 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 134 9.1. Normative References . . . . . . . . . . . . . . . . . . 35 135 9.2. Informative References . . . . . . . . . . . . . . . . . 36 136 Appendix A. Changes from RFC 7234 . . . . . . . . . . . . . . . 38 137 Appendix B. Imported ABNF . . . . . . . . . . . . . . . . . . . 38 138 Appendix C. Collected ABNF . . . . . . . . . . . . . . . . . . . 38 139 Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 39 140 D.1. Since RFC 7234 . . . . . . . . . . . . . . . . . . . . . 40 141 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 142 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 42 143 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42 145 1. Introduction 147 HTTP is typically used for distributed information systems, where 148 performance can be improved by the use of response caches. This 149 document defines aspects of HTTP/1.1 related to caching and reusing 150 response messages. 152 An HTTP cache is a local store of response messages and the subsystem 153 that controls storage, retrieval, and deletion of messages in it. A 154 cache stores cacheable responses in order to reduce the response time 155 and network bandwidth consumption on future, equivalent requests. 156 Any client or server MAY employ a cache, though a cache cannot be 157 used by a server that is acting as a tunnel. 159 A shared cache is a cache that stores responses to be reused by more 160 than one user; shared caches are usually (but not always) deployed as 161 a part of an intermediary. A private cache, in contrast, is 162 dedicated to a single user; often, they are deployed as a component 163 of a user agent. 165 The goal of caching in HTTP/1.1 is to significantly improve 166 performance by reusing a prior response message to satisfy a current 167 request. A stored response is considered "fresh", as defined in 168 Section 4.2, if the response can be reused without "validation" 169 (checking with the origin server to see if the cached response 170 remains valid for this request). A fresh response can therefore 171 reduce both latency and network overhead each time it is reused. 172 When a cached response is not fresh, it might still be reusable if it 173 can be freshened by validation (Section 4.3) or if the origin is 174 unavailable (Section 4.2.4). 176 This specification obsoletes RFC 7234, with the changes being 177 summarized in Appendix A. 179 1.1. Conformance and Error Handling 181 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 182 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 183 document are to be interpreted as described in [RFC2119]. 185 Conformance criteria and considerations regarding error handling are 186 defined in Section 2.5 of [MESSGNG]. 188 1.2. Syntax Notation 190 This specification uses the Augmented Backus-Naur Form (ABNF) 191 notation of [RFC5234] with a list extension, defined in Section 7 of 192 [MESSGNG], that allows for compact definition of comma-separated 193 lists using a '#' operator (similar to how the '*' operator indicates 194 repetition). Appendix B describes rules imported from other 195 documents. Appendix C shows the collected grammar with all list 196 operators expanded to standard ABNF notation. 198 1.2.1. Delta Seconds 200 The delta-seconds rule specifies a non-negative integer, representing 201 time in seconds. 203 delta-seconds = 1*DIGIT 205 A recipient parsing a delta-seconds value and converting it to binary 206 form ought to use an arithmetic type of at least 31 bits of non- 207 negative integer range. If a cache receives a delta-seconds value 208 greater than the greatest integer it can represent, or if any of its 209 subsequent calculations overflows, the cache MUST consider the value 210 to be either 2147483648 (2^31) or the greatest positive integer it 211 can conveniently represent. 213 Note: The value 2147483648 is here for historical reasons, 214 effectively represents infinity (over 68 years), and does not need 215 to be stored in binary form; an implementation could produce it as 216 a canned string if any overflow occurs, even if the calculations 217 are performed with an arithmetic type incapable of directly 218 representing that number. What matters here is that an overflow 219 be detected and not treated as a negative value in later 220 calculations. 222 2. Overview of Cache Operation 224 Proper cache operation preserves the semantics of HTTP transfers 225 ([SEMNTCS]) while eliminating the transfer of information already 226 held in the cache. Although caching is an entirely OPTIONAL feature 227 of HTTP, it can be assumed that reusing a cached response is 228 desirable and that such reuse is the default behavior when no 229 requirement or local configuration prevents it. Therefore, HTTP 230 cache requirements are focused on preventing a cache from either 231 storing a non-reusable response or reusing a stored response 232 inappropriately, rather than mandating that caches always store and 233 reuse particular responses. 235 Each cache entry consists of a cache key and one or more HTTP 236 responses corresponding to prior requests that used the same key. 237 The most common form of cache entry is a successful result of a 238 retrieval request: i.e., a 200 (OK) response to a GET request, which 239 contains a representation of the resource identified by the request 240 target (Section 4.3.1 of [SEMNTCS]). However, it is also possible to 241 cache permanent redirects, negative results (e.g., 404 (Not Found)), 242 incomplete results (e.g., 206 (Partial Content)), and responses to 243 methods other than GET if the method's definition allows such caching 244 and defines something suitable for use as a cache key. 246 The primary cache key consists of the request method and target URI. 247 However, since HTTP caches in common use today are typically limited 248 to caching responses to GET, many caches simply decline other methods 249 and use only the URI as the primary cache key. 251 If a request target is subject to content negotiation, its cache 252 entry might consist of multiple stored responses, each differentiated 253 by a secondary key for the values of the original request's selecting 254 header fields (Section 4.1). 256 3. Storing Responses in Caches 258 A cache MUST NOT store a response to any request, unless: 260 o The request method is understood by the cache and defined as being 261 cacheable, and 263 o the response status code is understood by the cache, and 265 o the "no-store" cache directive (see Section 5.2) does not appear 266 in request or response header fields, and 268 o the "private" response directive (see Section 5.2.2.6) does not 269 appear in the response, if the cache is shared, and 271 o the Authorization header field (see Section 4.2 of [AUTHFRM]) does 272 not appear in the request, if the cache is shared, unless the 273 response explicitly allows it (see Section 3.2), and 275 o the response either: 277 * contains an Expires header field (see Section 5.3), or 279 * contains a max-age response directive (see Section 5.2.2.8), or 281 * contains a s-maxage response directive (see Section 5.2.2.9) 282 and the cache is shared, or 284 * contains a Cache Control Extension (see Section 5.2.3) that 285 allows it to be cached, or 287 * has a status code that is defined as cacheable by default (see 288 Section 4.2.2), or 290 * contains a public response directive (see Section 5.2.2.5). 292 Note that any of the requirements listed above can be overridden by a 293 cache-control extension; see Section 5.2.3. 295 In this context, a cache has "understood" a request method or a 296 response status code if it recognizes it and implements all specified 297 caching-related behavior. 299 Note that, in normal operation, some caches will not store a response 300 that has neither a cache validator nor an explicit expiration time, 301 as such responses are not usually useful to store. However, caches 302 are not prohibited from storing such responses. 304 3.1. Storing Incomplete Responses 306 A response message is considered complete when all of the octets 307 indicated by the message framing ([MESSGNG]) are received prior to 308 the connection being closed. If the request method is GET, the 309 response status code is 200 (OK), and the entire response header 310 section has been received, a cache MAY store an incomplete response 311 message body if the cache entry is recorded as incomplete. Likewise, 312 a 206 (Partial Content) response MAY be stored as if it were an 313 incomplete 200 (OK) cache entry. However, a cache MUST NOT store 314 incomplete or partial-content responses if it does not support the 315 Range and Content-Range header fields or if it does not understand 316 the range units used in those fields. 318 A cache MAY complete a stored incomplete response by making a 319 subsequent range request ([RANGERQ]) and combining the successful 320 response with the stored entry, as defined in Section 3.3. A cache 321 MUST NOT use an incomplete response to answer requests unless the 322 response has been made complete or the request is partial and 323 specifies a range that is wholly within the incomplete response. A 324 cache MUST NOT send a partial response to a client without explicitly 325 marking it as such using the 206 (Partial Content) status code. 327 3.2. Storing Responses to Authenticated Requests 329 A shared cache MUST NOT use a cached response to a request with an 330 Authorization header field (Section 4.2 of [AUTHFRM]) to satisfy any 331 subsequent request unless a cache directive that allows such 332 responses to be stored is present in the response. 334 In this specification, the following Cache-Control response 335 directives (Section 5.2.2) have such an effect: must-revalidate, 336 public, and s-maxage. 338 Note that cached responses that contain the "must-revalidate" and/or 339 "s-maxage" response directives are not allowed to be served stale 340 (Section 4.2.4) by shared caches. In particular, a response with 341 either "max-age=0, must-revalidate" or "s-maxage=0" cannot be used to 342 satisfy a subsequent request without revalidating it on the origin 343 server. 345 3.3. Combining Partial Content 347 A response might transfer only a partial representation if the 348 connection closed prematurely or if the request used one or more 349 Range specifiers ([RANGERQ]). After several such transfers, a cache 350 might have received several ranges of the same representation. A 351 cache MAY combine these ranges into a single stored response, and 352 reuse that response to satisfy later requests, if they all share the 353 same strong validator and the cache complies with the client 354 requirements in Section 4.3 of [RANGERQ]. 356 When combining the new response with one or more stored responses, a 357 cache MUST: 359 o delete any Warning header fields in the stored response with warn- 360 code 1xx (see Section 5.5); 362 o retain any Warning header fields in the stored response with warn- 363 code 2xx; and, 365 o use other header fields provided in the new response, aside from 366 Content-Range, to replace all instances of the corresponding 367 header fields in the stored response. 369 4. Constructing Responses from Caches 371 When presented with a request, a cache MUST NOT reuse a stored 372 response, unless: 374 o The presented effective request URI (Section 5.5 of [MESSGNG]) and 375 that of the stored response match, and 377 o the request method associated with the stored response allows it 378 to be used for the presented request, and 380 o selecting header fields nominated by the stored response (if any) 381 match those presented (see Section 4.1), and 383 o the presented request does not contain the no-cache pragma 384 (Section 5.4), nor the no-cache cache directive (Section 5.2.1), 385 unless the stored response is successfully validated 386 (Section 4.3), and 388 o the stored response does not contain the no-cache cache directive 389 (Section 5.2.2.2), unless it is successfully validated 390 (Section 4.3), and 392 o the stored response is either: 394 * fresh (see Section 4.2), or 396 * allowed to be served stale (see Section 4.2.4), or 398 * successfully validated (see Section 4.3). 400 Note that any of the requirements listed above can be overridden by a 401 cache-control extension; see Section 5.2.3. 403 When a stored response is used to satisfy a request without 404 validation, a cache MUST generate an Age header field (Section 5.1), 405 replacing any present in the response with a value equal to the 406 stored response's current_age; see Section 4.2.3. 408 A cache MUST write through requests with methods that are unsafe 409 (Section 4.2.1 of [SEMNTCS]) to the origin server; i.e., a cache is 410 not allowed to generate a reply to such a request before having 411 forwarded the request and having received a corresponding response. 413 Also, note that unsafe requests might invalidate already-stored 414 responses; see Section 4.4. 416 When more than one suitable response is stored, a cache MUST use the 417 most recent response (as determined by the Date header field). It 418 can also forward the request with "Cache-Control: max-age=0" or 419 "Cache-Control: no-cache" to disambiguate which response to use. 421 A cache that does not have a clock available MUST NOT use stored 422 responses without revalidating them upon every use. 424 4.1. Calculating Secondary Keys with Vary 426 When a cache receives a request that can be satisfied by a stored 427 response that has a Vary header field (Section 7.1.4 of [SEMNTCS]), 428 it MUST NOT use that response unless all of the selecting header 429 fields nominated by the Vary header field match in both the original 430 request (i.e., that associated with the stored response), and the 431 presented request. 433 The selecting header fields from two requests are defined to match if 434 and only if those in the first request can be transformed to those in 435 the second request by applying any of the following: 437 o adding or removing whitespace, where allowed in the header field's 438 syntax 440 o combining multiple header fields with the same field name (see 441 Section 3.2 of [MESSGNG]) 443 o normalizing both header field values in a way that is known to 444 have identical semantics, according to the header field's 445 specification (e.g., reordering field values when order is not 446 significant; case-normalization, where values are defined to be 447 case-insensitive) 449 If (after any normalization that might take place) a header field is 450 absent from a request, it can only match another request if it is 451 also absent there. 453 A Vary header field-value of "*" always fails to match. 455 The stored response with matching selecting header fields is known as 456 the selected response. 458 If multiple selected responses are available (potentially including 459 responses without a Vary header field), the cache will need to choose 460 one to use. When a selecting header field has a known mechanism for 461 doing so (e.g., qvalues on Accept and similar request header fields), 462 that mechanism MAY be used to select preferred responses; of the 463 remainder, the most recent response (as determined by the Date header 464 field) is used, as per Section 4. 466 If no selected response is available, the cache cannot satisfy the 467 presented request. Typically, it is forwarded to the origin server 468 in a (possibly conditional; see Section 4.3) request. 470 4.2. Freshness 472 A fresh response is one whose age has not yet exceeded its freshness 473 lifetime. Conversely, a stale response is one where it has. 475 A response's freshness lifetime is the length of time between its 476 generation by the origin server and its expiration time. An explicit 477 expiration time is the time at which the origin server intends that a 478 stored response can no longer be used by a cache without further 479 validation, whereas a heuristic expiration time is assigned by a 480 cache when no explicit expiration time is available. 482 A response's age is the time that has passed since it was generated 483 by, or successfully validated with, the origin server. 485 When a response is "fresh" in the cache, it can be used to satisfy 486 subsequent requests without contacting the origin server, thereby 487 improving efficiency. 489 The primary mechanism for determining freshness is for an origin 490 server to provide an explicit expiration time in the future, using 491 either the Expires header field (Section 5.3) or the max-age response 492 directive (Section 5.2.2.8). Generally, origin servers will assign 493 future explicit expiration times to responses in the belief that the 494 representation is not likely to change in a semantically significant 495 way before the expiration time is reached. 497 If an origin server wishes to force a cache to validate every 498 request, it can assign an explicit expiration time in the past to 499 indicate that the response is already stale. Compliant caches will 500 normally validate a stale cached response before reusing it for 501 subsequent requests (see Section 4.2.4). 503 Since origin servers do not always provide explicit expiration times, 504 caches are also allowed to use a heuristic to determine an expiration 505 time under certain circumstances (see Section 4.2.2). 507 The calculation to determine if a response is fresh is: 509 response_is_fresh = (freshness_lifetime > current_age) 511 freshness_lifetime is defined in Section 4.2.1; current_age is 512 defined in Section 4.2.3. 514 Clients can send the max-age or min-fresh cache directives in a 515 request to constrain or relax freshness calculations for the 516 corresponding response (Section 5.2.1). 518 When calculating freshness, to avoid common problems in date parsing: 520 o Although all date formats are specified to be case-sensitive, a 521 cache recipient SHOULD match day, week, and time-zone names case- 522 insensitively. 524 o If a cache recipient's internal implementation of time has less 525 resolution than the value of an HTTP-date, the recipient MUST 526 internally represent a parsed Expires date as the nearest time 527 equal to or earlier than the received value. 529 o A cache recipient MUST NOT allow local time zones to influence the 530 calculation or comparison of an age or expiration time. 532 o A cache recipient SHOULD consider a date with a zone abbreviation 533 other than GMT or UTC to be invalid for calculating expiration. 535 Note that freshness applies only to cache operation; it cannot be 536 used to force a user agent to refresh its display or reload a 537 resource. See Section 6 for an explanation of the difference between 538 caches and history mechanisms. 540 4.2.1. Calculating Freshness Lifetime 542 A cache can calculate the freshness lifetime (denoted as 543 freshness_lifetime) of a response by using the first match of the 544 following: 546 o If the cache is shared and the s-maxage response directive 547 (Section 5.2.2.9) is present, use its value, or 549 o If the max-age response directive (Section 5.2.2.8) is present, 550 use its value, or 552 o If the Expires response header field (Section 5.3) is present, use 553 its value minus the value of the Date response header field, or 555 o Otherwise, no explicit expiration time is present in the response. 556 A heuristic freshness lifetime might be applicable; see 557 Section 4.2.2. 559 Note that this calculation is not vulnerable to clock skew, since all 560 of the information comes from the origin server. 562 When there is more than one value present for a given directive 563 (e.g., two Expires header fields, multiple Cache-Control: max-age 564 directives), the directive's value is considered invalid. Caches are 565 encouraged to consider responses that have invalid freshness 566 information to be stale. 568 4.2.2. Calculating Heuristic Freshness 570 Since origin servers do not always provide explicit expiration times, 571 a cache MAY assign a heuristic expiration time when an explicit time 572 is not specified, employing algorithms that use other header field 573 values (such as the Last-Modified time) to estimate a plausible 574 expiration time. This specification does not provide specific 575 algorithms, but does impose worst-case constraints on their results. 577 A cache MUST NOT use heuristics to determine freshness when an 578 explicit expiration time is present in the stored response. Because 579 of the requirements in Section 3, this means that, effectively, 580 heuristics can only be used on responses without explicit freshness 581 whose status codes are defined as cacheable by default (see 582 Section 6.1 of [SEMNTCS]), and those responses without explicit 583 freshness that have been marked as explicitly cacheable (e.g., with a 584 "public" response directive). 586 If the response has a Last-Modified header field (Section 2.2 of 587 [CONDTNL]), caches are encouraged to use a heuristic expiration value 588 that is no more than some fraction of the interval since that time. 589 A typical setting of this fraction might be 10%. 591 When a heuristic is used to calculate freshness lifetime, a cache 592 SHOULD generate a Warning header field with a 113 warn-code (see 593 Section 5.5.4) in the response if its current_age is more than 24 594 hours and such a warning is not already present. 596 Note: Section 13.9 of [RFC2616] prohibited caches from calculating 597 heuristic freshness for URIs with query components (i.e., those 598 containing '?'). In practice, this has not been widely 599 implemented. Therefore, origin servers are encouraged to send 600 explicit directives (e.g., Cache-Control: no-cache) if they wish 601 to preclude caching. 603 4.2.3. Calculating Age 605 The Age header field is used to convey an estimated age of the 606 response message when obtained from a cache. The Age field value is 607 the cache's estimate of the number of seconds since the response was 608 generated or validated by the origin server. In essence, the Age 609 value is the sum of the time that the response has been resident in 610 each of the caches along the path from the origin server, plus the 611 amount of time it has been in transit along network paths. 613 The following data is used for the age calculation: 615 age_value 616 The term "age_value" denotes the value of the Age header field 617 (Section 5.1), in a form appropriate for arithmetic operation; or 618 0, if not available. 620 date_value 621 The term "date_value" denotes the value of the Date header field, 622 in a form appropriate for arithmetic operations. See 623 Section 7.1.1.2 of [SEMNTCS] for the definition of the Date header 624 field, and for requirements regarding responses without it. 626 now 627 The term "now" means "the current value of the clock at the host 628 performing the calculation". A host ought to use NTP ([RFC5905]) 629 or some similar protocol to synchronize its clocks to Coordinated 630 Universal Time. 632 request_time 633 The current value of the clock at the host at the time the request 634 resulting in the stored response was made. 636 response_time 637 The current value of the clock at the host at the time the 638 response was received. 640 A response's age can be calculated in two entirely independent ways: 642 1. the "apparent_age": response_time minus date_value, if the local 643 clock is reasonably well synchronized to the origin server's 644 clock. If the result is negative, the result is replaced by 645 zero. 647 2. the "corrected_age_value", if all of the caches along the 648 response path implement HTTP/1.1. A cache MUST interpret this 649 value relative to the time the request was initiated, not the 650 time that the response was received. 652 apparent_age = max(0, response_time - date_value); 654 response_delay = response_time - request_time; 655 corrected_age_value = age_value + response_delay; 657 These are combined as 659 corrected_initial_age = max(apparent_age, corrected_age_value); 661 unless the cache is confident in the value of the Age header field 662 (e.g., because there are no HTTP/1.0 hops in the Via header field), 663 in which case the corrected_age_value MAY be used as the 664 corrected_initial_age. 666 The current_age of a stored response can then be calculated by adding 667 the amount of time (in seconds) since the stored response was last 668 validated by the origin server to the corrected_initial_age. 670 resident_time = now - response_time; 671 current_age = corrected_initial_age + resident_time; 673 4.2.4. Serving Stale Responses 675 A "stale" response is one that either has explicit expiry information 676 or is allowed to have heuristic expiry calculated, but is not fresh 677 according to the calculations in Section 4.2. 679 A cache MUST NOT generate a stale response if it is prohibited by an 680 explicit in-protocol directive (e.g., by a "no-store" or "no-cache" 681 cache directive, a "must-revalidate" cache-response-directive, or an 682 applicable "s-maxage" or "proxy-revalidate" cache-response-directive; 683 see Section 5.2.2). 685 A cache MUST NOT send stale responses unless it is disconnected 686 (i.e., it cannot contact the origin server or otherwise find a 687 forward path) or doing so is explicitly allowed (e.g., by the max- 688 stale request directive; see Section 5.2.1). 690 A cache SHOULD generate a Warning header field with the 110 warn-code 691 (see Section 5.5.1) in stale responses. Likewise, a cache SHOULD 692 generate a 112 warn-code (see Section 5.5.3) in stale responses if 693 the cache is disconnected. 695 A cache SHOULD NOT generate a new Warning header field when 696 forwarding a response that does not have an Age header field, even if 697 the response is already stale. A cache need not validate a response 698 that merely became stale in transit. 700 4.3. Validation 702 When a cache has one or more stored responses for a requested URI, 703 but cannot serve any of them (e.g., because they are not fresh, or 704 one cannot be selected; see Section 4.1), it can use the conditional 705 request mechanism [CONDTNL] in the forwarded request to give the next 706 inbound server an opportunity to select a valid stored response to 707 use, updating the stored metadata in the process, or to replace the 708 stored response(s) with a new response. This process is known as 709 "validating" or "revalidating" the stored response. 711 4.3.1. Sending a Validation Request 713 When sending a conditional request for cache validation, a cache 714 sends one or more precondition header fields containing validator 715 metadata from its stored response(s), which is then compared by 716 recipients to determine whether a stored response is equivalent to a 717 current representation of the resource. 719 One such validator is the timestamp given in a Last-Modified header 720 field (Section 2.2 of [CONDTNL]), which can be used in an If- 721 Modified-Since header field for response validation, or in an If- 722 Unmodified-Since or If-Range header field for representation 723 selection (i.e., the client is referring specifically to a previously 724 obtained representation with that timestamp). 726 Another validator is the entity-tag given in an ETag header field 727 (Section 2.3 of [CONDTNL]). One or more entity-tags, indicating one 728 or more stored responses, can be used in an If-None-Match header 729 field for response validation, or in an If-Match or If-Range header 730 field for representation selection (i.e., the client is referring 731 specifically to one or more previously obtained representations with 732 the listed entity-tags). 734 4.3.2. Handling a Received Validation Request 736 Each client in the request chain may have its own cache, so it is 737 common for a cache at an intermediary to receive conditional requests 738 from other (outbound) caches. Likewise, some user agents make use of 739 conditional requests to limit data transfers to recently modified 740 representations or to complete the transfer of a partially retrieved 741 representation. 743 If a cache receives a request that can be satisfied by reusing one of 744 its stored 200 (OK) or 206 (Partial Content) responses, the cache 745 SHOULD evaluate any applicable conditional header field preconditions 746 received in that request with respect to the corresponding validators 747 contained within the selected response. A cache MUST NOT evaluate 748 conditional header fields that are only applicable to an origin 749 server, found in a request with semantics that cannot be satisfied 750 with a cached response, or applied to a target resource for which it 751 has no stored responses; such preconditions are likely intended for 752 some other (inbound) server. 754 The proper evaluation of conditional requests by a cache depends on 755 the received precondition header fields and their precedence, as 756 defined in Section 6 of [CONDTNL]. The If-Match and If-Unmodified- 757 Since conditional header fields are not applicable to a cache. 759 A request containing an If-None-Match header field (Section 3.2 of 760 [CONDTNL]) indicates that the client wants to validate one or more of 761 its own stored responses in comparison to whichever stored response 762 is selected by the cache. If the field-value is "*", or if the 763 field-value is a list of entity-tags and at least one of them matches 764 the entity-tag of the selected stored response, a cache recipient 765 SHOULD generate a 304 (Not Modified) response (using the metadata of 766 the selected stored response) instead of sending that stored 767 response. 769 When a cache decides to revalidate its own stored responses for a 770 request that contains an If-None-Match list of entity-tags, the cache 771 MAY combine the received list with a list of entity-tags from its own 772 stored set of responses (fresh or stale) and send the union of the 773 two lists as a replacement If-None-Match header field value in the 774 forwarded request. If a stored response contains only partial 775 content, the cache MUST NOT include its entity-tag in the union 776 unless the request is for a range that would be fully satisfied by 777 that partial stored response. If the response to the forwarded 778 request is 304 (Not Modified) and has an ETag header field value with 779 an entity-tag that is not in the client's list, the cache MUST 780 generate a 200 (OK) response for the client by reusing its 781 corresponding stored response, as updated by the 304 response 782 metadata (Section 4.3.4). 784 If an If-None-Match header field is not present, a request containing 785 an If-Modified-Since header field (Section 3.3 of [CONDTNL]) 786 indicates that the client wants to validate one or more of its own 787 stored responses by modification date. A cache recipient SHOULD 788 generate a 304 (Not Modified) response (using the metadata of the 789 selected stored response) if one of the following cases is true: 1) 790 the selected stored response has a Last-Modified field-value that is 791 earlier than or equal to the conditional timestamp; 2) no Last- 792 Modified field is present in the selected stored response, but it has 793 a Date field-value that is earlier than or equal to the conditional 794 timestamp; or, 3) neither Last-Modified nor Date is present in the 795 selected stored response, but the cache recorded it as having been 796 received at a time earlier than or equal to the conditional 797 timestamp. 799 A cache that implements partial responses to range requests, as 800 defined in [RANGERQ], also needs to evaluate a received If-Range 801 header field (Section 3.2 of [RANGERQ]) with respect to its selected 802 stored response. 804 4.3.3. Handling a Validation Response 806 Cache handling of a response to a conditional request is dependent 807 upon its status code: 809 o A 304 (Not Modified) response status code indicates that the 810 stored response can be updated and reused; see Section 4.3.4. 812 o A full response (i.e., one with a payload body) indicates that 813 none of the stored responses nominated in the conditional request 814 is suitable. Instead, the cache MUST use the full response to 815 satisfy the request and MAY replace the stored response(s). 817 o However, if a cache receives a 5xx (Server Error) response while 818 attempting to validate a response, it can either forward this 819 response to the requesting client, or act as if the server failed 820 to respond. In the latter case, the cache MAY send a previously 821 stored response (see Section 4.2.4). 823 4.3.4. Freshening Stored Responses upon Validation 825 When a cache receives a 304 (Not Modified) response and already has 826 one or more stored 200 (OK) responses for the same cache key, the 827 cache needs to identify which of the stored responses are updated by 828 this new response and then update the stored response(s) with the new 829 information provided in the 304 response. 831 The stored response to update is identified by using the first match 832 (if any) of the following: 834 o If the new response contains a strong validator (see Section 2.1 835 of [CONDTNL]), then that strong validator identifies the selected 836 representation for update. All of the stored responses with the 837 same strong validator are selected. If none of the stored 838 responses contain the same strong validator, then the cache MUST 839 NOT use the new response to update any stored responses. 841 o If the new response contains a weak validator and that validator 842 corresponds to one of the cache's stored responses, then the most 843 recent of those matching stored responses is selected for update. 845 o If the new response does not include any form of validator (such 846 as in the case where a client generates an If-Modified-Since 847 request from a source other than the Last-Modified response header 848 field), and there is only one stored response, and that stored 849 response also lacks a validator, then that stored response is 850 selected for update. 852 If a stored response is selected for update, the cache MUST: 854 o delete any Warning header fields in the stored response with warn- 855 code 1xx (see Section 5.5); 857 o retain any Warning header fields in the stored response with warn- 858 code 2xx; and, 860 o use other header fields provided in the 304 (Not Modified) 861 response to replace all instances of the corresponding header 862 fields in the stored response. 864 4.3.5. Freshening Responses via HEAD 866 A response to the HEAD method is identical to what an equivalent 867 request made with a GET would have been, except it lacks a body. 868 This property of HEAD responses can be used to invalidate or update a 869 cached GET response if the more efficient conditional GET request 870 mechanism is not available (due to no validators being present in the 871 stored response) or if transmission of the representation body is not 872 desired even if it has changed. 874 When a cache makes an inbound HEAD request for a given request target 875 and receives a 200 (OK) response, the cache SHOULD update or 876 invalidate each of its stored GET responses that could have been 877 selected for that request (see Section 4.1). 879 For each of the stored responses that could have been selected, if 880 the stored response and HEAD response have matching values for any 881 received validator fields (ETag and Last-Modified) and, if the HEAD 882 response has a Content-Length header field, the value of Content- 883 Length matches that of the stored response, the cache SHOULD update 884 the stored response as described below; otherwise, the cache SHOULD 885 consider the stored response to be stale. 887 If a cache updates a stored response with the metadata provided in a 888 HEAD response, the cache MUST: 890 o delete any Warning header fields in the stored response with warn- 891 code 1xx (see Section 5.5); 893 o retain any Warning header fields in the stored response with warn- 894 code 2xx; and, 896 o use other header fields provided in the HEAD response to replace 897 all instances of the corresponding header fields in the stored 898 response and append new header fields to the stored response's 899 header section unless otherwise restricted by the Cache-Control 900 header field. 902 4.4. Invalidation 904 Because unsafe request methods (Section 4.2.1 of [SEMNTCS]) such as 905 PUT, POST or DELETE have the potential for changing state on the 906 origin server, intervening caches can use them to keep their contents 907 up to date. 909 A cache MUST invalidate the effective Request URI (Section 5.5 of 910 [MESSGNG]) as well as the URI(s) in the Location and Content-Location 911 response header fields (if present) when a non-error status code is 912 received in response to an unsafe request method. 914 However, a cache MUST NOT invalidate a URI from a Location or 915 Content-Location response header field if the host part of that URI 916 differs from the host part in the effective request URI (Section 5.5 917 of [MESSGNG]). This helps prevent denial-of-service attacks. 919 A cache MUST invalidate the effective request URI (Section 5.5 of 920 [MESSGNG]) when it receives a non-error response to a request with a 921 method whose safety is unknown. 923 Here, a "non-error response" is one with a 2xx (Successful) or 3xx 924 (Redirection) status code. "Invalidate" means that the cache will 925 either remove all stored responses related to the effective request 926 URI or will mark these as "invalid" and in need of a mandatory 927 validation before they can be sent in response to a subsequent 928 request. 930 Note that this does not guarantee that all appropriate responses are 931 invalidated. For example, a state-changing request might invalidate 932 responses in the caches it travels through, but relevant responses 933 still might be stored in other caches that it has not. 935 5. Header Field Definitions 937 This section defines the syntax and semantics of HTTP/1.1 header 938 fields related to caching. 940 5.1. Age 942 The "Age" header field conveys the sender's estimate of the amount of 943 time since the response was generated or successfully validated at 944 the origin server. Age values are calculated as specified in 945 Section 4.2.3. 947 Age = delta-seconds 949 The Age field-value is a non-negative integer, representing time in 950 seconds (see Section 1.2.1). 952 The presence of an Age header field implies that the response was not 953 generated or validated by the origin server for this request. 954 However, lack of an Age header field does not imply the origin was 955 contacted, since the response might have been received from an 956 HTTP/1.0 cache that does not implement Age. 958 5.2. Cache-Control 960 The "Cache-Control" header field is used to specify directives for 961 caches along the request/response chain. Such cache directives are 962 unidirectional in that the presence of a directive in a request does 963 not imply that the same directive is to be given in the response. 965 A cache MUST obey the requirements of the Cache-Control directives 966 defined in this section. See Section 5.2.3 for information about how 967 Cache-Control directives defined elsewhere are handled. 969 Note: Some HTTP/1.0 caches might not implement Cache-Control. 971 A proxy, whether or not it implements a cache, MUST pass cache 972 directives through in forwarded messages, regardless of their 973 significance to that application, since the directives might be 974 applicable to all recipients along the request/response chain. It is 975 not possible to target a directive to a specific cache. 977 Cache directives are identified by a token, to be compared case- 978 insensitively, and have an optional argument, that can use both token 979 and quoted-string syntax. For the directives defined below that 980 define arguments, recipients ought to accept both forms, even if one 981 is documented to be preferred. For any directive not defined by this 982 specification, a recipient MUST accept both forms. 984 Cache-Control = 1#cache-directive 986 cache-directive = token [ "=" ( token / quoted-string ) ] 988 For the cache directives defined below, no argument is defined (nor 989 allowed) unless stated otherwise. 991 5.2.1. Request Cache-Control Directives 993 5.2.1.1. max-age 995 Argument syntax: 997 delta-seconds (see Section 1.2.1) 999 The "max-age" request directive indicates that the client is 1000 unwilling to accept a response whose age is greater than the 1001 specified number of seconds. Unless the max-stale request directive 1002 is also present, the client is not willing to accept a stale 1003 response. 1005 This directive uses the token form of the argument syntax: e.g., 1006 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the 1007 quoted-string form. 1009 5.2.1.2. max-stale 1011 Argument syntax: 1013 delta-seconds (see Section 1.2.1) 1015 The "max-stale" request directive indicates that the client is 1016 willing to accept a response that has exceeded its freshness 1017 lifetime. If max-stale is assigned a value, then the client is 1018 willing to accept a response that has exceeded its freshness lifetime 1019 by no more than the specified number of seconds. If no value is 1020 assigned to max-stale, then the client is willing to accept a stale 1021 response of any age. 1023 This directive uses the token form of the argument syntax: e.g., 1024 'max-stale=10' not 'max-stale="10"'. A sender SHOULD NOT generate 1025 the quoted-string form. 1027 5.2.1.3. min-fresh 1029 Argument syntax: 1031 delta-seconds (see Section 1.2.1) 1033 The "min-fresh" request directive indicates that the client is 1034 willing to accept a response whose freshness lifetime is no less than 1035 its current age plus the specified time in seconds. That is, the 1036 client wants a response that will still be fresh for at least the 1037 specified number of seconds. 1039 This directive uses the token form of the argument syntax: e.g., 1040 'min-fresh=20' not 'min-fresh="20"'. A sender SHOULD NOT generate 1041 the quoted-string form. 1043 5.2.1.4. no-cache 1045 The "no-cache" request directive indicates that a cache MUST NOT use 1046 a stored response to satisfy the request without successful 1047 validation on the origin server. 1049 5.2.1.5. no-store 1051 The "no-store" request directive indicates that a cache MUST NOT 1052 store any part of either this request or any response to it. This 1053 directive applies to both private and shared caches. "MUST NOT 1054 store" in this context means that the cache MUST NOT intentionally 1055 store the information in non-volatile storage, and MUST make a best- 1056 effort attempt to remove the information from volatile storage as 1057 promptly as possible after forwarding it. 1059 This directive is NOT a reliable or sufficient mechanism for ensuring 1060 privacy. In particular, malicious or compromised caches might not 1061 recognize or obey this directive, and communications networks might 1062 be vulnerable to eavesdropping. 1064 Note that if a request containing this directive is satisfied from a 1065 cache, the no-store request directive does not apply to the already 1066 stored response. 1068 5.2.1.6. no-transform 1070 The "no-transform" request directive indicates that an intermediary 1071 (whether or not it implements a cache) MUST NOT transform the 1072 payload, as defined in Section 5.7.2 of [MESSGNG]. 1074 5.2.1.7. only-if-cached 1076 The "only-if-cached" request directive indicates that the client only 1077 wishes to obtain a stored response. If it receives this directive, a 1078 cache SHOULD either respond using a stored response that is 1079 consistent with the other constraints of the request, or respond with 1080 a 504 (Gateway Timeout) status code. If a group of caches is being 1081 operated as a unified system with good internal connectivity, a 1082 member cache MAY forward such a request within that group of caches. 1084 5.2.2. Response Cache-Control Directives 1086 5.2.2.1. must-revalidate 1088 The "must-revalidate" response directive indicates that once it has 1089 become stale, a cache MUST NOT use the response to satisfy subsequent 1090 requests without successful validation on the origin server. 1092 The must-revalidate directive is necessary to support reliable 1093 operation for certain protocol features. In all circumstances a 1094 cache MUST obey the must-revalidate directive; in particular, if a 1095 cache cannot reach the origin server for any reason, it MUST generate 1096 a 504 (Gateway Timeout) response. 1098 The must-revalidate directive ought to be used by servers if and only 1099 if failure to validate a request on the representation could result 1100 in incorrect operation, such as a silently unexecuted financial 1101 transaction. 1103 5.2.2.2. no-cache 1105 Argument syntax: 1107 #field-name 1109 The "no-cache" response directive indicates that the response MUST 1110 NOT be used to satisfy a subsequent request without successful 1111 validation on the origin server. This allows an origin server to 1112 prevent a cache from using it to satisfy a request without contacting 1113 it, even by caches that have been configured to send stale responses. 1115 If the no-cache response directive specifies one or more field-names, 1116 then a cache MAY use the response to satisfy a subsequent request, 1117 subject to any other restrictions on caching. However, any header 1118 fields in the response that have the field-name(s) listed MUST NOT be 1119 sent in the response to a subsequent request without successful 1120 revalidation with the origin server. This allows an origin server to 1121 prevent the re-use of certain header fields in a response, while 1122 still allowing caching of the rest of the response. 1124 The field-names given are not limited to the set of header fields 1125 defined by this specification. Field names are case-insensitive. 1127 This directive uses the quoted-string form of the argument syntax. A 1128 sender SHOULD NOT generate the token form (even if quoting appears 1129 not to be needed for single-entry lists). 1131 Note: Although it has been back-ported to many implementations, some 1132 HTTP/1.0 caches will not recognize or obey this directive. Also, no- 1133 cache response directives with field-names are often handled by 1134 caches as if an unqualified no-cache directive was received; i.e., 1135 the special handling for the qualified form is not widely 1136 implemented. 1138 5.2.2.3. no-store 1140 The "no-store" response directive indicates that a cache MUST NOT 1141 store any part of either the immediate request or response. This 1142 directive applies to both private and shared caches. "MUST NOT 1143 store" in this context means that the cache MUST NOT intentionally 1144 store the information in non-volatile storage, and MUST make a best- 1145 effort attempt to remove the information from volatile storage as 1146 promptly as possible after forwarding it. 1148 This directive is NOT a reliable or sufficient mechanism for ensuring 1149 privacy. In particular, malicious or compromised caches might not 1150 recognize or obey this directive, and communications networks might 1151 be vulnerable to eavesdropping. 1153 5.2.2.4. no-transform 1155 The "no-transform" response directive indicates that an intermediary 1156 (regardless of whether it implements a cache) MUST NOT transform the 1157 payload, as defined in Section 5.7.2 of [MESSGNG]. 1159 5.2.2.5. public 1161 The "public" response directive indicates that any cache MAY store 1162 the response, even if the response would normally be non-cacheable or 1163 cacheable only within a private cache. (See Section 3.2 for 1164 additional details related to the use of public in response to a 1165 request containing Authorization, and Section 3 for details of how 1166 public affects responses that would normally not be stored, due to 1167 their status codes not being defined as cacheable by default; see 1168 Section 4.2.2.) 1170 5.2.2.6. private 1172 Argument syntax: 1174 #field-name 1176 The "private" response directive indicates that the response message 1177 is intended for a single user and MUST NOT be stored by a shared 1178 cache. A private cache MAY store the response and reuse it for later 1179 requests, even if the response would normally be non-cacheable. 1181 If the private response directive specifies one or more field-names, 1182 this requirement is limited to the field-values associated with the 1183 listed response header fields. That is, a shared cache MUST NOT 1184 store the specified field-names(s), whereas it MAY store the 1185 remainder of the response message. 1187 The field-names given are not limited to the set of header fields 1188 defined by this specification. Field names are case-insensitive. 1190 This directive uses the quoted-string form of the argument syntax. A 1191 sender SHOULD NOT generate the token form (even if quoting appears 1192 not to be needed for single-entry lists). 1194 Note: This usage of the word "private" only controls where the 1195 response can be stored; it cannot ensure the privacy of the message 1196 content. Also, private response directives with field-names are 1197 often handled by caches as if an unqualified private directive was 1198 received; i.e., the special handling for the qualified form is not 1199 widely implemented. 1201 5.2.2.7. proxy-revalidate 1203 The "proxy-revalidate" response directive has the same meaning as the 1204 must-revalidate response directive, except that it does not apply to 1205 private caches. 1207 5.2.2.8. max-age 1209 Argument syntax: 1211 delta-seconds (see Section 1.2.1) 1213 The "max-age" response directive indicates that the response is to be 1214 considered stale after its age is greater than the specified number 1215 of seconds. 1217 This directive uses the token form of the argument syntax: e.g., 1218 'max-age=5' not 'max-age="5"'. A sender SHOULD NOT generate the 1219 quoted-string form. 1221 5.2.2.9. s-maxage 1223 Argument syntax: 1225 delta-seconds (see Section 1.2.1) 1227 The "s-maxage" response directive indicates that, in shared caches, 1228 the maximum age specified by this directive overrides the maximum age 1229 specified by either the max-age directive or the Expires header 1230 field. The s-maxage directive also implies the semantics of the 1231 proxy-revalidate response directive. 1233 This directive uses the token form of the argument syntax: e.g., 1234 's-maxage=10' not 's-maxage="10"'. A sender SHOULD NOT generate the 1235 quoted-string form. 1237 5.2.3. Cache Control Extensions 1239 The Cache-Control header field can be extended through the use of one 1240 or more cache-extension tokens, each with an optional value. A cache 1241 MUST ignore unrecognized cache directives. 1243 Informational extensions (those that do not require a change in cache 1244 behavior) can be added without changing the semantics of other 1245 directives. 1247 Behavioral extensions are designed to work by acting as modifiers to 1248 the existing base of cache directives. Both the new directive and 1249 the old directive are supplied, such that applications that do not 1250 understand the new directive will default to the behavior specified 1251 by the old directive, and those that understand the new directive 1252 will recognize it as modifying the requirements associated with the 1253 old directive. In this way, extensions to the existing cache-control 1254 directives can be made without breaking deployed caches. 1256 For example, consider a hypothetical new response directive called 1257 "community" that acts as a modifier to the private directive: in 1258 addition to private caches, any cache that is shared only by members 1259 of the named community is allowed to cache the response. An origin 1260 server wishing to allow the UCI community to use an otherwise private 1261 response in their shared cache(s) could do so by including 1263 Cache-Control: private, community="UCI" 1265 A cache that recognizes such a community cache-extension could 1266 broaden its behavior in accordance with that extension. A cache that 1267 does not recognize the community cache-extension would ignore it and 1268 adhere to the private directive. 1270 5.3. Expires 1272 The "Expires" header field gives the date/time after which the 1273 response is considered stale. See Section 4.2 for further discussion 1274 of the freshness model. 1276 The presence of an Expires field does not imply that the original 1277 resource will change or cease to exist at, before, or after that 1278 time. 1280 The Expires value is an HTTP-date timestamp, as defined in 1281 Section 7.1.1.1 of [SEMNTCS]. 1283 Expires = HTTP-date 1285 For example 1287 Expires: Thu, 01 Dec 1994 16:00:00 GMT 1289 A cache recipient MUST interpret invalid date formats, especially the 1290 value "0", as representing a time in the past (i.e., "already 1291 expired"). 1293 If a response includes a Cache-Control field with the max-age 1294 directive (Section 5.2.2.8), a recipient MUST ignore the Expires 1295 field. Likewise, if a response includes the s-maxage directive 1296 (Section 5.2.2.9), a shared cache recipient MUST ignore the Expires 1297 field. In both these cases, the value in Expires is only intended 1298 for recipients that have not yet implemented the Cache-Control field. 1300 An origin server without a clock MUST NOT generate an Expires field 1301 unless its value represents a fixed time in the past (always expired) 1302 or its value has been associated with the resource by a system or 1303 user with a reliable clock. 1305 Historically, HTTP required the Expires field-value to be no more 1306 than a year in the future. While longer freshness lifetimes are no 1307 longer prohibited, extremely large values have been demonstrated to 1308 cause problems (e.g., clock overflows due to use of 32-bit integers 1309 for time values), and many caches will evict a response far sooner 1310 than that. 1312 5.4. Pragma 1314 The "Pragma" header field allows backwards compatibility with 1315 HTTP/1.0 caches, so that clients can specify a "no-cache" request 1316 that they will understand (as Cache-Control was not defined until 1317 HTTP/1.1). When the Cache-Control header field is also present and 1318 understood in a request, Pragma is ignored. 1320 In HTTP/1.0, Pragma was defined as an extensible field for 1321 implementation-specified directives for recipients. This 1322 specification deprecates such extensions to improve interoperability. 1324 Pragma = 1#pragma-directive 1325 pragma-directive = "no-cache" / extension-pragma 1326 extension-pragma = token [ "=" ( token / quoted-string ) ] 1328 When the Cache-Control header field is not present in a request, 1329 caches MUST consider the no-cache request pragma-directive as having 1330 the same effect as if "Cache-Control: no-cache" were present (see 1331 Section 5.2.1). 1333 When sending a no-cache request, a client ought to include both the 1334 pragma and cache-control directives, unless Cache-Control: no-cache 1335 is purposefully omitted to target other Cache-Control response 1336 directives at HTTP/1.1 caches. For example: 1338 GET / HTTP/1.1 1339 Host: www.example.com 1340 Cache-Control: max-age=30 1341 Pragma: no-cache 1343 will constrain HTTP/1.1 caches to serve a response no older than 30 1344 seconds, while precluding implementations that do not understand 1345 Cache-Control from serving a cached response. 1347 Note: Because the meaning of "Pragma: no-cache" in responses is 1348 not specified, it does not provide a reliable replacement for 1349 "Cache-Control: no-cache" in them. 1351 5.5. Warning 1353 The "Warning" header field is used to carry additional information 1354 about the status or transformation of a message that might not be 1355 reflected in the status code. This information is typically used to 1356 warn about possible incorrectness introduced by caching operations or 1357 transformations applied to the payload of the message. 1359 Warnings can be used for other purposes, both cache-related and 1360 otherwise. The use of a warning, rather than an error status code, 1361 distinguishes these responses from true failures. 1363 Warning header fields can in general be applied to any message, 1364 however some warn-codes are specific to caches and can only be 1365 applied to response messages. 1367 Warning = 1#warning-value 1369 warning-value = warn-code SP warn-agent SP warn-text 1370 [ SP warn-date ] 1372 warn-code = 3DIGIT 1373 warn-agent = ( uri-host [ ":" port ] ) / pseudonym 1374 ; the name or pseudonym of the server adding 1375 ; the Warning header field, for use in debugging 1376 ; a single "-" is recommended when agent unknown 1377 warn-text = quoted-string 1378 warn-date = DQUOTE HTTP-date DQUOTE 1380 Multiple warnings can be generated in a response (either by the 1381 origin server or by a cache), including multiple warnings with the 1382 same warn-code number that only differ in warn-text. 1384 A user agent that receives one or more Warning header fields SHOULD 1385 inform the user of as many of them as possible, in the order that 1386 they appear in the response. Senders that generate multiple Warning 1387 header fields are encouraged to order them with this user agent 1388 behavior in mind. A sender that generates new Warning header fields 1389 MUST append them after any existing Warning header fields. 1391 Warnings are assigned three digit warn-codes. The first digit 1392 indicates whether the Warning is required to be deleted from a stored 1393 response after validation: 1395 o 1xx warn-codes describe the freshness or validation status of the 1396 response, and so they MUST be deleted by a cache after validation. 1397 They can only be generated by a cache when validating a cached 1398 entry, and MUST NOT be generated in any other situation. 1400 o 2xx warn-codes describe some aspect of the representation that is 1401 not rectified by a validation (for example, a lossy compression of 1402 the representation) and they MUST NOT be deleted by a cache after 1403 validation, unless a full response is sent, in which case they 1404 MUST be. 1406 If a sender generates one or more 1xx warn-codes in a message to be 1407 sent to a recipient known to implement only HTTP/1.0, the sender MUST 1408 include in each corresponding warning-value a warn-date that matches 1409 the Date header field in the message. For example: 1411 HTTP/1.1 200 OK 1412 Date: Sat, 25 Aug 2012 23:34:45 GMT 1413 Warning: 112 - "network down" "Sat, 25 Aug 2012 23:34:45 GMT" 1415 Warnings have accompanying warn-text that describes the error, e.g., 1416 for logging. It is advisory only, and its content does not affect 1417 interpretation of the warn-code. 1419 If a recipient that uses, evaluates, or displays Warning header 1420 fields receives a warn-date that is different from the Date value in 1421 the same message, the recipient MUST exclude the warning-value 1422 containing that warn-date before storing, forwarding, or using the 1423 message. This allows recipients to exclude warning-values that were 1424 improperly retained after a cache validation. If all of the warning- 1425 values are excluded, the recipient MUST exclude the Warning header 1426 field as well. 1428 The following warn-codes are defined by this specification, each with 1429 a recommended warn-text in English, and a description of its meaning. 1431 The procedure for defining additional warn codes is described in 1432 Section 7.2.1. 1434 5.5.1. Warning: 110 - "Response is Stale" 1436 A cache SHOULD generate this whenever the sent response is stale. 1438 5.5.2. Warning: 111 - "Revalidation Failed" 1440 A cache SHOULD generate this when sending a stale response because an 1441 attempt to validate the response failed, due to an inability to reach 1442 the server. 1444 5.5.3. Warning: 112 - "Disconnected Operation" 1446 A cache SHOULD generate this if it is intentionally disconnected from 1447 the rest of the network for a period of time. 1449 5.5.4. Warning: 113 - "Heuristic Expiration" 1451 A cache SHOULD generate this if it heuristically chose a freshness 1452 lifetime greater than 24 hours and the response's age is greater than 1453 24 hours. 1455 5.5.5. Warning: 199 - "Miscellaneous Warning" 1457 The warning text can include arbitrary information to be presented to 1458 a human user or logged. A system receiving this warning MUST NOT 1459 take any automated action, besides presenting the warning to the 1460 user. 1462 5.5.6. Warning: 214 - "Transformation Applied" 1464 This Warning code MUST be added by a proxy if it applies any 1465 transformation to the representation, such as changing the content- 1466 coding, media-type, or modifying the representation data, unless this 1467 Warning code already appears in the response. 1469 5.5.7. Warning: 299 - "Miscellaneous Persistent Warning" 1471 The warning text can include arbitrary information to be presented to 1472 a human user or logged. A system receiving this warning MUST NOT 1473 take any automated action. 1475 6. History Lists 1477 User agents often have history mechanisms, such as "Back" buttons and 1478 history lists, that can be used to redisplay a representation 1479 retrieved earlier in a session. 1481 The freshness model (Section 4.2) does not necessarily apply to 1482 history mechanisms. That is, a history mechanism can display a 1483 previous representation even if it has expired. 1485 This does not prohibit the history mechanism from telling the user 1486 that a view might be stale or from honoring cache directives (e.g., 1487 Cache-Control: no-store). 1489 7. IANA Considerations 1491 7.1. Cache Directive Registry 1493 The "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" 1494 defines the namespace for the cache directives. It has been created 1495 and is now maintained at . 1498 7.1.1. Procedure 1500 A registration MUST include the following fields: 1502 o Cache Directive Name 1504 o Pointer to specification text 1506 Values to be added to this namespace require IETF Review (see 1507 [RFC5226], Section 4.1). 1509 7.1.2. Considerations for New Cache Control Directives 1511 New extension directives ought to consider defining: 1513 o What it means for a directive to be specified multiple times, 1515 o When the directive does not take an argument, what it means when 1516 an argument is present, 1518 o When the directive requires an argument, what it means when it is 1519 missing, 1521 o Whether the directive is specific to requests, responses, or able 1522 to be used in either. 1524 See also Section 5.2.3. 1526 7.1.3. Registrations 1528 The registry has been populated with the registrations below: 1530 +------------------------+-----------------------------------+ 1531 | Cache Directive | Reference | 1532 +------------------------+-----------------------------------+ 1533 | max-age | Section 5.2.1.1, Section 5.2.2.8 | 1534 | max-stale | Section 5.2.1.2 | 1535 | min-fresh | Section 5.2.1.3 | 1536 | must-revalidate | Section 5.2.2.1 | 1537 | no-cache | Section 5.2.1.4, Section 5.2.2.2 | 1538 | no-store | Section 5.2.1.5, Section 5.2.2.3 | 1539 | no-transform | Section 5.2.1.6, Section 5.2.2.4 | 1540 | only-if-cached | Section 5.2.1.7 | 1541 | private | Section 5.2.2.6 | 1542 | proxy-revalidate | Section 5.2.2.7 | 1543 | public | Section 5.2.2.5 | 1544 | s-maxage | Section 5.2.2.9 | 1545 | stale-if-error | [RFC5861], Section 4 | 1546 | stale-while-revalidate | [RFC5861], Section 3 | 1547 +------------------------+-----------------------------------+ 1549 7.2. Warn Code Registry 1551 The "Hypertext Transfer Protocol (HTTP) Warn Codes" registry defines 1552 the namespace for warn codes. It has been created and is now 1553 maintained at . 1555 7.2.1. Procedure 1557 A registration MUST include the following fields: 1559 o Warn Code (3 digits) 1561 o Short Description 1563 o Pointer to specification text 1565 Values to be added to this namespace require IETF Review (see 1566 [RFC5226], Section 4.1). 1568 7.2.2. Registrations 1570 The registry has been populated with the registrations below: 1572 +-----------+----------------------------------+----------------+ 1573 | Warn Code | Short Description | Reference | 1574 +-----------+----------------------------------+----------------+ 1575 | 110 | Response is Stale | Section 5.5.1 | 1576 | 111 | Revalidation Failed | Section 5.5.2 | 1577 | 112 | Disconnected Operation | Section 5.5.3 | 1578 | 113 | Heuristic Expiration | Section 5.5.4 | 1579 | 199 | Miscellaneous Warning | Section 5.5.5 | 1580 | 214 | Transformation Applied | Section 5.5.6 | 1581 | 299 | Miscellaneous Persistent Warning | Section 5.5.7 | 1582 +-----------+----------------------------------+----------------+ 1584 7.3. Header Field Registration 1586 HTTP header fields are registered within the "Message Headers" 1587 registry maintained at . 1590 This document defines the following HTTP header fields, so the 1591 "Permanent Message Header Field Names" registry has been updated 1592 accordingly (see [BCP90]). 1594 +-------------------+----------+----------+--------------+ 1595 | Header Field Name | Protocol | Status | Reference | 1596 +-------------------+----------+----------+--------------+ 1597 | Age | http | standard | Section 5.1 | 1598 | Cache-Control | http | standard | Section 5.2 | 1599 | Expires | http | standard | Section 5.3 | 1600 | Pragma | http | standard | Section 5.4 | 1601 | Warning | http | standard | Section 5.5 | 1602 +-------------------+----------+----------+--------------+ 1604 The change controller is: "IETF (iesg@ietf.org) - Internet 1605 Engineering Task Force". 1607 8. Security Considerations 1609 This section is meant to inform developers, information providers, 1610 and users of known security concerns specific to HTTP caching. More 1611 general security considerations are addressed in HTTP messaging 1612 [MESSGNG] and semantics [SEMNTCS]. 1614 Caches expose additional potential vulnerabilities, since the 1615 contents of the cache represent an attractive target for malicious 1616 exploitation. Because cache contents persist after an HTTP request 1617 is complete, an attack on the cache can reveal information long after 1618 a user believes that the information has been removed from the 1619 network. Therefore, cache contents need to be protected as sensitive 1620 information. 1622 In particular, various attacks might be amplified by being stored in 1623 a shared cache; such "cache poisoning" attacks use the cache to 1624 distribute a malicious payload to many clients, and are especially 1625 effective when an attacker can use implementation flaws, elevated 1626 privileges, or other techniques to insert such a response into a 1627 cache. One common attack vector for cache poisoning is to exploit 1628 differences in message parsing on proxies and in user agents; see 1629 Section 3.3.3 of [MESSGNG] for the relevant requirements. 1631 Likewise, implementation flaws (as well as misunderstanding of cache 1632 operation) might lead to caching of sensitive information (e.g., 1633 authentication credentials) that is thought to be private, exposing 1634 it to unauthorized parties. 1636 Furthermore, the very use of a cache can bring about privacy 1637 concerns. For example, if two users share a cache, and the first one 1638 browses to a site, the second may be able to detect that the other 1639 has been to that site, because the resources from it load more 1640 quickly, thanks to the cache. 1642 Note that the Set-Cookie response header field [RFC6265] does not 1643 inhibit caching; a cacheable response with a Set-Cookie header field 1644 can be (and often is) used to satisfy subsequent requests to caches. 1645 Servers who wish to control caching of these responses are encouraged 1646 to emit appropriate Cache-Control response header fields. 1648 9. References 1650 9.1. Normative References 1652 [AUTHFRM] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1653 Ed., "Hypertext Transfer Protocol (HTTP): Authentication", 1654 draft-ietf-httpbis-auth-00 (work in progress), April 2018. 1656 [CONDTNL] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1657 Ed., "Hypertext Transfer Protocol (HTTP): Conditional 1658 Requests", draft-ietf-httpbis-conditional-00 (work in 1659 progress), April 2018. 1661 [MESSGNG] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1662 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message 1663 Syntax and Routing", draft-ietf-httpbis-messaging-00 (work 1664 in progress), April 2018. 1666 [RANGERQ] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1667 Ed., "Hypertext Transfer Protocol (HTTP): Range Requests", 1668 draft-ietf-httpbis-range-00 (work in progress), April 1669 2018. 1671 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1672 Requirement Levels", BCP 14, RFC 2119, 1673 DOI 10.17487/RFC2119, March 1997, 1674 . 1676 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1677 Specifications: ABNF", STD 68, RFC 5234, 1678 DOI 10.17487/RFC5234, January 2008, 1679 . 1681 [SEMNTCS] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1682 Ed., "Hypertext Transfer Protocol (HTTP): Semantics and 1683 Content", draft-ietf-httpbis-semantics-00 (work in 1684 progress), April 2018. 1686 9.2. Informative References 1688 [BCP90] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1689 Procedures for Message Header Fields", BCP 90, RFC 3864, 1690 September 2004, . 1692 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1693 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1694 Transfer Protocol -- HTTP/1.1", RFC 2616, 1695 DOI 10.17487/RFC2616, June 1999, 1696 . 1698 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1699 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1700 DOI 10.17487/RFC5226, May 2008, 1701 . 1703 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 1704 Content", RFC 5861, DOI 10.17487/RFC5861, April 2010, 1705 . 1707 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1708 "Network Time Protocol Version 4: Protocol and Algorithms 1709 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1710 . 1712 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1713 DOI 10.17487/RFC6265, April 2011, 1714 . 1716 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1717 Ed., "Hypertext Transfer Protocol (HTTP): Caching", 1718 RFC 7234, DOI 10.17487/RFC7234, June 2014, 1719 . 1721 Appendix A. Changes from RFC 7234 1723 None yet. 1725 Appendix B. Imported ABNF 1727 The following core rules are included by reference, as defined in 1728 Appendix B.1 of [RFC5234]: ALPHA (letters), CR (carriage return), 1729 CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double 1730 quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 1731 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII 1732 character). 1734 The rules below are defined in [MESSGNG]: 1736 OWS = 1737 field-name = 1738 quoted-string = 1739 token = 1741 port = 1742 pseudonym = 1743 uri-host = 1745 The rules below are defined in other parts: 1747 HTTP-date = 1749 Appendix C. Collected ABNF 1751 In the collected ABNF below, list rules are expanded as per 1752 Section 1.2 of [MESSGNG]. 1754 Age = delta-seconds 1756 Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS 1757 cache-directive ] ) 1759 Expires = HTTP-date 1761 HTTP-date = 1763 OWS = 1765 Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS 1766 pragma-directive ] ) 1768 Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ] 1769 ) 1771 cache-directive = token [ "=" ( token / quoted-string ) ] 1773 delta-seconds = 1*DIGIT 1775 extension-pragma = token [ "=" ( token / quoted-string ) ] 1777 field-name = 1779 port = 1780 pragma-directive = "no-cache" / extension-pragma 1781 pseudonym = 1783 quoted-string = 1785 token = 1787 uri-host = 1789 warn-agent = ( uri-host [ ":" port ] ) / pseudonym 1790 warn-code = 3DIGIT 1791 warn-date = DQUOTE HTTP-date DQUOTE 1792 warn-text = quoted-string 1793 warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date 1794 ] 1796 Appendix D. Change Log 1798 This section is to be removed before publishing as an RFC. 1800 D.1. Since RFC 7234 1802 The changes in this draft are purely editorial: 1804 o Change boilerplate and abstract to indicate the "draft" status, 1805 and update references to ancestor specifications. 1807 o Remove version "1.1" from document title, indicating that this 1808 specification applies to all HTTP versions. 1810 o Adjust historical notes. 1812 o Update links to sibling specifications. 1814 o Replace sections listing changes from RFC 2616 by new empty 1815 sections referring to RFC 723x. 1817 o Remove acknowledgements specific to RFC 723x. 1819 o Move "Acknowledgements" to the very end and make them unnumbered. 1821 Index 1823 1 1824 110 (warn-code) 31 1825 111 (warn-code) 31 1826 112 (warn-code) 31 1827 113 (warn-code) 31 1828 199 (warn-code) 31 1830 2 1831 214 (warn-code) 31 1832 299 (warn-code) 31 1834 A 1835 Age header field 20 1836 age 11 1838 C 1839 Cache-Control header field 21 1840 cache 4 1841 cache entry 5 1842 cache key 5-6 1844 D 1845 Disconnected Operation (warn-text) 31 1847 E 1848 Expires header field 27 1849 explicit expiration time 10 1851 F 1852 fresh 10 1853 freshness lifetime 10 1855 G 1856 Grammar 1857 Age 20 1858 Cache-Control 21 1859 cache-directive 21 1860 delta-seconds 5 1861 Expires 27 1862 extension-pragma 28 1863 Pragma 28 1864 pragma-directive 28 1865 warn-agent 29 1866 warn-code 29 1867 warn-date 29 1868 warn-text 29 1869 Warning 29 1870 warning-value 29 1872 H 1873 Heuristic Expiration (warn-text) 31 1874 heuristic expiration time 10 1876 M 1877 Miscellaneous Persistent Warning (warn-text) 31 1878 Miscellaneous Warning (warn-text) 31 1879 max-age (cache directive) 21, 26 1880 max-stale (cache directive) 22 1881 min-fresh (cache directive) 22 1882 must-revalidate (cache directive) 23 1884 N 1885 no-cache (cache directive) 22, 24 1886 no-store (cache directive) 23-24 1887 no-transform (cache directive) 23, 25 1889 O 1890 only-if-cached (cache directive) 23 1892 P 1893 Pragma header field 28 1894 private (cache directive) 25 1895 private cache 4 1896 proxy-revalidate (cache directive) 26 1897 public (cache directive) 25 1899 R 1900 Response is Stale (warn-text) 31 1901 Revalidation Failed (warn-text) 31 1903 S 1904 s-maxage (cache directive) 26 1905 shared cache 4 1906 stale 10 1907 strong validator 18 1909 T 1910 Transformation Applied (warn-text) 31 1912 V 1913 validator 15 1915 W 1916 Warning header field 29 1918 Acknowledgments 1920 See Appendix "Acknowledgments" of [MESSGNG]. 1922 Authors' Addresses 1924 Roy T. Fielding (editor) 1925 Adobe 1926 345 Park Ave 1927 San Jose, CA 95110 1928 USA 1930 EMail: fielding@gbiv.com 1931 URI: http://roy.gbiv.com/ 1933 Mark Nottingham (editor) 1934 Fastly 1936 EMail: mnot@mnot.net 1937 URI: https://www.mnot.net/ 1938 Julian F. Reschke (editor) 1939 greenbytes GmbH 1940 Hafenweg 16 1941 Muenster, NW 48155 1942 Germany 1944 EMail: julian.reschke@greenbytes.de 1945 URI: http://greenbytes.de/tech/webdav/