← IGCSE Computer Science Paper 1

Requesting a page from the web server

A message the browser sends to the web server's IP address asking for a page; the server replies with the page's HTML, or an error such as 404 if it does not exist.

Understanding Requesting a page from the web server in IGCSE Computer Science Paper 1

What it does: The request is sent to the web server at the IP address, and it names the page wanted (shop.html). 404 means the page was not found. A 200 code means the request succeeded.

Common mistakes: The browser sends the HTTP request to the web server's IP address, not to the html. The line should be SEND request TO ip. An HTTP request for a page uses the GET method. SEND is not an HTTP method. It should be request ← "GET /about.html".

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 477–489) and word search (Modules 464–489).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Once the browser has the IP address from the DNS, where does it send the HTTP request?
Back to the DNS serverTo the web server at that IP address
Matches
The server sends the request to the browser, and the browser replies with the HTML
↓
The roles are the wrong way round: the browser sends the HTTP request and the web server sends back the HTML.
Applying
Meanings
Term
HTTP request
Meaning
A message the browser sends to the web server's IP address asking for a page; the server replies with the page's HTML, or an error such as 404 if it does not exist.
Practice
GET /shop.html HTTP/1.1
Testing
Gaps
/index.html HTTP/1.1
Check Answer
Spots
2request ← "GET /index.html"
3SEND request TO html

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Golden Phoenix' badge — Savannah Legend, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Once the browser has the IP address from the DNS, where does it send the HTTP request?
A. To the web server at that IP address ✓
B. Back to the DNS server
The DNS only supplies the IP address. The browser then sends the HTTP request to the web server found at that address.
2. What does the HTTP request tell the web server?
A. Which colours the page should use
B. Which web page or file the browser wants ✓
The request names the page or file wanted, such as index.html. The server uses this to find the right file.
3. What does the web server send back when the requested page exists?
A. The HTML for the requested page ✓
B. The user's IP address and a cookie only
The server replies with the HTML of the page. The browser then renders this HTML so the user can see the page.
4. A browser requests shop.com/offers.html, but no file called offers.html exists on the server. What happens?
A. The server sends back the home page HTML instead
B. The server sends back an error such as 404 ✓
If the page does not exist, the server cannot send its HTML. It sends an error response, commonly 404 Not Found.
5. Which step happens first?
A. The browser gets the IP address, then sends the HTTP request ✓
B. The browser sends the HTTP request, then gets the IP address
The browser needs the IP address to know which web server to contact, so the DNS lookup comes before the HTTP request.

Match the Pairs

GET /index.html HTTP/1.1 → The browser asks the web server for the page called index.html
HTTP/1.1 200 OK → The server found the page and is sending its HTML back to the browser
After DNS gives the IP address, the browser sends its HTTP request to that address → GET /shop.html -> 93.184.216.34
If the requested page does not exist, the server sends back an error instead of HTML → HTTP/1.1 404 Not Found
The server sends the request to the browser, and the browser replies with the HTML → The roles are the wrong way round: the browser sends the HTTP request and the web server sends back the HTML.
GET /contact.html -> 404 OK: page found, HTML sent → 404 means an error because the page does not exist. A successful request returns 200 OK with the HTML.

Key Term

HTTP request
A message the browser sends to the web server's IP address asking for a page; the server replies with the page's HTML, or an error such as 404 if it does not exist.

Fill in the Blanks

1. GET /index.html HTTP/1.1
Hint: Type the HTTP method word the browser uses to ask the server for a page.
2. GET /index.html HTTP/1.1
Hint: Type the name of the protocol used to send the request to the web server.
3. HTTP/1.1 404 Not Found
Hint: Type the status code the server sends back when the requested page does not exist.
4. HTTP/1.1 200 OK Content-Type: text/html
Hint: Type the kind of content the server sends back for a web page.
5. // Request goes to the server's IP address GET /shop.html HTTP/1.1
Hint: Type the two-letter abbreviation for the address the browser gets from DNS and sends the request to.

Spot the Error

Question 1
A ip ← LOOKUP("www.shop.com")
B request ← "GET /index.html"
C SEND request TO html
D html ← RECEIVE()
Line C — The browser sends the HTTP request to the web server's IP address, not to the html. The line should be SEND request TO ip.
Question 2
A ip ← "93.184.216.34"
B request ← "SEND /about.html"
C SEND request TO ip
Line B — An HTTP request for a page uses the GET method. SEND is not an HTTP method. It should be request ← "GET /about.html".
Question 3
A HTTP/1.1 404 OK
B Content-Type: text/html
C <html><body>Hi</body></html>
Line A — When the server finds the page and sends the HTML back, the status is 200 OK. 404 means the page was not found. It should be HTTP/1.1 200 OK.
Question 4
A GET /missing.html HTTP/1.1
B HTTP/1.1 200 Not Found
C <h1>Page not found</h1>
Line B — If the requested page does not exist, the server replies with the error code 404, not 200. It should be HTTP/1.1 404 Not Found.
Question 5
A IF page EXISTS ON browser THEN
B SEND html TO browser
C ELSE SEND "404" TO browser
D ENDIF
Line A — The web server checks whether the requested page exists on the server, not on the browser. It should be IF page EXISTS ON server THEN.

Student with a class code? Join your class →