Range
RequestActiveThe Range header requests only a specific portion of a resource – a byte range. The server responds with 206 Partial Content and the requested bytes. Used for resumable downloads (resume interrupted files), video seeking (streaming players jump to a timestamp), and parallel downloads (splitting a file across multiple connections).
Range: bytes=<start>-<end>[, <start>-<end>]*
Description
Range requests allow clients to fetch specific byte ranges of a resource. The server must advertise Accept-Ranges: bytes to indicate support. A successful partial response is 206 Partial Content with a Content-Range header indicating which bytes are included. If the range is unsatisfiable (e.g., start > file size), the server returns 416 Range Not Satisfiable.
Directives
| Directive | Description |
|---|---|
| bytes=0-499 | First 500 bytes (inclusive). |
| bytes=-500 | Last 500 bytes. |
| bytes=500- | From byte 500 to end of file. |
| bytes=0-0,-1 | First and last byte (multi-range). |
Examples
Resume download at offset
http
GET /video/movie.mp4 HTTP/1.1
Range: bytes=1048576-
# Server response:
HTTP/1.1 206 Partial Content
Content-Range: bytes 1048576-52428799/52428800
Content-Length: 51380224Video player seek
http
GET /video/movie.mp4 HTTP/1.1
Range: bytes=5242880-10485759