Content-Range
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.
The HTTP Content-Range
response header is used in range requests to indicate where the content of a response body belongs in relation to a complete resource.
Header type | Response header, Content header |
---|---|
Forbidden header name | No |
CORS-safelisted request header | No |
Syntax
http
Content-Range: <unit> <range-start>-<range-end>/<size>
Content-Range: <unit> <range-start>-<range-end>/*
Content-Range: <unit> */<size>
Directives
<unit>
-
The unit for specifying ranges. Currently, only
bytes
is supported. <range-start>
-
An integer in the given unit indicating the start position (zero-indexed & inclusive) of the request range.
<range-end>
-
An integer in the given unit indicating the end position (zero-indexed & inclusive) of the requested range.
<size>
-
The total length of the document (or
*
if unknown).
Examples
http
Content-Range: bytes 200-1000/67589
Specifications
Specification |
---|
HTTP Semantics # field.content-range |
Browser compatibility
BCD tables only load in the browser
See also
- HTTP range requests guide
If-Range
,Range
headersContent-Type
206 Partial Content
,416 Range Not Satisfiable
status codes