The language browsers and servers use to talk, and how HTTPS keeps it secret.
HTTP is the language a browser and a web server use to talk. The browser sends a request, the server sends back a response.
HTTP (HyperText Transfer Protocol) is a set of rules for asking for things on the web and answering. It works on a request and response pattern. The client always starts.
| Method | Meaning | Safe? | Idempotent? |
|---|---|---|---|
| GET | Read something | Yes | Yes |
| POST | Create something or run an action | No | No |
| PUT | Replace something fully | No | Yes |
| PATCH | Change part of something | No | Not guaranteed |
| DELETE | Remove something | No | Yes |
| HEAD | Like GET, but headers only | Yes | Yes |
| OPTIONS | Ask what is allowed (used by browser CORS checks) | Yes | Yes |
HTTPS uses TLS (the newer name for SSL). TLS gives three things:
Simplified. In real TLS 1.3 the handshake takes one round trip and most of it is already encrypted.
GET /api/products/42 HTTP/1.1 Host: shop.com Accept: application/json Authorization: Bearer <token>
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: max-age=60
{ "id": 42, "name": "Tea cup", "price": 120 }| Header | What it does |
|---|---|
| Host | Which website you want (many sites share one IP) |
| Content-Type | What kind of data is in the body (for example application/json) |
| Authorization | Proves who you are (token or key) |
| Cookie / Set-Cookie | Lets the server remember you across requests |
| Cache-Control | How long a copy may be reused |
| Location | Where to go next on a redirect |
| Strict-Transport-Security (HSTS) | Tells the browser to always use HTTPS for this site |
| Term | Meaning in easy words |
|---|---|
| Client / Server | The one that asks, and the one that answers |
| URL | The full address of a thing, for example https://shop.com/cart?id=5 |
| Request / Response | One message to ask, one message to answer |
| Header | Extra information sent with a message |
| Body | The main content (page, JSON, image) |
| Status code | A 3-digit number telling the result |
| Stateless | The server keeps no memory between requests. Cookies or tokens carry the identity |
| Cookie | A small piece of data the browser stores and sends back with each request |
| TLS | The protocol that encrypts HTTPS traffic (the new name for SSL) |
| Certificate | A signed ID card for a website |
| CA (Certificate Authority) | A trusted company that signs certificates |
| TLS termination | Ending the HTTPS tunnel at a load balancer or proxy |
| Keep-alive | Reusing one connection for many requests |
| HSTS | A header that forces browsers to use HTTPS |
| Choice | We gain | We lose |
|---|---|---|
| HTTPS everywhere | Security and trust | Small extra time and CPU (usually tiny today) |
| Keep-alive connections | No repeated handshakes | Server holds idle connections |
| Stateless HTTP | Easy to scale: any server can answer | Need cookies or tokens to know the user |
| Caching responses | Fast pages, less load | Users may see old data |
| HTTP/3 | Faster on bad networks | Some networks block UDP |