ShareYourGroupShareYourGroupHTTP Codes and Headers

Conditional and range requests

Two kinds of request save bandwidth: "only if it changed" and "only this part".

Only if it changed

The first response carries an ETag. Later the browser asks again and quotes it in If-None-Match. If the label is still current, the server answers 304 and sends no body:

GET /etag HTTP/1.1
Host: example.com

HTTP/1.1 200 OK
Date: Sat, 14 Nov 2026 10:00:00 GMT
ETag: "v7"
Cache-Control: max-age=60
Content-Type: text/plain; charset=utf-8
Content-Length: 13

version seven

GET /etag HTTP/1.1
Host: example.com
If-None-Match: "v7"

HTTP/1.1 304 Not Modified
Date: Sat, 14 Nov 2026 10:00:00 GMT
ETag: "v7"
Cache-Control: max-age=60

Only this part

A server that supports ranges says Accept-Ranges: bytes. A client then asks for bytes 0 to 9 of a 104-byte file and gets 206 with exactly those ten bytes:

GET /range HTTP/1.1
Host: example.com
Range: bytes=0-9

HTTP/1.1 206 Partial Content
Date: Sat, 14 Nov 2026 10:00:00 GMT
Content-Type: text/plain
Accept-Ranges: bytes
Content-Range: bytes 0-9/104
Content-Length: 10

ABCDEFGHIJ

The Content-Range header says which bytes arrived (0-9) and the total size (104). This is how a video player jumps to the middle of a movie and how a download manager resumes after a break.

What goes wrong

Can I test this myself?

Yes: curl -i -H "Range: bytes=0-9" <address> shows the status line and headers, and curl -i -H 'If-None-Match: "label"' <address> tests the conditional request.

What is the difference between ETag and Last-Modified?

Both identify a version. ETag is exact and works even when the date does not change; Last-Modified is a time and is used with If-Modified-Since.

Sources

  • RFC 9110 sections 13 (conditional requests), 14 (range requests), 15.3.7 and 15.4.5

Read on 14 November 2026.

This is an independent guide. It is not connected with the IETF, IANA, any browser maker or any company named here. Meanings were checked against the RFC texts on 14 November 2026. Responses shown were recorded on 14 November 2026 from a small test server on the author's own computer.