🎉 Requestly joins BrowserStack to build the future of application testing. Read more

HTTP Headers

Pragma

HTTP Header

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 typeRequest header, Response header (note that response behavior is implementation-dependent).
Forbidden request headerNo
CORS-safelisted response headerYes

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

http
Pragma: no-cache

How to Modify Header using Requestly

Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Pragma header. This is especially useful for controlling cache behavior or testing how your application handles different cache policies during development or debugging. Steps to Modify the Pragma Header:

  1. Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
  2. Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
  3. 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).
  4. Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
  5. 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.