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: cart=pencil,ruler | AThe server tells the browser to store a cookie named cart that remembers the items the user added to their shopping cart. | |
| 2Set-Cookie: cart=book; Max-Age=604800 | BSet-Cookie: cart=shoes; Max-Age=86400 | |
| 3A session cookie suits one shopping visit because it is deleted when the browser is closed. | CA session cookie is the better choice for one visit, because it is deleted when the browser closes. A persistent cookie would leave the cart stored for the next person to see. | |
| 4A persistent cookie keeps a cart for later because it stays stored until its expiry date. | DA persistent shopping cart cookie that keeps the cart for 7 days, so the items are still there when the user returns later. | |
| 5Page 1: cart=hat. Page 2: no cookie sent, cart is empty | ESet-Cookie: cart=shoes | |
| 6A persistent cookie is used for a cart on a shared school computer to hold items for one visit | FThe browser did not send the cart cookie back to the server on page 2, so the server forgot the item. The cookie must be sent with each request so the cart survives moving between pages. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
shopping cart cookie — A cookie that remembers which items a user has added to an online shopping cart, so the cart is not emptied as they move between pages. It can last one visit or be kept for later.Set-Cookie: cart=item42Set-Cookie: cart=item42; Max-Age=604800GET /basket.html HTTP/1.1
Cookie: cart=item42Set-Cookie: cart=item42
# no Max-Age: a session cookieSet-Cookie: cart=item42; Max-Age=86400
# persistent: cart kept for later visits