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

http
Content-Length: <length>

Directives

<length>

The length in decimal number of octets.

Specifications

Specification
HTTP Semantics
# field.content-length

Browser compatibility

BCD tables only load in the browser

See also