What is HTTP?
Useful first: IP addresses · optional, not a requirement
Choose your depth
Stay with the essentials, or look closer.
YOUR GOALRecognize HTTP as the rules for exchanging web requests and responses.
Your browser asks. A server answers.
Ordering from a menu
Imagine asking for a sandwich at a cafe. You make a request, and the cafe responds. On the web, your browser asks a server for something, such as a page or a picture. The server sends a response.
HTTP stands for Hypertext Transfer Protocol. A protocol is a set of communication rules. HTTP gives browsers and servers a shared way to ask for things and explain what happened.
[1]GET /guideA request names the resource.200 OKThe response contains the page.The page exists, so this example responds with 200 OK. Try the missing picture to compare.
A teaching illustration. No request is sent to another website.
One page can involve several requests
A page can need separate requests for its text, pictures, and other parts. The browser puts the results together. The cafe comparison has limits: HTTP exchanges structured messages, not spoken orders.
[1]HTTP is how a browser and a server exchange requests and responses.
Loading one page always means receiving everything in one response.
A page can need several resources, fetched through separate requests.
Show the explanation
A request. The browser sends the request. The server answers with a response.
YOUR GOALIdentify the method, target, headers, body, and response status.
Read the request. Then read the result.
What travels in a message?
A request identifies a target, such as /topics/dns/, and a method describing the requested operation. Headers carry extra information. Some messages also have a body: the content being sent.
A response includes a status code, headers, and sometimes a body. For a successful page request, the body may contain HTML. A Content-Type header tells the browser the content's format. Not every response includes a body.
GET and POST do different jobs
GET asks to retrieve a representation of a resource: data that describes it, such as an article's HTML. POST sends content for the target to process, for example a submitted comment. A method describes the requested operation; it does not promise that the operation will succeed.
The status describes this request
200 OK: the request succeeded.301 Moved Permanently: the resource has a new permanent address.404 Not Found: the server did not find the requested resource.500 Internal Server Error: an unexpected server condition prevented completion.
A page can load while a separate image request gets a 404. Check which request produced the status before deciding what is broken.
[4]The request says what to do; the response status says how that request turned out.
A 404 means my device has no internet connection.
A 404 is an HTTP response about a requested resource. It is different from failing to receive any response.
Show the explanation
The page request succeeded, but the picture was not found. Each response describes its own request. One successful request does not guarantee that all the page's resources loaded.
YOUR GOALDistinguish safe from idempotent methods, and semantics from the protocol version.
Method semantics matter when requests repeat.
Safe describes the requested effect
A safe method does not request a state change. GET is safe by definition, even though a server can record an access log. An endpoint that deletes an article on GET violates those semantics.
Idempotent does not mean identical responses
An idempotent method has the same intended effect when an identical request is repeated as when it runs once. PUT and DELETE are idempotent; POST is not guaranteed to be.
Repeating a POST after losing its response could repeat the action. A client needs evidence that a retry is appropriate, not just an unanswered request.
[5]Versions change how messages travel
HTTP/2 uses binary frames and interleaves multiple streams on one TCP connection. Each stream carries its own exchange; the application still uses methods and status codes.
HTTP/3 carries HTTP over QUIC, which provides streams at the transport layer. A newer version changes the transport and message framing, not the meaning of GET or 404. It does not make a non-idempotent operation safe to repeat.
[6] [7]Before retrying, consider the operation's semantics; the HTTP version does not decide them.
Idempotent requests must return the same status and content every time.
Idempotence concerns the intended server effect, not identical responses.
Show the explanation
No. The resource can remain absent. Idempotence concerns repeated effects, not identical responses. DELETE changes state, so it is not safe.
Keep asking. Check the details.
Source-linked, AI-assisted draft. Human editorial review is still pending; this page is not presented as expert-reviewed.
- MDN — Overview of HTTP
- MDN — HTTP messages
- MDN — HTTP request methods
- MDN — HTTP response status codes
- RFC 9110 — HTTP semantics: safe and idempotent methods
- RFC 9113 — HTTP/2
- RFC 9114 — HTTP/3