0984

World Wide Web

Internet and Its Uses · 4 question types

Exam Frequency Analysis

Past paper frequency (2018 to 2024)

This topic accounts for approximately 3% of your exam marks.

stable
Rare
Stable3%

The difference between the internet and the WWW, and cookie/browser functions, are typical questions.

A cookie is a small text file stored on the user's device by a website, used to remember information about the user across page loads and visits.

Cookies are set by the web server (sent in an HTTP response) and stored by the browser on the user's device. The browser sends them back with future requests to the same site, so the server can recognise the user.

What cookies typically hold:

  • Login state: which user is currently signed in.
  • Session data: items in a shopping cart, in-progress form data.
  • Preferences: language, dark mode, font size.
  • Tracking IDs: a unique identifier for analytics or advertising.

A cookie is a plain text file, not a program. Cookies cannot themselves run code or directly attack the user's computer. (Whether the information they carry is privacy-friendly is a separate question; see "Privacy concerns" below.)

Two types of cookie

Cookies come in two types: session and persistent cookies.

Session cookiePersistent cookie
Stored inRAM (the browser's memory)Hard disk / SSD (a file on the user's device)
LifespanLasts only while the browser is openHas an expiry date; can survive for days, weeks or years
DiscardedOnce the user closes the browserWhen the expiry date passes, or when the user clears them manually
Typical useKeeping the user logged in for one visit; remembering shopping-cart contents during the same browsing sessionRemembering login between visits ("remember me"); remembering preferences (e.g. language, theme); long-term analytics and advertising IDs
Exam tip

Session cookie vs persistent cookie (fill-in-the-blank / describe)

What comes up: A fill-in-the-blank passage worth several marks asking you to complete statements about the two types of cookie, using terms from a word list. Also appears as a "give examples of cookie uses" question (3 marks).

Write (key points): Cookies are small text files stored by a web browser. A session cookie is a temporary file — it is deleted when the web browser is closed. A persistent cookie is a permanent file — it is stored on the user's secondary storage device until it is manually deleted or it expires. Examples of cookie uses: storing login details, recording user preferences, holding items in a shopping cart, storing payment details.

Watch out: Do not say a session cookie is stored on the hard drive — it lives in memory (RAM) and is gone when the browser closes. "Permanent" and "persistent" are both accepted for the second type, but "temporary" and "session" are the credited terms for the first type.

Privacy concerns

Cookies started out as simple tools for site convenience. Over time, they became a major privacy issue:

  • Third-party tracking cookies: cookies set by advertising or analytics companies can be read on every site that includes their tracker (e.g. an ad network). This lets the third party build a profile of the user's browsing across many sites, even ones the user did not realise were linked.
  • Personal information storage: some cookies hold names, email addresses, login tokens or other personal data. If the device is shared or compromised, this data may be exposed.
  • Session hijacking: if an attacker can read a logged-in user's session cookie (e.g. on an unencrypted connection), they can pretend to be that user. This is one reason every login page should use rather than plain HTTP.
  • Lack of transparency: most users do not know exactly what each cookie stores or what the site does with the data.

Legal and technical responses

  • Browsers offer cookie controls: settings to block all cookies, third-party cookies, or specific sites.
  • Modern browsers are starting to block third-party by default.
  • Laws such as the EU's GDPR and the UK's PECR require websites to ask for consent before setting non-essential cookies. This is why most sites now show a cookie banner on first visit.
  • Users can manually clear cookies at any time from the browser's settings.

Cookies vs cache

Two related ideas often confused:

  • Cookies are small text files that hold information about the user (state, preferences, IDs).
  • The browser cache is a temporary store of downloaded resources (images, scripts, stylesheets) so they do not have to be downloaded again on the next visit.

Both improve the browsing experience, but they do different jobs. Mark schemes can ask for the difference.