Client and server

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Client and server

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which device usually acts as the client when you visit a website?
A Your browser on your tablet
B The computer that stores the website
2. What does a web server do?
A Stores web pages and sends them back when asked
B Types web addresses for you
3. Which comes first in the client-server process?
A The server sends a response
B The client sends a request
4. Which one is a response?
A The web page data sent back to your browser
B Typing a web address into your browser
5. Which sentence is correct?
A A server requests data and a client stores it
B A client requests data and a server sends it back

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1client-server AThe browser (client) asks a web server for a web page
2request -> server BA client asks for data and a server stores it and sends it back
3A browser is the client because it asks for a web page CThe roles are mixed up. The client (browser) sends the request and the web server only sends a response.
4A web server stores the page and sends back a response DThe roles are swapped. The server stores the website data and the browser (client) is the one that asks for it.
5web server sends a request to the browser first Eresponse <- web server
6browser stores the website and the server asks for it Fclient = browser

Definitions

client-server

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
______ -> request -> server
2.
client -> request -> ______
3.
client <- ________ <- server
4.
browser sends a _______ to a web server
5.
client = _______ server = web server browser -> request -> server

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A client = browser
B server = web server
C server sends request to client
D server sends back response
Question 2
A request = 'GET /index.html'
B send(request, web_server)
C page = find(request)
D send(request, browser)
Question 3
A 1. Type a web address
B 2. Browser sends a request
C 3. Web server finds the page
D 4. Browser sends the response
Question 4
A client = 'browser'
B server = 'asks for web pages'
C client.request('home page')
Question 5
A client = web server
B request = 'give me the page'
C response = server(request)

Answer Key

Client and server
Section A: Quick Questions
Q1
A — Your browser on your tablet
Q2
A — Stores web pages and sends them back when asked
Q3
B — The client sends a request
Q4
A — The web page data sent back to your browser
Q5
B — A client requests data and a server sends it back
Section B: Match the Pairs
Q1
client-server → A client asks for data and a server stores it and sends it back
Q2
request -> server → The browser (client) asks a web server for a web page
Q3
A browser is the client because it asks for a web page → client = browser
Q4
A web server stores the page and sends back a response → response <- web server
Q5
web server sends a request to the browser first → The roles are mixed up. The client (browser) sends the request and the web server only sends a response.
Q6
browser stores the website and the server asks for it → The roles are swapped. The server stores the website data and the browser (client) is the one that asks for it.
Section C: Definitions
Q1
client-server — A client, like your browser, sends a request for data and a server stores that data and sends a response back.
Section D: Fill in the Blanks
Q1
client -> request -> server
Q2
client -> request -> server
Q3
client <- response <- server
Q4
browser sends a request to a web server
Q5
client = browser server = web server browser -> request -> server
Section E: Spot the Error
Q1
C — The client (the browser) sends the request to the server, not the other way round. It should be: client sends request to server.
Q2
D — The server sends the page (the response) back to the browser. It should be: send(page, browser).
Q3
D — The server sends the response. The browser is the client and sends the request. It should be: 4. Server sends a response.
Q4
B — A server stores data and sends it back. It does not ask for pages. It should be: server = 'stores web pages'.
Q5
A — The browser is the client. The web server is the server. It should be: client = browser.