Success
206

Partial Content

The server is delivering only part of the resource due to a Range header sent by the client.

# Quick Definition

The 206 Partial Content status code indicates that the server is successfully fulfilling a range request by transferring only the portion of the resource specified by the client's Range header. Instead of sending the entire file, the server delivers just the requested byte range along with Content-Range headers describing the returned segment.

# When Does a 206 Response Occur?

A 206 response occurs when the client includes a Range header in the request, asking for specific bytes of a resource, and the server supports and honors that request. This is fundamental to how video players seek through media files, how download managers resume interrupted downloads, and how large files are transferred in chunks.

The server must include a Content-Range header in the response indicating which bytes are being returned and the total size of the resource. For multiple ranges, the response uses a multipart/byteranges content type.

# Common Use Cases

# Best Practices

  1. Advertise range support -- Include Accept-Ranges: bytes in your responses to indicate that the server supports range requests for the resource.
  2. Include Content-Range and Content-Length -- Always return the correct Content-Range header (e.g., bytes 0-999/5000) and set Content-Length to the size of the returned chunk, not the full file.
  3. Use ETag or Last-Modified for validation -- Include validators so clients can detect if the resource changed between range requests, preventing corrupted downloads.
  4. Handle invalid ranges gracefully -- Return 416 Range Not Satisfiable if the requested range is outside the resource size, with a Content-Range header indicating the actual size.
  5. Support single and multipart ranges -- Implement both single range (one segment) and multipart range (multiple segments in one response) for maximum compatibility.

# HTTP Example

Request
GET /videos/demo.mp4 HTTP/1.1
Host: cdn.example.com
Range: bytes=1048576-2097151
Response
HTTP/1.1 206 Partial Content
Content-Type: video/mp4
Content-Length: 1048576
Content-Range: bytes 1048576-2097151/10485760
Accept-Ranges: bytes
ETag: "a1b2c3d4e5"

[binary data - 1 MB chunk]

# Related Status Codes

# Frequently Asked Questions

How does video seeking use 206 Partial Content? +
When you click on the progress bar of an HTML5 video player to skip to a specific timestamp, the browser sends a Range request for the bytes corresponding to that position in the video file. The server responds with 206 Partial Content, delivering only the requested segment. This allows instant seeking without downloading the entire video first.
What happens if the server doesn't support Range requests? +
If the server doesn't support Range requests, it will ignore the Range header and return the full resource with a 200 OK status code. The client should be prepared to handle this fallback. You can check if a server supports ranges by looking for the Accept-Ranges: bytes header in a HEAD or GET response.

Monitor your uptime 24/7

Track CDN performance, response codes, and download speeds for your media endpoints.

Start Free Monitoring