Back to Internet 101

Question: What is a cookie?

Answer: The concept behind cookies is to find out what you want to do at a certain site and record information on your computer so that when you return to the site they look at your cookie and know how to better serve you. Much like going to your favorite restaurant and saying, "I'll have the usual."


Hit reload and see this number change ;)

Cookies contain information that is sent from a web server to a web browser. That information is stored on your hard drive. Some web sites record information that you have entered while at their site and send out cookies (text files) that are stored on your computer. This cookie is storing the name, count and last date entered on your hard drive. If you are using Netscape there should be a file on your hard drive named magic_cookie and it contains the following information. Internet Explorer has something similar.

    # Netscape HTTP Cookie File
    # http://www.netscape.com/newsref/std/cookie_spec.html
    # This is a generated file!  Do not edit.
    www.usd.edu FALSE /trio/tut/start FALSE 951332053 VisitorName brad ---- (your name)
    www.usd.edu FALSE /trio/tut/start FALSE 951332400 WWHCount    5    ---- (your count)
    www.usd.edu FALSE /trio/tut/start FALSE 951332400 WWhenH      919796400358
    

Cookies DO NOT have access to your hard drive other that the original cookie file with the information that was sent. This file is then retrieved and updated by the server when you return to their site.

Cookies are usually set to expire after a certain amount of time. If everything is working right on this one - it shouldn't expire unless you don't come back for a year.

One day (long ago) I visited a web site and there was a free drawing. Good, I thought. I quickly filled out the information and submitted it and never won anything. HOWEVER, every time I return to their web site, on the opening screen I see this message "Hello Brad." (seen that anywhere lately?) They were really gathering information for their cookie - tying a name to a number.

If you asked about the weather forecast for your home town and submitted the information, the next time you go to the same site it may display the forecast for your home town on their opening screen. It has stored information regarding what you wanted the last time you were there and retrieved that information when you returned.

Some sites actually record your IP Address - what you did while at their site and store that information on their computers. This information helps them to analyze their site so they can find a way to improve their service. The information can also be used to monitor repeat visitors and frequency patterns.

With or without cookies there is a lot of information that you are sending out with your requests.

right now your IP Address is ---- 75.49.226.88
you have an assigned DNS name of ---- adsl-75-49-226-88.dsl.stlsmo.sbcglobal.net
you are currently using ---- Mozilla/4.0 (compatible; MS FrontPage 6.0)

The three pieces of information were obtained without using cookies but rather with server side includes. If I wanted to, I could have recorded the same information and more using CGI scripting so I could tell how many people were using Windows or Mac, Netscape or Internet Explorer and if there are more .edu, .org, .com or other visitors.


Question: Do I have to accept cookies?

    Answer: Under your browser preferences you have the following choices: (options from Netscape)
    • accept all cookies
    • accept only cookies that get sent back to the originating server
    • do not accept cookies
    • warn me before accepting a cookie
    I recommend leaving them on. These days the advantages are greater than the disadvantages.


Question: What is a server side include?

    Answer: Server side includes read the information that you are broadcasting while requesting information. I printed your IP address above using the following code:
    <!--#echo var="REMOTE_ADDR"-->


Question: What is a CGI script?

    Answer: CGI (Common Gateway Interface) scripts are programs that run on the servers. The programs can vary in their complexity and design. CGI scripts are one way to maintain statistics on everything that happens on your web site. You have to be able to create a cgi-bin directory on your web site and have to have permissions required to execute these programs.

    Not all sites allow users to set up and use CGI scripts.

13188

Back to Internet 101