Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
An online bookshop uses two cookies.
The browser sends the domain name to a domain name server (DNS). The DNS returns the IP address (asking another DNS if it does not know the name). The browser sends a request to the web server at that address, the server sends the page as HTML, and the browser renders it. A cookie is a small text file that a website stores on the device through the browser: a session cookie is deleted when the browser closes, a persistent cookie stays until its expiry date or until it is deleted.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
(a) Cookie A can be a session cookie: the basket is needed only during this visit, and the cookie goes when the browser closes. Cookie B must be a persistent cookie: it has to stay after the browser is closed, for two weeks.
(b) Cookie B stays on the library computer after the user leaves. The next person to open the bookshop could be logged in as that user. They could see the user's details or order books with the account. On a shared computer, the user should log out or delete the cookies.
(c) Cookies can store personal details and track which pages a user visits. Users have a right to choose whether that data is kept, so websites ask before they store cookies that are not needed for the site to work.
Remember. Cookies are small text files. They are not programs and cannot run, but the data in them can be personal.
Log in to join the discussion.
Loading…