If-Range header


目录

The HTTP If-Range request header makes a range request conditional. If the condition is fulfilled, a range request is issued, and the server sends back a 206 Partial Content response with part (or parts) of the resource in the body. If the condition is not fulfilled, the full resource is sent back with a 200 OK status.

This header can be used either with the Last-Modified validator or with ETag, but not with both.

The most common use case is to resume a download with guarantees that the resource on the server has not been modified since the last part has been received by the client.

Header type [Request header](https://developer.mozilla.org/en-US/docs/Glossary/Request%20header)
[Forbidden request header](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden%20request%20header) No

Syntax

If-Range: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
If-Range: <etag>

Directives

Examples

If-Range: Wed, 21 Oct 2015 07:28:00 GMT

If-Range: "67ab43"

Specifications

Browser compatibility

See also


版本号 #3
由 壳壳虫 创建于 2026-10-31 03:27:53 UTC
由 cocobook-sync 更新于 2026-11-04 17:35:48 UTC