Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, HTTP: Learn your browser's language!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript". get the zine!
read the transcript!

These are the most important request headers:

Host

The domain
The only required header.
Host: examplecat.com

User-Agent

name + version of your browser and OS
User-Agent: curl 7.0.2

Referer

(yes, it’s misspelled!)
website that linked or included the resource
Referer: http://examplecat.com

Authorization

eg a password or API token
base64 encoded user: password
Authorization: Basic YXZ

send cookies the server sent you earlier
keeps you logged in
Cookie: user=b0rk

Range

lets you continue downlats (“get bytes 100-200”)
Range: bytes=100-200

Cache-Control

“max-age=60” means cached responses must be less than 60 seconds old

If-Modified-Since

only send if resource was modified after this time
If-Modified-Since: Wed, 21 Oct...

If-None-Match

only send if the ETag doesn’t match those listed
If-None-Match: "e7ddac"

Accept

MIME type you want the response to be
Accept: image/png

Accept-Encoding

set this to “gzip” and you’ll probably get a compressed response"
Accept-Encoding: gzip

Accept-Language

set this to “fr-CA” and you might get a response in French
Accept-Languag: fr-CA

Content-Type

MIME type of request body, e.g. “application/json”

Content-Encoding

will be “gzip” if the request body is gzipped

Connection

“close” or “keep-alive”.
Whether to keep the TCP connection open