HTTP Range Request

What Is an HTTP Range Request?

An HTTP range request asks a server to return a specific portion of a resource. Instead of downloading an entire file, a client can request the bytes it needs for a particular operation.

This mechanism supports resumable downloads, video scrubbing, video seeking, and selective access to large files. A media player, for example, can request data associated with a later playback position without first downloading everything that comes before it.

For image and video applications, range requests provide control over which data crosses the network. Their usefulness depends on support across the client, server, and any intermediaries involved in delivery.

How an HTTP Range Request Works

Requesting a Byte Range

A client includes a Range header in an HTTP GET request. Byte positions start at zero, and both endpoints are inclusive.

For example, this request asks for 4,096 bytes from a video file:

GET /media/installation.mp4 HTTP/1.1
Host: media.example.com
Range: bytes=4096-8191 

Ranges can also be open-ended, such as bytes=4096-, or request a suffix, such as bytes=-4096 for the final 4,096 bytes.

Reading the Partial Response

When the server fulfills a single byte range, it returns 206 Partial Content and identifies the supplied portion through Content-Range.

An illustrative response would include:

HTTP/1.1 206 Partial Content
Content-Type: video/mp4
Content-Range: bytes 4096-8191/1200000
Content-Length: 4096 

Here, the response contains bytes 4,096 through 8,191 from a representation totaling 1,200,000 bytes. Content-Length describes the partial response body.

Multiple ranges can be requested together. When returned as separate parts, the response uses multipart/byteranges, with range information inside each part.

Key Responses and Support Signals

Clients should distinguish between these common outcomes:

Response status Meaning
206 Partial Content The server is supplying partial content
200 OK The server is returning the full representation
416 Range Not Satisfiable The requested ranges cannot be satisfied, such as when all requested positions fall beyond the resource

A server can advertise support through Accept-Ranges: bytes. However, the absence of that header does not prove that range requests are unsupported. Clients can attempt a range request without first receiving it.

Servers may also ignore the Range header, so applications must inspect the actual response before treating its body as a requested fragment.

QUICK TIPS
Tali Rosman
Cloudinary Logo

Here are some tips to better understand HTTP range request:

  1. Test the delivered URL
    Check range behavior through the same CDN and redirects used by your application.
  2. Inspect status codes
    Handle 200, 206, and 416 explicitly before writing downloaded data.
  3. Validate returned offsets
    Confirm that Content-Range matches where the fragment belongs.
  4. Track the asset version
    Use an appropriate validator when resuming a download.
  5. Avoid excessive fragmentation
    Choose useful request sizes and measure their effect on transfer performance.
Last updated: Nov 8, 2026
★★★★★
4.5 (28 reviews)
Talk to Sales Talk to Sales