Content-Length
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.
HTTP Content-Length
标头表示发送给接收方的消息体的大小(以字节为单位)。
标头类型 | 请求标头、响应标头、内容标头 |
---|---|
禁止修改的标头 | 是 |
列入 CORS 白名单的响应标头 | 是 |
语法
http
Content-Length: <length>
指令
<length>
-
以字节为单位的长度。
规范
Specification |
---|
HTTP Semantics # field.content-length |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Content-Length | ||||||||||||
CORS-safelisted response header |
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.