COMPUTER ENGINEER

Jump to examples
Blog
HTTP / HTTPS / TLS6 min study
22/ 70

Messages, representations and files

Ranges and file downloads

Video and resumed downloads may use partial transfer.

UnderstandStudy an examplePractise

Understand the concept

Range asks for selected byte positions. A supporting server can return 206 and Content-Range; it can also ignore the range and return a full 200. Unsatisfiable ranges may return 416. Inclusive bytes 0–99 request one hundred bytes.

If-Range helps avoid combining parts from changed files. Excessive ranges need limits, and encoding affects the selected representation.

Content-Disposition can suggest inline display or attachment download, subject to browser capability and policy. Generate safe filenames rather than injecting raw user text into headers. Attachment conflicts with a view-only CV experience.

WHEN TO USE IT

Design CV, video and large-download flows.

COMMON PITFALL

Treating every 206 body as a complete file.

01 / PRACTICE

One topic. Three levels of depth.

HTTP / illustrative example
Range: bytes=0-99

A one-hundred-byte range.

This page does not send requests to external servers. Messages are readable HTTP/1.1 illustrations, not HTTP/2 or HTTP/3 wire dumps. example.test is reserved for examples. Run commands and JavaScript only in your own test environment; never publish real tokens or cookies.

02 / YOUR TURN

Try it yourself first.

Does bytes=0-99 request ninety-nine bytes?

Show the solution and explanation
Worked solution
99 - 0 + 1 = 100

No; inclusive endpoints mean one hundred bytes.