1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Headers

  1. Accept-Ranges
    1. Writing requests (clients)
    2. Reading requests (servers)
    3. Overview table
    4. Syntax
    5. Examples
    6. Implementations
      1. Node.js
    7. History

Accept-Ranges

The Accept-Ranges header indicates that the resource supports Range requests; the values specify which range units are supported when making a Range request.

The special value none indicates the resource does not support Range requests.

Writing requests (clients)

Clients use the Accept-Ranges header to indicate the media type responses the user is capable of reading, and order of preference. This should be configurable by the user, either directly, or read from a system setting; if no preference is known, it is better to omit this header.

Reading requests (servers)

Overview table

Name
Accept-Ranges
Description
Indicates that the resource supports Range requests.
Direction
Response
Specification
RFC 9110: HTTP Semantics §14.3. Accept-Ranges

Syntax

Accept-Ranges     = acceptable-ranges
acceptable-ranges = 1#range-unit / "none"

Examples

Accept-Ranges: da, en-gb;q=0.8, en;q=0.7

Implementations

Node.js

  • accept
  • negotiator

History

  1. 1999-06: RFC 2616 §14.5. Accept-Ranges
  2. 2014-06: RFC 7233: Hypertext Transfer Protocol (HTTP/1.1): Range Requests §2.3. Accept-Ranges
  3. 2022-06: RFC 9110 §14.3. Accept-Ranges