206 Partial Content means the server delivered only part of the resource (a byte range) that the client asked for with a Range header. The Content-Range header states which range was sent and out of what total size.
This code powers resumable downloads and media streaming, letting clients fetch just the bytes they need instead of re-downloading a whole large file.
GET /video.mp4 HTTP/1.1
Host: media.example.com
Range: bytes=1048576-2097151HTTP/1.1 206 Partial Content
Content-Range: bytes 1048576-2097151/5242880
Content-Length: 1048576
Content-Type: video/mp4
Accept-Ranges: bytes
(binary chunk)# request bytes 500-999 of a file
curl -H 'Range: bytes=500-999' https://media.example.com/video.mp4 -o part
# or resume a broken download
curl -C - -O https://media.example.com/video.mp4const res = await fetch('/video.mp4', {
headers: { Range: 'bytes=0-1023' }
});
console.log(res.status); // 206
console.log(res.headers.get('Content-Range'));