Revision 1105221 of 206 Partial Content

  • Revision slug: Web/HTTP/Status/206
  • Revision title: 206 Partial Content
  • Revision id: 1105221
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The HTTP 206 Partial Content success status response code indicates that the request has succeeded and has the body contains the requested ranges of data, as described in the {{HTTPHeader("Range")}} header of the request.

If there is only one range, the {{HTTPHeader("Content-Type")}} of the whole response is set to the type of the document, and a {{HTTPHeader("Content-Range")}} is provided.

If several ranges are sent back, the {{HTTPHeader("Content-Type")}} is set to multipart/byteranges and each fragment cover one range, with {{HTTPHeader("Content-Range")}} and {{HTTPHeader("Content-Type")}} describing it.

Status

206 Partial Content

Examples

A response containing one single range:

HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Range: bytes 21010-47021/47022
Content-Length: 26012
Content-Type: image/gif

... 26012 bytes of partial image data ...

A response containing several ranges:

HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Length: 1741
Content-Type: multipart/byteranges; boundary=String_separator

--String_separator
Content-Type: application/pdf
Content-Range: bytes 234-639/8000

...the first range...
--String_separator
Content-Type: application/pdf
Content-Range: bytes 4590-7999/8000

...the second range
--String_separator--

Specifications

Specification Title
{{RFC("7233", "206 Partial Content" , "4.1")}} Hypertext Transfer Protocol (HTTP/1.1): Range Requests

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("If-Range")}}
  • {{HTTPHeader("Range")}}
  • {{HTTPHeader("Content-Range")}}
  • {{HTTPHeader("Content-Type")}}

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The HTTP <strong><code>206 Partial Content</code></strong> success status response code indicates that the request has succeeded and has the body contains the requested ranges of data, as described in the {{HTTPHeader("Range")}} header of the request.</p>

<p>If there is only one range, the {{HTTPHeader("Content-Type")}} of the whole response is set to the type of the document, and a {{HTTPHeader("Content-Range")}} is provided.</p>

<p>If several ranges are sent back, the {{HTTPHeader("Content-Type")}} is set to <code>multipart/byteranges</code> and each fragment cover one range, with {{HTTPHeader("Content-Range")}} and {{HTTPHeader("Content-Type")}} describing it.</p>

<h2 id="Status">Status</h2>

<pre class="syntaxbox">
206 Partial Content</pre>

<h2 id="Examples">Examples</h2>

<p>A response containing one single range:</p>

<pre class="newpage">
HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Range: bytes 21010-47021/47022
Content-Length: 26012
Content-Type: image/gif

... 26012 bytes of partial image data ...</pre>

<p>A response containing several ranges:</p>

<pre class="newpage">
HTTP/1.1 206 Partial Content
Date: Wed, 15 Nov 2015 06:25:24 GMT
Last-Modified: Wed, 15 Nov 2015 04:58:08 GMT
Content-Length: 1741
Content-Type: multipart/byteranges; boundary=String_separator

--String_separator
Content-Type: application/pdf
Content-Range: bytes 234-639/8000

...the first range...
--String_separator
Content-Type: application/pdf
Content-Range: bytes 4590-7999/8000

...the second range
--String_separator--</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7233", "206 Partial Content" , "4.1")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data/README.md">https://github.com/mdn/browser-compat-data/README.md</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{HTTPHeader("If-Range")}}</li>
 <li>{{HTTPHeader("Range")}}</li>
 <li>{{HTTPHeader("Content-Range")}}</li>
 <li>{{HTTPHeader("Content-Type")}}</li>
</ul>
Revert to this revision