Cambridge O Level Computer Science · Syllabus 2210 · The Internet and its Uses
Persistent Cookie
What is Persistent Cookie?
A persistent cookie is a cookie stored on the user's device with an expiry date, remaining until that date is reached or the user deletes it, so it is returned to the site on future visits; it is used for saving personal details, storing login details and tracking user preferences.
This definition is part of the The Internet and its Uses chapter in Cambridge O Level Computer Science.
Persistent Cookie in context
A cookie is a small piece of data that a website sends to the browser, which the browser stores and then sends back to that same website on later requests. Cookies let a site recognise the same browser again, which is how it can keep a user logged in, remember a shopping cart, save personal details, and store preferences. A session cookie is normally kept only until the browsing session ends; a persistent cookie is stored on the device until its expiry date is reached or the user deletes it. A cookie is data, not a program — it cannot run and it is not a virus — but because it can carry an identifier that follows a user around, it raises real privacy concerns.
Common mistakes with Persistent Cookie
- M10 — "Cookies are programs, or viruses, and they infect your computer." Why it is wrong A cookie is a small piece of data stored by the browser and returned to the site that set it. It cannot execute, replicate or damage anything. The genuine concern is privacy: a persistent identifier can be used to build a picture of browsing behaviour. Say instead "Cookies are data, not programs, so they are not malware — but persistent cookies can be used to track a user across visits."
Questions students ask about Persistent Cookie
What is the difference between a session cookie and a persistent cookie?
A session cookie has no expiry date set and is normally held only while the browsing session lasts, being deleted when the browser or session closes; it is used for tasks such as keeping a user logged in or holding items in a shopping cart during one visit. A persistent cookie is stored on the device with an expiry date and remains until that date is reached or the user deletes it, so it is returned to the site on future visits, which is how sites remember saved details or preferences.

