W3cubDocs

/HTTP

Range

The Range HTTP request header indicates the part of a document that the server should return. Several parts can be requested with one Range header at once, and the server may send back these ranges in a multipart document. If the server sends 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 also ignore the Range header and return the whole document with a 200 status code.

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 is 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

Feature Chrome Firefox Edge Internet Explorer Opera Safari
Basic Support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Edge mobile Firefox for Android IE mobile Opera Android iOS Safari
Basic Support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range