Grade 10 Computer Science — Asking and answering over the web
Say what travels out in a request and what comes back in the answer, read the data an address carries, and follow what a browser does with the number it is answered with.
Name: ________________________
1.Match each status number to what the answer carrying it is saying.
- 200
- 404
- 301
- 500
- 403
- Something went wrong at this end while I was answering
- Here is what you asked for
- There is nothing here by that name
- It has moved — ask again at this other address
- It is here, but you are not allowed to see it
2.A browser asks for a page and the answer that comes back is 500. Whose end has the problem?
- a) The reader's own connection
- b) The browser that asked
- c) The machine holding the page
- d) Nobody's — 500 means the page is there but empty
3.A form sends three answers as part of the address. One more box is then added to the form and filled in as well. How many ampersands does the address carry now?
4.An address ends with the piece shown below. How many name-and-value pairs is it carrying?
?topic=lists&sort=new&page=3
5.Every answer that comes back over the web starts with a number. What is that number for?
- a) It is the position of the page on the machine holding it
- b) It says how many files were sent back
- c) It says how the request went — whether it worked, and if not, what sort of thing went wrong
- d) It is the size of what came back
6.A form's answers are sent as part of the address, so that they are still visible in the address bar once the page has loaded. Which of these is true of sending them that way?
- a) The address bar is emptied as soon as the answers arrive
- b) Anybody who can see the address can read the answers, and the address can be saved or passed on exactly as it is
- c) The answers are hidden, because an address is not stored anywhere
- d) Only numbers can be sent that way, and words have to be sent another way
7.Sort each of these by whether it travels out in the request or comes back in the answer.
Groups: Goes out in the request · Comes back in the answer
- The path of the page being asked for
- The name-and-value pairs after the question mark
- The HTML of the page
- The word GET or POST
- The new address a moved page has gone to
- The status number
8.A browser asks for an address and is answered 301. It asks again at the address it was pointed to, and is answered 200. How many requests did the browser send altogether?
Answer key — Grade 10 Computer Science — Asking and answering over the web
- 1. 200 → Here is what you asked for; 404 → There is nothing here by that name; 301 → It has moved — ask again at this other address; 500 → Something went wrong at this end while I was answering; 403 → It is here, but you are not allowed to see it
- 2. c) The machine holding the page
- 3. 3
- 4. 3
- 5. c) It says how the request went — whether it worked, and if not, what sort of thing went wrong
- 6. b) Anybody who can see the address can read the answers, and the address can be saved or passed on exactly as it is
- 7. The path of the page being asked for → Goes out in the request; The status number → Comes back in the answer; The name-and-value pairs after the question mark → Goes out in the request; The HTML of the page → Comes back in the answer; The word GET or POST → Goes out in the request; The new address a moved page has gone to → Comes back in the answer
- 8. 2