What Is an HTTP Range Request? How Byte-Range Fetching Enables Video Streaming
Understand the mechanics of HTTP byte-range requests. Learn how RFC 9110 Range headers power video scrubbing, chunked audio streaming, and resumable downloads.

When you click on the progress bar of a two-hour 4K online video to jump directly to minute 45, you do not expect to wait half an hour for the first 44 minutes of video data to download sequentially. Within milliseconds, the player jumps to the new scene and resumes crisp playback as if the entire movie had already been stored locally on your hard drive.
Similarly, when a multi-gigabyte file download experiences a momentary network drop, modern browsers and download managers do not restart the transfer from byte zero; they pick up smoothly from the exact point of interruption.
Both of these indispensable modern computing capabilities rely on a deceptively simple, highly powerful mechanism built directly into the Hypertext Transfer Protocol: HTTP Range Requests (formally standardized in IETF RFC 9110).
Without HTTP Range requests, modern on-demand video streaming, podcast scrub bars, PDF page-by-page previews, and resumable data transfers simply could not exist. This technical deep-dive examines how HTTP byte-range requests function, the exact request and response headers that power them, how modern media players utilize them for instant seeking, and how cloud storage backends implement them securely.
The Problem with Monolithic HTTP Transfers
To appreciate why Range requests are revolutionary, consider how traditional HTTP transfers operate.
In standard HTTP communication, a client requests a resource using a basic GET request:
GET /movies/feature-film.mp4 HTTP/1.1
Host: cdn.example.com
In response, the web server returns an HTTP/1.1 200 OK status code along with the Content-Length header indicating the total file size (e.g., 4,000,000,000 bytes for a 4 GB video). The server then immediately begins streaming the entire binary file over the TCP socket from the first byte to the last byte.
[Client] ─────── GET /movies/feature-film.mp4 ───────► [Server]
[Client] ◄────── 200 OK (Transmitting Bytes 0 to 4 GB) ── [Server]
This all-or-nothing approach introduces massive engineering inefficiencies:
- Wasted Bandwidth: If a user only wants to preview the first 30 seconds of a 4 GB video before closing the tab, transmitting the entire 4 GB wastes cloud egress bandwidth and mobile data allotments.
- Inability to Seek / Scrub: If the user drags the player slider to the middle of the movie, the browser cannot skip ahead. It must patiently download and discard every single preceding byte before reaching the requested frame.
- Fragile Large Downloads: If a 10 GB file download drops at 99% due to a momentary Wi-Fi disconnect, the client has no way to request only the missing 1% under a standard
200 OKtransfer. The entire file must be downloaded from the start.
How HTTP Range Requests Solve the Problem
HTTP Range requests transform file transfers from rigid monolithic pipelines into flexible, random-access data blocks. Instead of demanding an entire file, a client can ask the server for arbitrary slices—defined by exact byte boundaries.
[Client] ─── GET (Range: bytes=10485760-20971519) ───► [Server]
[Client] ◄── 206 Partial Content (Returns exactly 10 MB) ── [Server]
The Initial Handshake: Accept-Ranges
Before a client attempts to request a specific byte slice, it must verify whether the remote web server supports range requests.
When a client first requests metadata or the beginning of a file, the server includes an announcement header:
Accept-Ranges: bytes
This header signals to the browser: "This server supports byte-level slicing. You may request specific byte segments at any time." If a server returns Accept-Ranges: none, the client knows that range requests are unsupported and that files must be fetched in their entirety.
The Protocol in Action: Headers and Status Codes
Let us examine the exact wire-level protocol headers exchanged during an HTTP Range transaction.
1. The Client's Range Request Header
To fetch a specific segment, the client includes the Range header in its standard GET request. The HTTP specification provides versatile syntax for specifying byte ranges:
- Specific Byte Range:
Requests the first 1 Megabyte of data (bytes 0 through 1,048,575 inclusive).Range: bytes=0-1048575 - Open-Ended Range (From Offset to End of File):
Requests all data starting from byte 52,428,800 to the very end of the file. This is the exact syntax used by download managers resuming an interrupted transfer.Range: bytes=52428800- - Suffix Range (The Final N Bytes of a File):
Requests the final 1 Megabyte of the file. This is particularly valuable for container formats like MP4, where the crucial index metadata (theRange: bytes=-1048576moovatom) is often located at the very end of the file.
2. The Server's 206 Partial Content Response
When a server successfully processes a valid Range request, it does not respond with 200 OK. Instead, it returns an HTTP/1.1 206 Partial Content status code.
Along with the status code, the server must supply the Content-Range response header, which details exactly which byte slice is being transmitted and the total size of the parent resource:
HTTP/1.1 206 Partial Content
Date: Wed, 14 May 2025 12:00:00 GMT
Server: CloudStorageEngine/2.4
Content-Type: video/mp4
Content-Length: 1048576
Content-Range: bytes 0-1048575/4194304000
Accept-Ranges: bytes
ETag: "68b329da9893e34099c7d8ad5cb9c940"
Cache-Control: public, max-age=86400
[Binary Payload: Exactly 1,048,576 Bytes of Video Data]
Notice the structure of Content-Range: bytes 0-1048575/4194304000:
0-1048575: Specifies the exact start and end byte offsets contained in the immediate response payload.4194304000: Indicates the complete, total byte size of the entire video file on the server.
3. Handling Out-of-Bounds Requests: 416 Range Not Satisfiable
If a client requests a byte range that falls outside the boundaries of the file (for example, requesting bytes 5000000-6000000 on a file that is only 2000000 bytes long), the server rejects the request with an HTTP/1.1 416 Range Not Satisfiable status code.
The server's response includes an asterisk in the byte range field, communicating the true file boundary:
HTTP/1.1 416 Range Not Satisfiable
Content-Range: bytes */2000000
How HTML5 Video Players Use Range Requests for Scrubbing
Modern web video players (powered by the HTML <video> element) utilize HTTP Range requests continuously to create a seamless, fluid playback experience.
Parsing the Container Index (moov Atom)
When you load an MP4 video in a browser, the video engine cannot decode picture frames immediately. It must first read the file's index table—known in MPEG-4 specifications as the moov atom.
The moov atom contains the blueprint of the video:
- Codec specifications (e.g., AVC/H.264 or HEVC/H.265)
- Video dimensions and frame rate
- Audio sample rate and channel layout
- A precise time-to-sample index mapping every video frame to its exact byte offset in the file
If the video file was properly optimized for web streaming, the moov atom is positioned at byte zero (at the start of the file). The browser issues a Range request for the first few hundred kilobytes:
Range: bytes=0-327679
Once the player parses the moov atom, it knows the exact byte location of every single second of the entire movie.
What Happens When You Scrub the Timeline?
When a user clicks on the timeline to jump from minute 5 to minute 50:
- Calculate the Timestamp: The player calculates the target time (e.g., 50 × 60 = 3000 seconds).
- Lookup the Byte Offset: Consulting its internal
moovatom sample table, the player looks up which keyframe (I-frame / IDR frame) corresponds to second 3,000. The table indicates that this keyframe begins at byte offset1,250,400,000. - Abort Pending Buffers: The player immediately cancels any ongoing HTTP connections fetching data for minute 5.
- Issue New Range Request: The player fires a new HTTP Range request directly targeting the desired scene:
GET /video.mp4 HTTP/1.1 Range: bytes=1250400000-1252497151 - Instantaneous Playback: The server responds with
206 Partial Content. The browser receives the targeted 2 MB segment, decodes the keyframe, paints it to the screen, and resumes playback in a fraction of a second.
Multi-Range Requests: Fetching Multiple Slices at Once
The HTTP specification also allows a client to request multiple disparate byte ranges in a single HTTP request using a comma-separated list:
GET /document.pdf HTTP/1.1
Host: example.com
Range: bytes=0-1024, 20480-21504
When a server supports multipart ranges, it responds with a special MIME type:
HTTP/1.1 206 Partial Content
Content-Type: multipart/byteranges; boundary=3d92f57db13fed04
The response body contains multiple distinct parts separated by the designated boundary string, each containing its own Content-Type and Content-Range headers. This capability is widely used by high-performance cloud PDF viewers, which fetch the document index table, table of contents, and a specific page simultaneously without loading the entire multi-hundred-megabyte document into browser memory.
Ensuring Cache Integrity: If-Range and ETags
A critical technical challenge arises when a client attempts to resume an interrupted download or fetch subsequent video slices over an extended period: What happens if the file on the remote server changes between requests?
If a server administrator updates or replaces the video file while you are halfway through downloading it, continuing to fetch subsequent byte ranges from the new file and stitching them onto the old file fragments would produce a corrupted, unplayable hybrid file.
To prevent this data corruption, HTTP incorporates conditional Range requests using the If-Range header paired with an Entity Tag (ETag) or timestamp:
GET /archive.iso HTTP/1.1
Range: bytes=524288000-
If-Range: "68b329da9893e34099c7d8ad5cb9c940"
The server evaluates the If-Range validator:
- If the ETag matches: The file is identical. The server returns
206 Partial Contentand delivers the requested byte slice starting at byte 524,288,000. - If the ETag has changed: The file was modified. Rather than returning mismatched bytes, the server intelligently falls back to an
HTTP/1.1 200 OKresponse and transmits the entirely new file from byte zero.
Summary Checklist: The Impact of HTTP Range Requests
HTTP Range requests are one of the quietest yet most vital architectural pillars of the modern web:
- Standardized under RFC 9110: Defines standardized byte-level slicing for HTTP/1.1, HTTP/2, and HTTP/3.
- Status Code 206 Partial Content: Accompanied by the
Content-Rangeheader indicating exact delivered offsets and total file size. - Enables instant video scrub: Media players calculate byte offsets from the
moovatom and jump instantly to any chapter or scene. - Powers resilient downloads: Download managers resume dropped connections without starting from zero, saving gigabytes of wasted bandwidth.
- Guarantees data integrity: The
If-Rangeheader prevents corrupted file stitching if remote resources change mid-transfer.
Understanding how byte-range fetching operates provides essential insight into the mechanics of streaming media, cloud storage synchronization, and resilient network engineering.