The GATE Grind

GATE 2015 CS (CS2) – Question 35

Computer Networks · Application Layer: DNS and HTTP · 1 mark · Multiple choice

Which statement about HTTP cookies is NOT correct?

  1. A cookie is a piece of code with the potential to compromise an Internet user’s security
  2. A cookie gains entry to the user’s work area through an HTTP header
  3. A cookie has an expiry date and time
  4. Cookies can track a user’s browsing pattern at a particular site

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) A cookie is a piece of code with the potential to compromise an Internet user’s security

Explanation

A cookie is stored data rather than executable code, so A is the incorrect characterization. Servers can set cookies through response headers and associate them with expiration/lifetime metadata; cookies support tracking across requests. The question’s expiry wording is conventional: session cookies can omit a persistent expiration date.

More Application Layer: DNS and HTTP questions

All Application Layer: DNS and HTTP questions →