206 Partial Content HTTP Status Code

Description

The HTTP status code 206 is used in response to a request for a range of data, indicating that the server is successfully fulfilling that partial request. This code is part of the HTTP/1.1 standard defined by the RFC 7233. The 206 status code is specifically returned when a server successfully processes a request that includes a Range header, which asks for only part of a resource. For example, a client might only request a specific portion of a large video or document, rather than downloading the entire file. This is useful for resuming interrupted downloads, or for splitting downloads into multiple simultaneous streams to improve download speed.

The response accompanying a 206 status code typically includes the Content-Range header indicating which part of the requested range is being fulfilled (e.g., bytes 21010-47021/47022, meaning that the part being sent is from byte 21010 to 47021 out of a total of 47022 bytes). It may also include other relevant headers for managing partial content delivery.

This mechanism allows for more efficient use of network resources by enabling the downloading of only needed portions of resources, especially useful in scenarios involving large files or in situations where bandwidth is limited or costly.

Status

HTTP
206 Partial Content

Common Causes

The HTTP status code 206, which stands for "Partial Content," is used by a web server to indicate that a request for a part of a resource has been successfully processed. The primary reasons or causes for a server to respond with a 206 status code include:

  1. Range Requests: The most common cause of a 206 response is a request made by a client for a specific range of a resource. For example, when downloading a large file, a client might request to download the file in chunks rather than all at once. The client specifies the desired range using the Range header in the request, and if the server supports range requests, it will respond with a 206 status code along with the requested content range.

  2. Efficient Use of Bandwidth: By allowing the client to request specific portions of a resource, the 206 status code facilitates more efficient use of bandwidth, especially in scenarios where a client does not need the entire resource or if the connection was interrupted and the client needs to resume a download from where it left off.

  3. Streaming Media: The 206 status code is commonly used in the streaming of media files. When streaming video or audio, the client may only request portions of the file as needed, rather than downloading the entire file upfront. This approach enables smoother playback and more efficient data usage.

  4. Resume Interrupted Downloads: If a download is interrupted due to a network issue or the client pausing the download, the client can later resume the download from the point of interruption using range requests. The server will respond with a 206 status code if it successfully processes the partial request.

  5. Optimized Web Browsing: Web browsers can use range requests to optimize the loading of web pages, especially for large resources like images or scripts. By requesting only the portions of resources that are needed, browsers can reduce loading times and improve the user experience.

  6. Conditional Requests: Alongside range requests, conditional headers like If-Range can be used to request parts of a resource only if it hasn’t been modified. If the resource is unchanged, the server responds with 206; otherwise, it may respond with a 200 status code and the full resource.

To summarize, the 206 status code is specifically used to indicate that a request for one or more parts of a resource has been successfully fulfilled, promoting efficient data transfer and enabling functionalities like streaming and resuming downloads.

Browser Support

The following table will show you the current browser support for the 206 Partial Content HTTP status code.

Desktop
Edge Chrome Firefox Opera Safari
YesYesYesYesYes
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
YesYesYesYesYesYes

Last updated by CSSPortal on: 31st March 2024