How It Works: Cookies
Cookies can track your Web activities. Learn how they are created and where you'll run into them.
Michael Gowan
Cookie: a data file written to your hard drive by a
Web server that identifies you to a site.
- Helps a Web site
"remember" who you are and set preferences accordingly when you return.
-
Eliminates the need to repeatedly fill out order forms or re-register on Web
sites.
- Allows Web sites or advertising companies to track your Web
surfing behavior or patterns.
It's nice to be recognized. On the Web, sites can greet you like an old friend thanks to cookies. Beginning with Navigator 3.0 and Internet Explorer 3.0, browsers have worked with Web sites to record these small bits of identifying information on your hard drive, which the sites can use to track your activities and recognize you when you return. Cookies are now ubiquitous on the Web, but users, businesses, and consumer groups debate the nature of these tiny files: For some, they promise a more user-friendly Web; for others, they pose a privacy threat.
When you visit a site that sets cookies, commands embedded in the page cause your browser to contact the site's server. The server sends information back to the browser, where it's stored in a particular place on your hard drive. Different browsers store cookies in different places: Netscape Navigator maintains a file called cookies.txt that contains all cookie records from every site that creates a cookie. On a PC running Windows, Internet Explorer stores its cookies in the C:\windows\cookies directory. When you return to a site, the server queries your browser to find the cookie it created before, and the browser sends the cookie's information in response.
Cookies come in two varieties: Session cookies and persistent cookies. Session cookies clear out after you close the browser window (ending the session) and often are used by "shopping carts" at online stores to keep track of items you want to buy. Persistent cookies are set by news sites, banner ad companies, and others who want to know when you return to a site. These files reside on your hard drive after you leave the site.
Both types of cookie files contain the URL or domain name of the site you visited and some internal codes that indicate which pages you visited. Persistent cookies add the last time you visited the site and how many times you've been there. They usually contain a code that becomes your unique identifier, which lets a site know that you've been there before. Some cookies can contain personal information, such as a name or e-mail address, but only if you've given that information to the Web site. Contrary to popular rumor, cookies can't "steal" your name or e-mail address if you don't give it out.
- Page 1 of 2
- Next »
The Best of PC World
Microsoft Office Home and Student 2007
- Great year-end deals for small business!

-
Get 24/7 live remote AT&T Tech Support 360* service along with select Lenovo* PCs (with Intel® Core™ 2 Duo processors and save up to 200!
-
HP EliteBook* 6930p Notebook with Intel® vPro™ technology and a free HP Basic Docking Station - $641 instant savings!
- *Other names and brands may be claimed as the property of others. ©2009 Intel Corporation. Intel, the Intel logo, vPro and Core trademarks of Intel Corporation in the United States and other countries. All rights reserved.
Dell Fast Track
-
Free Next Day Business Shipping on Dell's Most Popular Systems
Over 35% off Dell’s most popular systems. Delivered in 48 hours with free next business day shipping! Ends 12/22 at 3 PM CST
Focus on Personal Productivitysponsored by Microsoft
- Personal Finance 2.0 These free and fee-based Web services not only aggregate data from your online bank accounts, they give you tools for managing your money.
- High-Tech Travel Tips Plenty of stories provide advice for elite mobile professionals. But what about you, the unproductive traveler?
People who read this also read:
Best Prices on Antivirus Software
Norton Antivirus 2010 (Full Product, 1 User)Price: $17.90
Anti-virus 2010 (OEM Product, 1 User)Price: $21.60
AntiVirus 2010 (Full Product)Price: $24.95
Norton AntiVirus 2009 (Full Product)Price: $16.89
AntiVirus Plus 2010 - 3 Users (Full Product)Price: $11.95
Anti-Virus 2009 (Full Product)Price: $15.04
- Perfect Printing Solutions Find just the right All-in-One Printer for you from HP. Visit the HP Resource Center.
- Acer Laptop Center Forget the Mouse...check out the next generation multi-gesture touch screen technology from Acer.
- Dell Shopping Center Check out great deals from Dell!
Cameras
Camcorders
Cell Phones
Components
Desktops
HDTV
Home Theater
GPS
Laptops
Monitors
MP3 Players
Networking &
Printers
Storage








