This is our old Q&A Site. Please post any new questions and answers at

What is the use of cookies in some web sites like 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

accept rate: 0%

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.

permanent link

answered 17 May '11, 15:26

Jasper's gravatar image

Jasper ♦♦
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 ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 May '11, 15:10

question was seen: 2,021 times

last updated: 18 May '11, 00:31

p​o​w​e​r​e​d by O​S​Q​A