How Range works
A server that supports ranges advertises Accept-Ranges: bytes and answers a Range request with 206 Partial Content and a Content-Range header; a range past the end gets 416. Video and audio players depend on it: without range support, seeking doesn’t work and Safari may refuse to play the file.
Examples
Range: bytes=0-1023
Range: bytes=5000000-
HTTP/1.1 206 Partial Content
Content-Range: bytes 0-1023/146515
Content-Length: 1024
Check it
# Show the request headers curl sends (lines starting with >)
curl -sv -o /dev/null https://example.com 2>&1 | grep '^>'
Paste a full set of response headers into the HTTP header checker to get every header explained and common mistakes flagged.
Related headers
- Content-Length: gives the size of the body in bytes.
- ETag: gives a version identifier to a response, so caches can ask “has it changed?” cheaply.
- If-None-Match: asks the server to send the resource only if its ETag differs from the ones listed.
More content and negotiation headers
Content-Type , Content-Disposition , Content-Encoding , Accept , Accept-Encoding , Accept-Language , Transfer-Encoding .
Sources
Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.
Frequently asked questions
What does the Range header do?
The Range request header asks for only part of a resource, for resuming downloads and seeking in media. A server that supports ranges advertises Accept-Ranges: bytes and answers a Range request with 206 Partial Content and a Content-Range header; a range past the end gets 416. Video and audio players depend on it: without range support, seeking doesn’t work and Safari may refuse to play the file.
How do I see the Range header?
Open your browser’s dev tools, select a request in the Network tab and look under Request Headers. On the command line, "curl -v https://example.com" prints the request headers it sends, marked with ">".