AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Networks agree on rules

Week 22 · 3.2 Data transmission · 3 lessons
2

Asking and answering

Computing 9: Topic 3.2, pp. 273–283
GoalDescribe how a client and a server use HTTP, and explain how HTTPS protects the data that is sent.
New words
client · a device that asks a server for a service, such as a web pageserver · a computer that answers requests from clientsHTTP · the protocol used to request and send web pages and other filesHTTPS · the secure version of HTTP, which encrypts (scrambles) the data before it is sent
Explanation

Web pages are sent with a protocol called HTTP. When you type a web address into a browser, your device becomes a client and sends an HTTP request. A server answers with an HTTP response that holds the page, or an error message if the page cannot be found. This pattern is called client–server architecture. Plain HTTP sends text that anyone who intercepts it can read. HTTPS adds encryption: the data is scrambled before it is sent and can only be read with the right key. A secure address starts with https and the browser shows a padlock beside it. Never type a password or payment details on a page that does not use HTTPS, and ask an adult if you are unsure.

HTTPHTTPS
Address starts withhttp://https://
Data travels asplain textscrambled (encrypted) data
If someone intercepts itit can be readit cannot be read without the key
Padlock in the browsernoyes
Worked examples
clientserverrequestresponse
A request and a response. Lola opens a page of a village bakery at http://example.com/bread. Her laptop is the client and sends an HTTP request. The server at example.com sends back an HTTP response that holds the page: text, prices and pictures.
MessageFromToContent
HTTP requestRavi’s laptopserver‘Send me /tea-cakes.’
HTTP responseserverRavi’s laptoperror message: page not found
A page that is missing. Ravi types http://example.com/tea-cakes, but the bakery has no such page. The server still answers. This time the response is an error message instead of a page, and the browser shows it.
AddressStarts withData is encrypted?
http://example.com/loginhttpno, it is plain text
https://example.com/loginhttpsyes
http://example.net/shophttpno, it is plain text
Which address is encrypted? Three addresses are shown. Only the second starts with https, so only its data is scrambled. The padlock and the letter s appear together. HTTPS protects the data on its way; it does not prove that the website itself is honest, so an adult should still check a site you do not know.
Class activity

Client and server (no computer). One player is the server and holds five index cards, each with a page name such as ‘home’ or ‘menu’ and a few words of content on the back. The client writes a request on a slip of paper and hands it over. The server hands back the card, or a card that says ERROR: not found. Next round, the messenger who carries the cards between the two may read plain cards, but the server writes each answer in a scramble that only the client has the key to (for example, every letter moved on by two). What did the messenger see in each round?

Practice
1
A laptop, a phone and a tablet have all asked the same computer for a page. Name the role of the computer in the middle, and the role of each of the three devices.
?laptopphonetablet
2
A page asks for a password. Which of these addresses shows an encrypted connection? (a) http://example.net/join (b) https://example.net/join (c) http://example.org/join-s
3
What does the server send back when the page that was requested exists, and what does it send back when it does not exist?
4
A learner says: ‘HTTPS means the website is honest.’ Is the learner right? Explain.