![]() |
VOOZH | about |
HTTP headers are used to transmit additional information in an HTTP request or response. One such important header is the Content-Length header, which is responsible for indicating the size of the entity-body, measured in bytes (octets). This information is used by the recipient to know the exact length of the body content that follows the headers.
The Content-Length header defines the size of the HTTP message body (in bytes) sent to the recipient. This header is especially useful in cases where the recipient needs to know how much data to expect. The size is defined in decimal format.
The Content-Length header is considered a forbidden header name, meaning you cannot modify or set it programmatically in certain environments, such as using JavaScript within browsers.
Syntax:
Content-Length: <length>Directive:
This header accepts a single directive mentioned above and described below:
Example:
content-length: 6553
content-length: 54138