HTTP Headers
Pragma
Deprecated: This feature is no longer recommended. Although some browsers may still support it, it might have been removed from current web standards, is in the process of being phased out, or is retained solely for compatibility reasons. It is advisable to avoid using it and to update existing code where possible. Refer to the compatibility table at the bottom of this page for guidance. Keep in mind that this feature could stop functioning at any time.
The HTTP Pragma
header is a specific implementation feature that can influence the request-response process in various ways.
It was designed to maintain compatibility with HTTP/1.0 caches that do not recognize the Cache-Control
header introduced in HTTP/1.1.
Note:
The Pragma
header is not formally defined for HTTP responses and thus cannot reliably replace the Cache-Control
header in HTTP/1.1. However, its behavior mimics Cache-Control: no-cache
when the Cache-Control
header field is absent in a request.
Use the Pragma
header primarily for backward compatibility with HTTP/1.0 clients.
Header type | Request header, Response header (note that response behavior is implementation-dependent). |
---|---|
Forbidden request header | No |
CORS-safelisted response header | Yes |
Syntax
Pragma: no-cache
Directives
Directives
- no-cache
Same as
Cache-Control: no-cache
. Forces caches to submit the request to the origin server for validation before a cached copy is released.
Example
Examples
Pragma: no-cache
How to Modify Header using Requestly
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Pragma.
- In the “Header Value” field, enter the desired directive (e.g., no-cache).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
- Save the rule.
Once set up, Requestly will inject the Pragma header with your specified value into all matching requests, helping you test how your server or client cache behaves under different instructions.
Table of Contents
- No headings found.