Accept Ranges
The HTTP Accept-Ranges response header is used by the server to indicate its support for range requests. This feature allows clients to request specific parts or multiple parts of a resource rather than the entire resource at once.
The value of this header specifies the unit used to define a range, such as bytes or other measures.
For example, when a server responds with an Accept-Ranges header, it signifies that the server can resume an interrupted download, enabling clients to continue from where they left off instead of restarting the transfer from the beginning.
Note: Supporting range requests improves efficiency for large resource downloads and can be beneficial for media streaming services.
Syntax
Accept-Ranges: <range-unit>
Accept-Ranges: none
Directives
<range-unit>
The range unit that the server supports, although bytes is the only range unit formally defined by RFC 7233. Range units are registered in the HTTP Range Unit Registry.
none
No range unit is supported. This is equivalent to omitting the header and is, therefore, rarely used. This value was used in legacy browsers to disable or remove the pause buttons in the download manager if servers had no support for range requests.
Examples
Accept-Ranges: bytes
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Accept-Ranges header. This is especially useful for testing how your application handles range units the server supports for partial requests during development or debugging. Steps to Modify the Accept-Ranges Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Accept-Ranges.
- In the “Header Value” field, enter your desired value (e.g., bytes).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/\*).
- Save the rule.
Once set up, Requestly will inject the Accept-Ranges: bytes header into all matching requests, allowing you to test how clients handle range requests and resumable downloads against your server.
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →