Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Set-Cookie: name=Aisha; Max-Age=2592000 | AA session cookie is wrong for saving personal details, because it is deleted when the browser closes and the name is lost before the next visit. A persistent cookie is needed. | |
| 2<input type="text" name="address" autocomplete="street-address"> | BA form box the browser can autofill with a saved address from an earlier visit | |
| 3A site greets a returning visitor by name using personal details saved in a cookie | CSet-Cookie: address=12 Oak Road; Expires=Fri, 01 Jan 2027 00:00:00 GMT | |
| 4A persistent cookie suits saving personal details because it lasts after the browser is closed | DThe browser sends the cookie back to the web server, which reads the saved details to fill in forms or greet the user. The cookie does not replace the server. | |
| 5Set-Cookie: name=Aisha (session cookie, deleted when the browser closes) | ESaves the user's name in a persistent cookie for 30 days so the site can greet her on later visits | |
| 6The cookie stores the user's name, so the web server does not need to see it again | Fprint("Welcome back, " + cookie_name) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
cookie personal details — A cookie can save personal details like your name or address, so forms are autofilled and you are greeted by name on later visits. A persistent cookie suits this.Set-Cookie: name=Sam; Max-Age=2592000Set-Cookie: name=Sam; Max-Age=2592000IF savedName <> "" THEN
OUTPUT "Welcome back, " + savedName
ENDIFdocument.cookie = "name=Sam; max-age=86400";IF savedAddress <> "" THEN
addressBox ← savedAddress
ENDIF