非常教程

HTTP参考手册

标题 | Headers

Pragma

PragmaHTTP / 1.0 一般报头是特定于实现的报头可以具有沿着请求-响应链的各种效果。它用于向后兼容 HTTP / 1.1 缓存,而Cache-Control HTTP / 1.1 缓存不存在。

注意Pragma未指定用于 HTTP 响应,因此不为普通 HTTP / 1.1 的可靠替换Cache-Control首部,虽然它不表现一样Cache-Control: no-cache,如果Cache-Control在请求中省略报头字段。使用Pragma仅适用于 HTTP / 1.0 客户端的向后兼容性。

Header type

General header, but response behavior is not specified and thus implementation-specific.

Forbidden header name

no

CORS-safelisted response-header

yes

句法

Pragma: no-cache

指令

无缓存

Cache-Control: no-cache一样。在释放缓存副本之前,强制高速缓存将请求提交给原始服务器进行验证。

例子

Pragma: no-cache

产品规格

Specification

Title

RFC 7234, section 5.4: Pragma

Hypertext Transfer Protocol (HTTP/1.1): Caching

浏览器兼容性

Feature

Chrome

Firefox

Edge

Internet Explorer

Opera

Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

请参阅

  • Cache-Control
  • Expires
HTTP

超文本传输协议( HTTP,HyperText Transfer Protocol ) 是互联网上应用最为广泛的一种网络协议。所有的 WWW 文件都必须遵守这个标准。