Web Server
🎬 This chapter has a 12:38 video: Web Services →On result day, lakhs of students open the CBSE results page within minutes. The page is not on any of their phones. It is on a few computers somewhere, answering every one of them.
1What a web server is
The word is used for two things that go together:
- the computer (hardware) that stores the website’s files — HTML pages, pictures, style sheets — and is connected to the Internet;
- the program (software) running on it that understands requests from browsers and answers them.
Play the story, or step through it. Drag sideways to turn.
When a browser asks for a page, the web server accepts the HTTP request, finds the page and sends it back in an HTTP response. If there is no such page, it sends an error page: 404 – Page Not Found.
Think of a canteen counter
2Web server vs web browser
| Web browser | Web server | |
|---|---|---|
| Job | Requests web pages and displays them | Stores web pages and delivers them |
| Role in HTTP | Client — sends the request | Server — sends the response |
| Where it runs | On your phone or computer | On a computer connected to the Internet, often in a data centre |
| How many | One user | Many browsers at the same time |
| Examples | Chrome, Firefox, Edge | Apache, Nginx (server programs) |
3From the board papers
▶Show the answer
A web server stores and delivers web pages to users over the Internet. A web browser requests and displays these web pages on the user’s device. — CBSE’s marking scheme answer.
▶Show the answer
A web server is a computer (with server software) that stores the contents of websites and delivers web pages to web browsers when they request them over the Internet.
4Check yourself
Three browsers in different cities ask for the same page at the same moment. What does the web server do?
Who sends '404 Not Found'?