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
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

