HTTP is the set of rules your browser and a website use to talk. Every time you open a page, your browser sends an HTTP request, and the server sends back an HTTP response. That is the whole conversation behind the web.
The request and response
Think of it like ordering at a restaurant:
- Your browser is the customer who asks for something (the request).
- The server is the kitchen that sends back the dish (the response).
A request says things like “give me this page” using a method:
GET— please give me somethingPOST— here, take this dataPUT— update thisDELETE— remove this
Status codes
The response comes with a number that tells you how it went. You have surely met some of them:
200— all good301/302— moved, go here instead (this whole site uses these for old links)404— not found (the famous one)500— the server broke
A simple memory trick: 2xx is success, 3xx is “look elsewhere”, 4xx is your mistake, 5xx is the server’s mistake.
HTTP vs HTTPS
The extra S means secure. HTTPS encrypts the conversation so nobody in between can read it. Today every serious website uses HTTPS — if you see a site still on plain HTTP, be a little suspicious.
Why you should care
Once you understand requests and responses, the web stops feeling like magic. APIs, websites, and apps all run on this same simple back-and-forth. Speaking of which, see What is an API?.