Asp shopping cart source code
Accept Cookies by Site
As you surf the Web, information about your identity or the actions you took while visiting a site can be stored on your hard disk in the form of cookies. Web sites can retrieve these cookies on your next visit to obtain information about you. Most sites use cookies for legitimate purposes, such as storing preferences or account information so that you don't have to reenter it, and some sites cannot be accessed unless your browser accepts cookies. But cookies
offer the potential for abuse and can also clutter up your hard disk, so most browsers let you choose whether or not to accept them. The problem is, the browser options are limited. You can accept all cookies or no cookies, but to accept only some cookies, you must respond to a confirmation dialog for every cookie sent to your computer; this is extremely inconvenient. CookieCop lets you
automatically accept or reject cookies by site. Since it runs as a proxy server, it can be used with virtually any browser.
CookieCop runs under Microsoft Windows 95, Windows 98, and Windows NT 4.0 and has been tested using browsers from Microsoft, Netscape, and Opera. The Microsoft Visual C++ source code is provided with the utility for those interested in seeing how it works.
Using Cookiecop
To install CookieCop, run the supplied installation program, Setup.exe. Use the Add/Remove Programs applet in the Windows Control Panel to uninstall the utility.
CookieCop requires that your browser support external proxy servers. Most recent browsers, such as Microsoft Internet Explorer 3.x and above, Netscape Navigator 3.x and above, and Opera Software's Opera 3.x, support this feature. You will need to consult your browser's online help if you are not using one of the browsers listed here.
CookieCop also requires Comctl32.dll version 4.70 or higher. If you are using Windows 98, you will already have the correct version of this DLL. If you are using Windows 95 or Windows NT, you will need to have Internet Explorer 3.x or higher installed. You can also download the DLL from Microsoft at www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp.
CookieCop's Setup program will warn you if you do not have the correct version of this DLL.
Before you can use CookieCop, you will need to modify a few configuration entries in your browser. The online help file contains step-by-step instructions, along with illustrations, for several browser versions.
CookieCop can be used with virtually any type of Internet connection. You can use CookieCop from home with a dial-up or cable modem connection or from the office over a corporate network. CookieCop supports gateway forwarding, so you can use it in conjunction with other proxy servers and firewalls.
Cookiecop's Tray Icon
CookieCop displays a traffic light icon in the Windows system tray (Figure 1). The traffic light indicates the activities taking place during your session on the World Wide Web.
The yellow light comes on when there is an active connection.
The red light flashes when a cookie has been blocked or rejected.
The green light flashes when a cookie has been downloaded to your browser.
Note that unlike a real traffic light, multiple combinations are possible; you can have all three lights glowing at the same time.
Double-clicking on the traffic light icon will display the CookieCop dialog box. In this dialog, you can monitor your activity on the Internet using the Event Log, and you can add Web sites from which to reject cookies using the Cookie List. But before we discuss these dialogs, we need to talk a little bit about cookies—what they are, and why you should be concerned about them.
What Is A Cookie?
A cookie is a piece of text-based information that is transmitted between a Web site and your browser. Often, the cookie is used to record the actions you took while visiting the site. When you return to the site, the cookie is retrieved, and the site can configure itself based upon your preferences and what you did during your last visit.
Although you can view the text of a cookie, its contents are often
indecipherable except to the Web site that delivered it to you. Cookies can have expiration dates, and if the date is later than the current date, the cookie is saved to your hard disk. Cookies with no expiration dates exist only for the lifetime of the browser session and are known as per-session cookies. When the browser is closed, the cookie disappears from memory and is not saved to disk.
Cookies can be transferred to your browser in several ways: through HTTP headers, through JavaScript, and through the execution of external programs, such as Java applications. CookieCop can intercept and reject HTTP and JavaScript cookies. Your browser may let you control cookies from Java applications by allowing you set the Java permission levels or to disable Java completely.
Good Cookies
The Internet offers a wide variety of useful services such as free e-mail accounts, online forums, and e-commerce sites. The use of cookies is essential for these sites. Without cookies, for example, the sites would have no way to track the items that you placed into your virtual shopping cart as you browsed about the site.
In general, if you enter a user name and a password to access a site, or if you are making an online purchase, you will want to accept cookies from the site. When you join a site or perform a transaction, you may be asked for your name, some demographic data, and perhaps your credit card number. Sometimes this personal information is saved to your hard disk. For example, if a Web site
offers to "remember your password," your password will be saved as a cookie on your disk. The information is usually encrypted which makes it less obvious to others who may be snooping around your system or spying on your Internet transmission.
Bad Cookies
CookieCop monitors all cookie transactions occurring between a Web site and your computer. If you look at CookieCop's Event Log (more on this later), you will see connections being made and cookies being transferred to sites that you have never visited, at least not intentionally. This is because most Web sites that display banner ads use a media service to manage the advertisements and graphics. When you connect to your favorite Web site, a connection is also made
to a commercial ad service.
These ad services do more than create annoying banners and slow down your Web connection, they also deposit cookies. Why? They don't want to send the same ad when you revisit the page, so they send you a cookie with information about the ad you just viewed. With this knowledge, the media service can issue you a brand-new banner, along with an updated cookie, on your next visit to the Web page.
With CookieCop, you can observe exactly what is being received and
transmitted in a cookie using the Event Log. Double-click on a cookie to see its contents. If you notice that personal information, such as your credit card number, is being transmitted without encryption (as plain text), you may wish to e-mail the site's Webmaster to point out this compromising practice and then use CookieCop to permanently delete the cookie from your hard disk.
Cookies may even be surreptitiously transferred when you're not using a browser, such as when you view a Web page in Windows Explorer or read an e-mail message that was written using HTML. If your e-mail program supports HTML and the message contains a Web-based graphic, a connection to a Web server is made to download the graphic. The site can then download a cookie to your system. But don't worry, CookieCop is able to intercept and reject these cookies. This is because the cookies use the HTTP protocol, and all HTTP requests go through
CookieCop.
What Sites To Block
Since cookies may be deposited on your computer by sites you never knowingly visited, how can you know what sites to block? One approach is to list the sites from which you will accept cookies and reject all others by default. CookieCop lets you do this, but you may run into problems. Every time you want to visit a new site that uses cookies, you'll have to add it to the list.
A better approach is to take advantage of CookieCop's Event Log (Figure 2), which lists all the cookies that were accepted, sent, or rejected during your browser session. By default, events are sorted by the time they took place. You can also sort the events according to site name and event type by clicking on the column
headers. Clicking the header again reverses the sort. New events are always appended to the end of the list, regardless of the sort.