HTTP headers
HTTP headers carry metadata about a request or response: what format the body is in, how long it can be cached, who is asking, and which sites may read the answer. Type a header name to see what it does and a copyable example.
HTTP headerCache-ControlMDN: Cache-Control
Caching rules for browsers and proxies.
Cache-Control: public, max-age=31536000, immutableHow to use it
- Type a header name, such as Cache-Control.
- Read what it does.
- Copy the example and adjust it.
This tool is also built into Zest search, so you can type your question into the search box and get the same answer above the results.
Common questions
- What is Content-Type for?
- Content-Type tells the receiver how to read the body, for example application/json or text/html; charset=utf-8.
- How do I stop a response being cached?
- Send Cache-Control: no-store. Use no-cache if the response may be stored but must be revalidated before reuse.