Which one of the following statements is NOT correct about HTTP cookies?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2015 Set 2 · Q13
Time
Select one answerSingle correct
Solution
Official answer: A) A cookie is a piece of code that has the potential to compromise the security of an Internet user
DNS and HTTPAn analysis of the given statements regarding HTTP cookies:
Statement (A): An HTTP cookie is not executable code or a program; it is simply a small piece of text data (key-value pairs) sent by a web server and stored by the client browser. It cannot execute by itself to perform operations or compromise security as code. Therefore, statement (A) is incorrect, making it the correct option for this question.
Statement (B): Cookies are transmitted between the client and server using HTTP headers (Set-Cookie in response, Cookie in request), which is true.
Statement (C): Cookies have attributes such as Expires and Max-Age to specify their lifetime, which is true.
Statement (D): Cookies are widely used to maintain session state and track user browsing behavior across a website, which is true.
Thus, the incorrect statement is A.
Try the question first, then check your work.
Examiner trap
Consider whether HTTP cookies are executable programs or simply structured text data sent in HTTP headers.
This DNS and HTTP previous year question is Q13 of the GATE CSE 2015 Set 2 paper. Find more GATE CSE PYQs on DNS and HTTP in Computer Networks, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related DNS and HTTP PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
DNS and HTTP has 18 GATE CSE PYQs across 15 papers from 2011 to 2026. 13 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 2.
How GATE tests DNS and HTTPIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.