This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

cookies in web pages

0

What is the use of cookies in some web sites like cnn.com? I don't log in but when I capture HTTP packets using Wireshark I see cookies. what is it for?

asked 17 May '11, 15:10

A%20B's gravatar image

A B
1101012
accept rate: 0%


One Answer:

2

Cookies are not just used to keep login information but it is basically a way to store information (name/value pairs) on the client and retrieve it automatically every time the client reconnects to the server. Common things to store in cookies are session informations or web site options, ad settings and other stuff.

answered 17 May '11, 15:26

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%

you mean they show different ads for different users?can you describe a little more?thanks.

(17 May '11, 15:28) A B

It usually works like this: you visit a web page that shows ad banners and, together with loading the banner, you get a cookie from the ad company containing a unique ID. When you visit another web page that has banners from the same ad company they get their previous cookie back. That way they know what web sites you are surfing.

You can often defend yourself against techniques like that by blocking 3rd party cookies or using ad blockers.

(18 May '11, 00:31) Jasper ♦♦