The Gateway to Computer Science Excellence
+7 votes
2k views

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

  1. A cookie is a piece of code that has the potential to compromise the security of an Internet user
  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 be used to track the browsing pattern of a user at a particular site
in Web Technologies by Veteran (104k points) | 2k views

5 Answers

+7 votes
Best answer

Answer is A. 

See this : http://stackoverflow.com/questions/3467114/how-are-cookies-passed-in-the-http-protocol

Moreover, cookies are just strings not code. Refer Tanenbaum .

by Junior (779 points)
selected by
0
I too after writing the answer gave it a second thought. Sorry.
0
dude,no need to be sorry  :P chill
+1

Correct/ Cookies are data and not code.

http://en.wikipedia.org/wiki/HTTP_cookie

0 votes
Answer Is A

 

A cookie is a piece of code that has the potential to compromise the security of an Internet user

Its Not A Piece Of Code
by Active (2.4k points)
0 votes
An HTTP cookie (also called web cookie, Internet cookie, browser cookie, or simply cookie) is a small piece of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing. Cookies are not piece of code, they are just strings typically in the form of key value pairs.
by (365 points)
0 votes
  1. A cookie is a piece of code that has the potential to compromise the security of an Internet user
  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 be used to track the browsing pattern of a user at a particular site

Option B is correct.

Cookies are passed as HTTP headers, both in the request (client -> server), and in the response (server -> client).

The server sends the following in its response header to set a cookie field.

Set-Cookie:name=value

If there is a cookie set, then the browser sends the following in its request header.

Cookie:name=value


 


Option C is correct

When the cookies are passed, we can set various things like the name, the expiry date and time, and the path that leads to the destination on where it'll be stored in the client.

Set-Cookie:name=value[; expires=date][; domain=domain][; path=path][; secure]


 

 


Option D is correct.

That's the function of cookies


Which leaves us with option A. Why is option A incorrect?

First, cookies are text-only strings. Not a piece of code.

Second, they compromise arguably the privacy of the user, and not the security.

Hence, Option A is the answer.

by Active (1.1k points)
–1 vote
It is B.

For reference you can have a look at the HTTP header here.

http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
by Boss (19.9k points)
reshown by
0
The answer is A :)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,654 questions
56,170 answers
193,882 comments
94,315 users