Range Requests

Range requests, sometimes referred to as byteserving, involve the Web client requesting specific pieces of a resource (specified as a range of bytes) rather than the entire resource. The Range header allows the HTTP client to request partial content, rather than the usual full content, by specifying a range of bytes it seeks to receive. The client should always be prepared to receive the entire content, because this is how a Web server handles an invalid range, and it is also how servers that do not understand the Range header will respond.

To request the first 500 bytes of content, a server can include the following Range header in the request:

Range: 0-499 

Ranges are represented using the hyphen character, and multiple ranges ...

Get HTTP Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.