このロケールの翻訳が存在しないため、英語バージョンのコンテンツを表示しています。 Help us translate this article!
The Range
HTTP request header indicates the part of a document that the server should return. Several parts can be requested with one Range
header at once, and the server may send back these ranges in a multipart document. If the server sends back ranges, it uses the 206
Partial Content
for the response. If the ranges are invalid, the server returns the 416
Range Not Satisfiable
error. The server can also ignore the Range
header and return the whole document with a 200
status code.
ヘッダータイプ | Request header |
---|---|
Forbidden header name | いいえ |
構文
Range: <unit>=<range-start>- Range: <unit>=<range-start>-<range-end> Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> Range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end>
ディレクティブ
- <unit>
- The unit in which ranges are specified. This is usually
bytes
.
- <range-start>
- An integer in the given unit indicating the beginning of the request range.
- <range-end>
- An integer in the given unit indicating the end of the requested range. This value is optional and, if omitted, the end of the document is taken as the end of the range.
例
Range: bytes=200-1000, 2000-6576, 19000-
仕様
仕様書 | タイトル |
---|---|
RFC 7233, セクション 3.1: Range | Hypertext Transfer Protocol (HTTP/1.1): Range Requests |
ブラウザの互換性
このページの互換表は構造化データから生成されます。データに貢献したい場合は https://github.com/mdn/browser-compat-data をチェックし、プルリクエストを送信してください。
Update compatibility data on GitHub
デスクトップ | モバイル | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Range | Chrome 完全対応 あり | Edge 完全対応 あり | Firefox 完全対応 あり | IE 完全対応 あり | Opera 完全対応 あり | Safari 完全対応 あり | WebView Android 完全対応 あり | Chrome Android 完全対応 あり | Firefox Android 完全対応 あり | Opera Android 完全対応 あり | Safari iOS 完全対応 あり | Samsung Internet Android 完全対応 あり |
凡例
- 完全対応
- 完全対応
関連情報
If-Range
Content-Range
Content-Type
206
Partial Content
416
Range Not Satisfiable