What is an Internet cookie?

internet cookies
No, we are not talking about those delicious cookies. Yagi Studio / Getty Images

Cookies have, for some reason, gained a rather sinister image. But they really are simple and harmless. (Note that this question became so popular that HowStuffWorks now has a complete article on cookies.)

A cookie is just one or more pieces of information stored as text strings on your machine. A Web server sends you a cookie and the browser stores it. The browser then returns the cookie to the server the next time the page is referenced.


The most common use of a cookie is to store a user ID. For example, the cookie might containg the following string:


­ Amazon.com is one site that uses this technique. When you order a book, you fill out a form with your name and address. Amazon assigns you an ID, stores your information with that ID in its database on the server, and sends the ID to your browser as a cookie. Your browser stores the ID on your hard disk. The next time you go to Amazon, the ID is sent back to the server. The server looks you up by your ID and customizes the Web page it sends back to you. The page might say, "Welcome back, Joe Smith!"

You may be wondering:

  • Is there any more to cookies than that? No. They are simply text strings. On my machine there is a directory called c:\windows\cookies that contains all of the cookies. They are little text files -- you can open them up and see the strings that are being saved.
  • Are cookies harmful? No. They are just short text strings, and they can often make browsing better by allowing a server to recall any customized information you have set.
  • Are cookies common? Yes. There are over 500 separate cookies on my hard disk.
  • Can cookies transmit computer viruses? No. They are just text strings.
  • Can a company read my personal information from my hard disk with a cookie? No. Only the cookie that is sent in the first place is returned to the server. It is not modified or manipulated in any way.


Frequently Answered Questions

Should I allow cookies?
Cookies are small text files placed on your computer by websites you visit. They are widely used to make websites work more efficiently, as well as to provide information to the site owners. The answer to this question depends on what the cookie is used for. Some cookies are essential for websites to function properly, while others are used to track your browsing habits or serve you targeted ads. If you are not comfortable with a website tracking your behavior, you may want to disable cookies for that site. However, this may prevent the site from functioning properly.
What is a cookie on internet?
A cookie is a small piece of data that is stored on a user's computer. Cookies are used to remember information about a user's browsing session and to allow websites to keep track of a user's activities.
What are cookies used for?
Cookies are small files that are placed on your computer by websites that you visit. They are used to store information about your visit, such as your preferred language and other settings. Cookies can also be used to track your online activity, such as the websites you visit and the ads you click on. This information can be used to show you targeted ads.
Is cookies in internet safe?
It depends on various factors, including the specific cookie, the website it came from, and the user's security settings. In general, cookies are small pieces of data sent from a website to a user's computer, then stored on the user's hard drive. While cookies cannot damage a user's computer, they can potentially be used to track a user's online activity or to collect personal information. As such, users should exercise caution when accepting cookies from unknown or untrustworthy websites.