©
This document usesPHP Chinese website manualRelease
的If-RangeHTTP 请求报头使得范围请求的条件:如果条件被满足,该范围的请求将被发出,并且服务器发送回一个206Partial Content与适当的身体的答案。如果条件未满足,则会返回具有200OK状态的完整资源。
这个头文件可以与Last-Modified验证器一起使用,也可以与一个ETag,但不与两者一起使用。
最常见的用例是恢复下载,以确保自从收到最后一个片段后,存储的资源未被修改。
|
Header type |
Request header |
|---|---|
|
Forbidden header name |
no |
If-Range:, : : GMT If-Range:
"675af34563dc-tr34")之间的一串 ASCII 字符,可以加前缀W/以表示应使用弱比较算法。GMT
格林威治标准时间。HTTP 日期总是以 GMT 表示,从不以本地时间表示。
If-Range: Wed, 21 Oct 2015 07:28:00 GMT
|
Specification |
Title |
|---|---|
|
RFC 7233, section 3.2: If-Range |
Hypertext Transfer Protocol (HTTP/1.1): Range Requests |
|
Feature |
Chrome |
Firefox |
Edge |
Internet Explorer |
Opera |
Safari |
|---|---|---|---|---|---|---|
|
Basic Support |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
|
Feature |
Android |
Chrome for Android |
Edge mobile |
Firefox for Android |
IE mobile |
Opera Android |
iOS Safari |
|---|---|---|---|---|---|---|---|
|
Basic Support |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
(Yes) |
ETag
Last-Modified
If-Modified-Since
If-Unmodified-Since
If-Match
If-None-Match
206Partial Content
HTTP 条件请求