Accept-Ranges
The HTTP Accept-Ranges response header is sent by the server to indicate that it accepts requests for partial file downloads.
Usage
The HTTP Accept-Ranges response header is used by servers to indicate that they accept requests for partial resources, such as files that are available for download. A common use is the resumption of a previously interrupted file transfer. If part of the file had already been transferred before the connection had been interrupted, then clients can resume by specifying a range.
A range unit can be specified, however the only unit available is bytes
. If the none
directive is returned then range requests are not supported. Effectively, this is the same as omitting the HTTP header.
Example
In this example, the server responds to a previous HTTP request that was made by the client. As part of it, the HTTP Accept-Ranges response header is included to indicate that the function is supported.
Response
HTTP/1.1 200 OK
Accept-Ranges: bytes
Takeaway
The HTTP Accept-Ranges response header is sent by a server to inform clients that range requests are supported, which can be used to resume an interrupted file transfer.