Range requests
07A client can request a byte range without downloading an entire selected representation again.
Do not combine fragments from incompatible versions of the resource.
Key idea: Combine partial content only with a compatible representation.
Terms
- Client / user agent
- The app making a request; in this example, your browser.
- Origin server
- The server responsible for providing an answer for the target resource.
- Request
- A message asking for an action on a resource.
- Response
- The server’s message reporting the result of a request.
- Resource
- Something identified by a URI, such as the page at /story.
- Representation
- Content and descriptive information that convey a resource’s state, such as an HTML page.
- Semantics
- What a message or protocol element means, independently of how it travels.
- Byte range
- A selected interval of bytes within a representation.
- Content-Range
- A field describing the returned range and, when known, the complete length.
- If-Range
- A condition allowing a range only while the representation validator still matches.
- 206 / 416
- 206 returns partial content; 416 reports an unsatisfiable range request.
Rules & examples
Combine partial content only with a compatible representation.
- A server can ignore Range and return the complete representation.
- 206 Partial Content describes selected ranges; 416 signals an unsatisfiable range request.
- If-Range lets a client request a range only while its validator remains valid, otherwise receiving the full representation.
Content-Range describes the returned interval. Multipart responses can carry several ranges. Range requests are optional and need resource-use safeguards.
Predict: Does a Range request guarantee a 206 response?
Check your answer
No. A server can ignore Range and return the complete representation.
Sources
New to this? Start hereA quick picture + helpful background
A request starts a conversation.
A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.