Year 11 Computing — 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.Put these addresses in order of how many name-and-value pairs each one carries, fewest first.
- /search?item=pen&size=large&count=4&page=2
- /s?a=1&b=2&c=3
- /find?q=pen
- /notices/exam/timetable?term=summer&stream=science
2.A form has four boxes. All four are filled in and sent as part of the address, on a path of /search. How many question marks does the address that goes out have in it?
3.Every answer that comes back over the web starts with a number. What is that number for?
- a) It says how the request went — whether it worked, and if not, what sort of thing went wrong
- b) It says how many files were sent back
- c) It is the position of the page on the machine holding it
- d) It is the size of what came back
4.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 status number
- The new address a moved page has gone to
- The path of the page being asked for
- The HTML of the page
- The word GET or POST
- The name-and-value pairs after the question mark
5.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) Only numbers can be sent that way, and words have to be sent another way
- b) The address bar is emptied as soon as the answers arrive
- c) The answers are hidden, because an address is not stored anywhere
- d) Anybody who can see the address can read the answers, and the address can be saved or passed on exactly as it is
6.A browser asks for a page and the answer that comes back is 500. Whose end has the problem?
- a) The machine holding the page
- b) The browser that asked
- c) The reader's own connection
- d) Nobody's — 500 means the page is there but empty
7.A browser sent ten requests for one page. Eight were answered 200, one was answered 301 and one was answered 404. The browser then follows the 301 and is answered 200. How many requests has it sent altogether by that point?
8.A browser asks for one HTML file and six pictures. Five of the seven answers come back 200, and the other two come back 404. How many pieces of the page are missing?
Answer key — Year 11 Computing — Asking and answering over the web
- 1. 1. /find?q=pen 2. /notices/exam/timetable?term=summer&stream=science 3. /s?a=1&b=2&c=3 4. /search?item=pen&size=large&count=4&page=2
- 2. 1
- 3. a) It says how the request went — whether it worked, and if not, what sort of thing went wrong
- 4. 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
- 5. d) Anybody who can see the address can read the answers, and the address can be saved or passed on exactly as it is
- 6. a) The machine holding the page
- 7. 11
- 8. 2