Partial Content
The request has succeeded and the body contains the requested ranges of data.
What it means
The HTTP 206 Partial Content success status response code indicates that the request has succeeded and the body contains the requested ranges of data, as described in the `Range` header of the request.
If there is only one range, the `Content-Type` of the whole response is set to the type of the document, and a `Content-Range` is provided. If several ranges are sent back, the `Content-Type` is set to `multipart/byteranges`.
How it works
- 1The client sends a GET request with a 'Range' header (e.g., 'Range: bytes=0-1023').
- 2The server verifies it supports range requests and the range is valid.
- 3The server responds with '206 Partial Content', a 'Content-Range' header, and exactly the requested bytes in the body.
Why you're seeing this
- • The client specifically requested a byte range.
How to fix it
- • If a video refuses to scrub/seek on Safari, ensure your server correctly supports Range requests and returns 206. Safari requires 206 support for HTML5 video.
Framework Implementations
Node.js (fs)
const file = fs.createReadStream(path, { start, end });
res.writeHead(206, {
'Content-Range': `bytes ${start}-${end}/${fileSize}`,
'Accept-Ranges': 'bytes',
'Content-Length': chunksize,
});
file.pipe(res);Real-Life Scenarios
This is essential for video streaming, downloading massive files (resume support), or PDF viewers that fetch specific pages dynamically.
Video Streaming (Netflix/YouTube)
The browser requests the first 5MB of a movie. As the user watches, the video player sends 'Range' requests to fetch the next chunks, allowing instant playback and scrubbing.
Resuming a Failed Download
A 10GB game download fails at 9GB. The client requests 'Range: bytes=9000000000-' to get only the remaining 1GB, and the server answers with 206.
HTTP Transaction
1. Client Request
GET /video.mp4 HTTP/1.1 Host: media.example.com Range: bytes=0-1023
2. Server Response
HTTP/1.1 206 Partial Content Content-Range: bytes 0-1023/146515 Content-Length: 1024 Content-Type: video/mp4 (binary data...)
SEO Implications
Googlebot may use range requests for massive files, but usually, it expects a 200 OK for standard HTML pages.