HTTP
🎬 This chapter has a 10:53 video: Network Protocols →Every time you open a web page, two programs have a very short conversation. Your browser asks for the page. A computer somewhere else sends it. The rules for that conversation are called HTTP.
1What HTTP is
Two words from the next chapter, Web Services, in one line each:
- A web browser (Chrome, Firefox, Edge) is the program you use to open web pages. It is the client — the one that asks.
- A web server is a computer that stores web pages and sends them to browsers. It is the server — the one that answers.
Hypertext is text with links in it: click one, and you go to another page. HTTP is the protocol that transfers those pages.
Choose a page, then play the story or go one step at a time. Drag sideways to turn.
2Request and response
Every page you open is at least one request and one response:
- You type an address, such as
http://www.ncert.nic.in, or click a link. - The browser sends an HTTP request to the web server where that site is kept.
- The web server finds the page and sends an HTTP response containing it.
- The browser shows the page.
Every response starts with a short status. 200 OK means “here is your page”. 404 Not Found means the server is working but has no page at that address — which is why a mistyped link gives you a 404 page.
Think of a library counter
http//www.ncert.nic.in. The colon is missing: it is http://www.ncert.nic.in.HTTP only decides what the browser and server say to each other. Getting the request and the page across the Internet, in packets, is the job of TCP/IP — HTTP runs on top of it.
3From the board papers
▶Show the answer
(A) HTTP. FTP moves files, VoIP carries calls, and SMTP sends email.
▶Show the answer
HTTP — HyperText Transfer Protocol (or HTTPS, its secure form).
▶Show the answer
HyperText Transfer Protocol.
4Check yourself
In HTTP, which program sends the request?
A web server receives a request for a page it does not have. What does it do?