The Range request HTTP header indicates the part of a document that the server should returns to the requests. Several parts can be requested with one Range header, and the server may send back these ranges in a multipart document. If the server send back ranges, it uses the 206 Partial Content for the response; If the ranges are invalid, the server returns the 416 Range Not Satisfiable error. The server can ignore the Range header and returns the whole document, with the 200 status code.
| Header type | Request header |
|---|---|
| Forbidden header name | no |
Syntax
Range: <unit> <range-start>- Range: <unit> <range-start>-<range-end> Range: <unit> <range-start>-<range-end>, <range-start>-<range-end> Range: <unit> <range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end>
Directives
- <unit>
- The unit in which ranges are specified. This is usually
bytes.
- <range-start>
- An integer in the given unit indicating the beginning of the request range
- <range-end>
- An integer in the given unit indicating the end of the requested range. This value if optional and, if omitted, the end of the document is taken as the end of the range.
Examples
Range: bytes 200-1000, 2000-6576, 19000-
Specifications
| Specification | Title |
|---|---|
| RFC 7233, section 3.1: Range | Hypertext Transfer Protocol (HTTP/1.1): Range Requests |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
File "http/headers/range.json" not found or malformed.
See also
If-RangeContent-RangeContent-Type206Partial Content416Range Not Satisfiable