Skip to main content

Pragma

BothActive

Pragma is an HTTP/1.0 header, kept for backwards compatibility. Pragma: no-cache instructs caches not to use a stored response without revalidating with the origin. In HTTP/1.1, Cache-Control: no-cache is equivalent and takes precedence. Pragma is only meaningful for HTTP/1.0 caches that don't understand Cache-Control.

Pragma: no-cache

Description

Pragma was defined in HTTP/1.0 with only one useful value: no-cache. HTTP/1.1 deprecated it in favor of Cache-Control. Modern servers should send Cache-Control instead of (or in addition to) Pragma for backwards compatibility. RFC 9111 states that when Cache-Control is present, it takes precedence over Pragma. Pragma: no-cache on a request asks proxies to fetch fresh content from the origin.

Examples

HTTP/1.0 compatibility
http
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Pragma: no-cache
Request no-cache
http
GET /api/status HTTP/1.1
Cache-Control: no-cache
Pragma: no-cache

Related

Specification

RFC 9111Pragma specification →