The protocol underneath every webpage you've ever loaded.
Stateless by design
HTTP is a stateless protocol — by default, each request is independent and the server doesn't remember anything about previous requests from the same client. This is exactly why cookies exist: to layer state on top of a fundamentally stateless protocol.
HTTP Methods
| Method | Purpose |
|---|---|
GET | Retrieve a resource, no side effects |
POST | Create a new resource / submit data |
PUT | Replace a resource entirely |
PATCH | Partially update a resource |
DELETE | Remove a resource |
Status codes
| Range | Meaning |
|---|---|
1xx | Informational |
2xx | Success |
3xx | Redirection |
4xx | Client mistake (bad request, unauthorized, not found) |
5xx | Server error |
Request & Response headers
Both requests and responses carry metadata in headers — e.g. content type, content length, and Keep-Alive settings, which define a timeout for how long a TCP connection should stay open for reuse before being closed, avoiding the overhead of reconnecting for every single request.
Cookies
The first time you visit a site, the server sets the cookie in your browser.
On every subsequent visit, the browser automatically sends that cookie back, letting the server recognize you.
Cookies have an expiration date, after which they're discarded.
Third-party cookies — cookies set for domains other than the one you're actually visiting (commonly used for cross-site tracking/ads).