The 206 Partial Content HTTP status code indicates that the server is successfully delivering only a portion of the requested resource. This response is commonly used when a client sends a Range header to request specific byte ranges of a file.
Content-Range response headerWhen a client requests a specific portion of a resource using byte ranges, the server responds with status code 206 and sends only that portion.
If the server does not support range requests, it may ignore the header and return 200 OK instead.
// Client requesting only first 500 bytes of a file
GET /video.mp4 HTTP/1.1
Host: example.com
Range: bytes=0-499
// Server response with partial content
HTTP/1.1 206 Partial Content
Content-Range: bytes 0-499/2000
Content-Length: 500
The server sends back only the requested byte range instead of the full file. This reduces bandwidth usage and improves performance for large files.
Think of a large file as a long book. Instead of downloading the entire book, the client asks only for specific pages. The server sends just those pages, resulting in a 206 Partial Content response.
Total File Size: 1000 bytes
Content-Range headers in responses