More
More
206 Partial Content
The server is sending only the part of the file the client asked for in its Range header.
- Code
206- Reason phrase
- Partial Content
- Class
- 2xx Success
- Defined in
- RFC 9110 section 15.3.7
- Cacheable by default
- Yes
What it means
Success: the request was received, understood and accepted.
When a server should send it. In answer to a request with a Range header the server can satisfy: one range with a Content-Range header, or several as multipart/byteranges. Static file servers such as nginx and Apache do this for you when Accept-Ranges: bytes is set.
Common causes. Video streaming, resumed downloads and download managers that fetch in pieces.
What to do. Nothing. If a resumed download is corrupt, the file probably changed on the server between requests.
How clients and crawlers treat it
Browsers and HTTP clients. Video and audio players use ranges to seek and stream; download managers use them to resume and to fetch in parallel. A server that ignores Range and sends 200 with the whole file is allowed, just slower.
Caching. Cacheable by default (RFC 9110 section 15.1). With no Cache-Control or Expires header, a cache may still store it and reuse it for a heuristic period, often 10% of the time since Last-Modified, so set Cache-Control explicitly if that is not what you want.
Example response
HTTP/1.1 206 Partial Content Content-Range: bytes 0-1023/146515 Content-Length: 1024 Content-Type: video/mp4 Accept-Ranges: bytes Partial Content
How to send 206
location /example {
return 206 'Partial Content';
}
http_response_code(206); echo 'Partial Content'; exit;
res.writeHead(206, { 'Content-Type': 'text/plain' });
res.end('Partial Content');
# in a view function return 'Partial Content', 206
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 416Range Not SatisfiableThe byte range asked for is outside the file.
- 200OKThe request succeeded and the response carries the result.
- 304Not ModifiedThe cached copy the client already has is still current, so no body is sent.
All status codes · All 2xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.