Unable to open this exercise
A browser retrieves web resources and presents them to the user. Its functions include interpreting HTML, applying CSS, running JavaScript, displaying pages, managing URLs/history/bookmarks and navigating between resources. A search engine is a service used to find resources; it is not the browser itself.
Cookies preserve state
A cookie is a small item of data a site asks the browser to store. The browser sends relevant cookies with later requests to that site. HTTP requests alone do not remember a shopping basket; a cookie can carry an identifier that lets the server look up the basket.
Worked example: a basket
A server gives the browser a basket identifier. The user adds a book. On the next request the browser sends the identifier, so the server retrieves that basket rather than treating the request as a new customer. The cookie need not contain the book list or the password.
Session cookies have no persistent expiry time: their lifetime depends on the browser session. Closing one tab does not normally delete them, and session restoration may preserve them across a restart. Persistent cookies have a specified lifetime and can remember a preference for later visits. This is a lifetime distinction, not a universal rule that one kind uses RAM and the other disk.
Cookies from another party can support tracking across sites that include that party's content. Preferences and sign-in convenience are benefits; unwanted tracking or a stolen session identifier are risks. Privacy settings and limiting third-party cookies can reduce tracking, sometimes at the cost of features. HTTPS protects cookies in transit but does not make a dishonest site trustworthy.
Independent explanation
A shared computer remembers the previous user's language and sign-in state. Explain the benefit and the privacy risk, and justify signing out rather than merely closing a tab.
Written practice and self-review
Web browsers allow websites to store HTTP cookies on a visitor's device.
- State two distinct legitimate benefits of using cookies on an online retail shopping website.
- Explain why privacy advocates raise concerns regarding the use of third-party tracking cookies, and describe how a user can protect their privacy.
Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Application: Shopping preferences
Application: Shopping preferences
- Remembering a chosen language between visits usually needs a session or persistent cookie? [Space 1]
- Must every cookie contain the full shopping basket: yes or no? [Space 2]
Interactive exercises for Module 2 and beyond require an active plan.