Range Header Explained
What the HTTP Range header does and when it's used.
Published October 17, 2026
Range lets a client request just part of a resource by byte range, enabling resumable downloads and media seeking. The server replies 206 Partial Content.
How it works
If the range is invalid the server replies 416.
The Range header is part of the HTTP message and is case-insensitive in name.
In a real exchange
curl -i https://example.com/
Range: bytes=0-1023
Practical examples
The header
Range: bytes=0-1023Set or use it in code
curl -r 0-1023 -o part.bin https://example.com/video.mp4Inspect it
curl -sI https://example.com | grep -i 'range'Common mistakes
- Not supporting Accept-Ranges
- Wrong Content-Range calculations
- Combining with compression
Key takeaways
- Range: Range lets a client request just part of a resource by byte range, enabling resumable downloads and media seeking.
- Check it in browser DevTools → Network.
- Test with curl -I before deploying.
FAQ
What does Accept-Ranges do?
It advertises that the server supports range requests.
Is Range case sensitive?
Header names are case-insensitive; values may not be.