Cookies
Computer Science: Cambridge International GCSE, topic 1.5.5
Cookies
A cookie is a small text file created by a website and stored on your computer or mobile device. It is a way for a website to remember information about users.

What are cookies?
- Cookies are small text files stored on a user’s computer by a website.
- They contain data about the user’s activity on that website.
- Each time the user visits the site, the cookie is sent back to the server.
- This allows websites to “remember” information about the user.

How cookies are used
- Cookies are used to make your browsing experience more convenient and personalised:
- Saving personal details:
- Websites use cookies to store information, such as your name, address, or postcode, so you don't have to type it each time.
- Tracking preferences:
- Cookies remember your language choice, theme preferences, or what you have previously searched for, to improve the website's functionality.

How cookies are used 2
- Holding items online:
- Cookies keep track of items you have added to your online shopping basket, even if you leave the website and return later.
- Storing login details:
- The "Remember me" function on a login page uses a cookie to store your details, so you can stay logged in or log in more quickly next time.

Types of cookies
- Session Cookies
- Temporary and are only active during a single browsing session
- Deleted automatically when a browser is closed
- Example: remembering what is in your shopping cart during one visit
- Persistent Cookies
- Stored on a device for longer (according to an expiration date set by the website)
- Remains even after a browser is closed
- Example: remembering login details or site preferences
Test yourself on Cookies
What is a cookie in computing?