Cookie use: tracking user preferences
A cookie that records a user's preferences and browsing habits so a site can tailor what it shows, such as language, layout, suggested products or targeted adverts.
Understanding Cookie use: tracking user preferences in IGCSE Computer Science Paper 1
What it does: The cookie holds browsing habits, which the site uses to show recommended products. The cookie records an interest, so adverts can be matched to what the user likes. A cookie can store settings such as language, so the site shows French each time you return. Cookies record the kinds of pages you visit, and advertisers use this to show adverts matched to your interests. The browser stores a cookie holding the theme preference and sends it back to the site on the next visit. Preference cookies let a site adjust language, layout or suggestions. Encryption is done by HTTPS, not by cookies.
Common mistakes: The program should read the saved language preference from the cookie, so it must be cookie.language. A preference cookie does not hold a password. ENDIF here closes the IF too early, so the ELSE part has nothing to belong to. Line 4 should be ELSE to give the default light theme.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 490–499) and word search (Modules 490–509).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
preference cookieFill in the Blanks
Spot the Error
Student with a class code? Join your class →