Content-Length
Content-Length
The Content-Length
header indicates the size of the message body, in bytes, sent to the recipient.
Header type | Request header, Response header, Payload header |
---|---|
Forbidden header name | yes |
CORS-safelisted response header | yes |
Syntax
Content-Length: <length>
Directives
- <length>
-
The length in decimal number of octets.
Specifications
Specification |
---|
Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing (HTTP/1.1) # header.content-length |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
Content-Length |
Yes
|
12
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
cors_response_safelist |
76
|
≤79
|
87
|
?
|
63
|
No
|
76
|
76
|
87
|
54
|
No
|
12.0
|
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length