Question

Which one of the following statements is NOT correct about HTTP cookies?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2015 answer key

Solution

Evaluate the technical nature and mechanisms of HTTP cookies according to RFC 6265.

Examine the statements:

  • (A) 'A cookie is a piece of code that has the potential to compromise the security of an Internet user.' This statement is false. An HTTP cookie is purely passive text data (a name-value pair along with metadata attributes), not executable code or a program. It cannot execute on the client system by itself.
  • (B) 'A cookie gains entry to the user's work area through an HTTP header.' This is true; cookies are transmitted via the Set-Cookie HTTP response header and stored in the browser's cookie storage.
  • (C) 'A cookie has an expiry date and time.' This is true; persistent cookies specify an expiration via Expires or Max-Age attributes.
  • (D) 'Cookies can be used to track the browsing pattern of a user at a particular site.' This is true; session identifiers and tracking tokens are commonly maintained via cookies.

Since statement A is incorrect, it is the correct answer to the question.

Final answer

A

Common trap

Believing that cookies are executable scripts rather than passive structured data.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2015 Computer Science and Information Technology (CS) Session 2
Question
23 of 65, printed as CS Q.13
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.