About
A cacheable response is an HTTP response the can be cached, that is stored to be retretireved and used later, saving a new request to the server1.
Constraints for an HTTP response to be cacheable
Not all HTTP responses can be cached; these are the constrains for an HTTP response to be cacheable:
- The method used in the request is cacheable, that is either a GET or a HEAD method. A response to a POST request or PATCH request can also be cached if freshness is indicated and the Content-Location header is set, but this is rarely implemented. For example, Firefox does not support it. Other methods, like PUT, or DELETE are not cacheable and their result cannot be cached.
- The status code of the response is known by the application caching, and is cacheable. The following status codes are cacheable: 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501.
Anki
Links
References
MDN. “cacheable”. Available at: https://developer.mozilla.org/en-US/docs/Glossary/Cacheable. (Accessed: ). ↩︎