How the web works
How names become addresses, what an HTTP request looks like, sending requests and reading JSON, encoding and hashing, timestamps, HTTPS, what browsers add, and cross-site scripting.
Start with How names become addresses: DNS
- How names become addresses: DNSLearn how DNS turns names into IPv4 and IPv6 addresses, how resolvers and caches find and keep answers, which record types matter, and how to look names up with dig.
- Connections, ports and speaking HTTP by handSee how an address and a port reach a service, open TCP connections, and type HTTP requests yourself with nc and openssl to read exactly what a server sends back.
- Sending requests with curlRead every part of a URL, then build curl commands that choose a method, add headers, send JSON bodies and credentials, show the whole exchange, read status codes, fail clearly in scripts and probe redirects.
- Reading JSON from APIs with jqRead the JSON that APIs send back: its kinds of value, pretty printing with jq, picking out and filtering values, and passing shell values in safely.
- Encoding and hashingHow text becomes bytes, how hex, base64, base64url and percent-encoding write those bytes, how SHA-256 turns any input into a fixed-size digest, and what a digest does and does not prove.
- Time and timestampsRead Unix time, time zone names and ISO 8601, convert between them with GNU and BSD date, do arithmetic on timestamps, and see why clock skew and unit mistakes break expiry checks.
- HTTPS and certificates in practiceSee what TLS adds to HTTP, watch a handshake with curl, read a server certificate and its chain with openssl, and understand the checks that make verification fail.
- What browsers add: same-origin, CORS and cookiesLearn what an origin is, what the same-origin policy blocks, how CORS and preflight requests relax it, how cookie attributes, prefixes and third-party cookie rules work, which headers tighten the browser, and how to see all of it with browser developer tools and curl.
- Cross-site scripting and where tokens liveSee how cross-site scripting puts someone else's code inside a page, what that code can reach, how each place a browser application keeps tokens changes the damage, and how pages keep scripts out.