Open In App

HTTP headers | Content-Range

Last Updated : 23 Oct, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The Content-Range HTTP header is a response header that indicates where a partial message belongs in a full body massage. This header is sent with a partial entity-body to specify where in the full entity-body the partial body should be applied. Syntax:
Content-Range: <unit> <range-start>-<range-end>/<size>
Content-Range: <unit> <range-start>-<range-end>/*
Content-Range: <unit> */<size>
Directives:
  • <unit>: This specifies the unit of content range. This value is usually in bytes.
  • <range-start>: An integer that specifies the beginning of the requested range in a given unit.
  • <range-end>: An integer that specifies the ending of the requested range in a given unit.
  • <size>: This specifies the total size of the document. The '*' is used when the value is unknown.
Examples:
Content-Range: bytes 500-1000/65989
It specifies the unit of the range as bytes and states the range-start as 500 bytes while the range-end as 1000 bytes. The total size of the document is 65989 bytes.
Content-Range: bytes 50-1000/*
It specifies the unit of the range as bytes and states the range-start as 50 bytes while the range-end as 1000 bytes. The total size of the document is unknown. Supported Browsers The following browsers are compatible with HTTP Content-Range:
  • Google Chrome
  • Internet Explorer
  • Opera
  • Firefox
  • Safari

Next Article

Similar Reads