kb/data/developer.mozilla.org/en-US/docs/Glossary/Cacheable-0.md

13 KiB

title chunk source category tags date_saved instance
Cacheable - Glossary | MDN 1/3 https://developer.mozilla.org/en-US/docs/Glossary/Cacheable reference web, html, css, javascript, documentation 2026-05-05T05:26:44.137660+00:00 kb-cron

MDN HTML HTML: Markup language

HTML reference

HTML guides

Markup languages

CSS CSS: Styling language

CSS reference

CSS guides

Layout cookbook

JavaScriptJS JavaScript: Scripting language

JS reference

JS guides

Web APIs Web APIs: Programming interfaces

Web API reference

Web API guides

All All web technology

Technologies

Topics

Learn Learn web development

Frontend developer course

Learn HTML

Learn CSS

Learn JavaScript

Tools Discover our tools

About Get to know MDN better

Blog

  1. Glossary
  2. Cacheable

Cacheable

A cacheable response is an HTTP response that can be cached, that is stored to be retrieved and used later, saving a new request to the server. Not all HTTP responses can be cached; these are the constraints 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 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 (Firefox bug 109553). 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.
  • There are no specific headers in the response, like Cache-Control, with values that would prohibit caching.

Note that some requests with non-cacheable responses to a specific URI may invalidate previously cached responses from the same URI. For example, a PUT to /pageX.html will invalidate all cached responses to GET or HEAD requests to /pageX.html. When both the method of the request and the status of the response are cacheable, the response to the request can be cached: The response to a PUT request cannot be cached. Moreover, it invalidates cached data for requests to the same URI using HEAD or GET methods: The presence of the Cache-Control header with a particular value in the response can prevent caching:

In this article

See also

  • Details about methods and caching are provided in the HTTP specification.
  • Description of common cacheable methods: GET, HEAD
  • Description of common non-cacheable methods: PUT, DELETE, often POST