206 Partial Content
Success - Returning requested range of data
HTTP 206 Partial Content
What It Means
The HTTP 206 Partial Content status code indicates that the server is successfully fulfilling a range request. The response contains only the portion of the resource specified by the Range header in the request.
Common Use Cases
- Video streaming: Loading video segments as needed (seeking)
- Resumable downloads: Continuing interrupted file downloads
- PDF viewers: Loading specific pages on demand
- Audio streaming: Jumping to specific timestamps
Example Request/Response
# Client requests bytes 0-1023 of a file
GET /video.mp4 HTTP/1.1
Host: cdn.example.com
Range: bytes=0-1023
# Server returns partial content
HTTP/1.1 206 Partial Content
Content-Type: video/mp4
Content-Length: 1024
Content-Range: bytes 0-1023/1048576
Accept-Ranges: bytes
[1024 bytes of video data]
Required Headers
| Header | Purpose |
|---|---|
| Content-Range | Indicates which bytes are being returned and total size |
| Content-Length | Size of the partial content being returned |
| Accept-Ranges | Indicates server supports range requests (usually "bytes") |
Range Header Formats
# First 500 bytes
Range: bytes=0-499
# Bytes from 500 to end
Range: bytes=500-
# Last 500 bytes
Range: bytes=-500
# Multiple ranges (multipart response)
Range: bytes=0-100, 200-300
Server Support
To check if a server supports range requests:
HEAD /large-file.zip HTTP/1.1
HTTP/1.1 200 OK
Accept-Ranges: bytes ← Range requests supported
Content-Length: 104857600