What is the Accept-Ranges header?
The Accept-Ranges response header tells the client whether the server supports partial requests for a resource, and which unit those ranges are measured in. The value bytes signals support, while none explicitly indicates that ranges are not supported.
API Usage & Best Practices
- Enables resumable transfers: When a client sees
Accept-Ranges: bytes, it knows it can safely send aRangeheader to resume a download or stream a portion of the resource. - Be explicit about no support: Returning
Accept-Ranges: nonediscourages clients from attempting range requests that the server would only answer with the full body.
Examples
HTTP/1.1 200 OKContent-Length: 146515Accept-Ranges: bytes