Protocols
Saved & recent

HTTP range requests

Also called: byte-range request, partial content

A range request asks for part of a representation, which helps resume downloads or seek within large files. With byte ranges, positions start at zero and the ending position is inclusive. A server that honors the request returns 206 Partial Content and identifies the returned range; support is not guaranteed.

For a 1,000-byte file, Range: bytes=200-399 asks for 200 bytes. A matching response carries Content-Range: bytes 200-399/1000. A server can ignore the range and send the full file with 200, or reject an unsatisfiable range with 416. An If-Range validator helps a client avoid combining pieces from different versions.

Read first
HTTP
Related
Conditional requests, HTTP headers, HTTP status codes
Further reading
MDN — HTTP range requests
Range: bytes=200-399 206 Partial Content Content-Range: bytes 200-399/1000 1,000-byte resource 0 200 399 999 200 bytes honored range example
Honored-range example: positions 200 through 399 inclusive contain 200 bytes, one fifth of the 1,000-byte file. A server can instead ignore the range or reject an unsatisfiable request.

View in the full Protocols collection