Computer Network & Network Security System — Application Layer, NEC licence examination syllabus (Nepal Engineering Council).
Every single webpage load is a tiny conversation, following a very specific script.
HTTP (HyperText Transfer Protocol) is a request-response protocol: your browser sends a request, the server sends back a response.
GETRetrieve data (loading a page, an image).
POSTSend data to the server (submitting a form, uploading a photo).
PUT / DELETEUpdate or remove a resource on the server.
Non-persistentA new TCP connection is opened and closed for EVERY single object on a page (each image, each stylesheet) — old HTTP/1.0 behaviour, wasteful.
PersistentOne TCP connection stays open and is reused for multiple requests — the modern default (HTTP/1.1+), much faster.
Cookies let a stateless protocol (HTTP has no built-in memory of previous requests) fake having memory — the server sends a small piece of data the browser stores and sends back on future requests, which is how a website "remembers" you're logged in.
HTTPS is just HTTP wrapped in TLS/SSL encryption — the padlock icon you see in your browser's address bar every single time you're on a secure site.
HTTP is stateless: each request is independent and the server remembers nothing about previous ones. Two requests from the same browser, seconds apart, are as unrelated as requests from opposite sides of the world.
That looks like a defect and was a deliberate choice. A stateless server need keep no per-client memory, so it can serve enormous numbers of clients and any server in a group can answer any request. It is what makes the web scale.1xxInformational — the request was received and processing continues.
2xxSuccess — 200 OK, 201 Created.
3xxRedirection — the resource is elsewhere; 301 permanently, 302 temporarily.
4xxClient error — the request was wrong. 404 not found, 403 forbidden.
5xxServer error — the request was fine and the server failed. 500 internal error, 503 unavailable.
GET is safeIt should only read, never change anything. So it can be cached, bookmarked, prefetched and retried freely.
POST is notIt may change server state, so browsers warn before resubmitting it and it is never cached.
VisibilityGET parameters sit in the URL — logged, stored in history, visible in the address bar. POST data is in the body.
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Loading…