Vary
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Vary
HTTP 响应标头描述了除方法和 URL 之外影响响应内容的请求消息。大多数情况下,这用于在使用内容协商时创建缓存键。
给定 URL 的所有响应都应使用相同的 Vary
标头值,包括 304
Not Modified
响应和“默认”响应。
语法
http
Vary: *
Vary: <header-name>, <header-name>, ...
指令
- *
-
表示请求标头以外的因素影响了此响应的生成。意味着响应不可缓存。
- <header-name>
-
可能影响此响应生成的请求标头名称的逗号分隔列表。
规范
Specification |
---|
HTTP Semantics # field.vary |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Vary |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.