Internet Engineering Task Force (IETF) P. McManus
Request for Comments: 8246 Mozilla
Category: Standards Track September 2017
ISSN: 2070-1721
HTTP Immutable Responses
McManus Standards Track [Page 1]
RFC 8246 HTTP Immutable Response September 2017
Table of Contents
1. Introduction
HTTP's freshness lifetime mechanism [RFC7234] allows a client to safely reuse a stored response to satisfy future requests for a specified period of time. However, it is still possible that the resource will be modified during that period.
McManus Standards Track [Page 2]
RFC 8246 HTTP Immutable Response September 2017
Unfortunately, the user agent does not know when this versioned URL design pattern is used. As a result, user-driven refreshes still translate into wasted conditional requests for each sub-resource as each will return 304 responses.
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
2. The Immutable Cache-Control Extension
When present in an HTTP response, the immutable Cache-Control extension indicates that the origin server will not update the representation of that resource during the freshness lifetime of the response.
McManus Standards Track [Page 3]
RFC 8246 HTTP Immutable Response September 2017 2.1. About IntermediariesAn immutable response has the same semantic meaning when received by proxy clients as it does when received by user-agent-based clients. Therefore, proxies SHOULD skip conditionally revalidating fresh responses containing the immutable extension unless there is a signal from the client that a validation is necessary (e.g., a no-cache Cache-Control request directive defined in Section 5.2.1.4 of [RFC7234]).
2.2. Example
Cache-Control: max-age=31536000, immutable
3. Security Considerations
The immutable mechanism acts as form of soft pinning and, as with all pinning mechanisms, creates a vector for amplification of cache corruption incidents. These incidents include cache-poisoning attacks. Three mechanisms are suggested for mitigation of this risk:
McManus Standards Track [Page 4]
RFC 8246 HTTP Immutable Response September 2017 4. IANA ConsiderationsThe immutable extension has been registered in the "Hypertext Transfer Protocol (HTTP) Cache Directive Registry" per the guidelines described in Section 7.1 of [RFC7234].
5. References 5.1. Normative References[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
5.2. Informative References
[REQPERPAGE]
McManus Standards Track [Page 5]
RFC 8246 HTTP Immutable Response September 2017
Acknowledgments