Cooky by Ahmed Hamdy Eissa

A cookie is a plain text file that can contain no more than 4K of text. The file sits on your hard drive and is accessed by your Web browser when the remote site requests it. The Cookies does not contain information that is immediately understandable.

People are collecting information about you and your preferences. To avoid keep sending the same ad to you over and over again, they put a cookie on your computer, which lets them check the next time you hit one of their affiliates. The only way that companies can track who you are and where you go is through the use of cookies. Cookies are used to track user preferences.

Active Server Pages (ASP), relay on cookies to work properly. Each time you open a session with an ASP server, you get a cookie. This cookie is used strictly for linking your browser with the server memory set aside for your session. Blocking cookies from an ASP-based server will cause most of the ASP functions to fail. Iíd rather allow the little text file on my machine if itís going to make my life easier when I go out to my favorite Web sites.

Your browser must to accept cookies for ASP to work properly. By default, most browsers are configured to accept cookies when you install them. You can change the settings.

Create a Cookie:
It is easy to create a cookie on a visitorís system. By default, cookies without expiration dates or time are not permanent and do not have a cookie file created for them.

In the Internet Explorer, look at the Temporary Internet Files directory or window directory, which will show you the expiration date and time ďLast CheckedĒ column of cookie files. You should purge old cookies periodically.

If you open a cookie, the black box is a new line character, + is a space, %3A is a colon, and %2F is the slash. The punctuation and special characters are translated to their hexadecimal equivalents. Explain cookie files to your users by explaining each line in the file.

Modify a Cookie:
Use the same code to create the cookie as we do to update the value.

Removing Cookies:
Just update the value to an empty string, and cookie will go away. While cookies do have expiration dates, cookies donít seem to get removed when they should. Some cookies do not go away even if you purge Temporary Internet Files directory. Remove them yourself. For permanent cookies, be sure to provide realistic explanation dates, such as 30 or 60 days not 30 years.

While cookies are surrounded by concerns about privacy and corporate conspiracies, they are a quick and easy way to store user-specific data without having to get into database architectures. For simple forms, use the power of cookies to simplify your work and store relevant information on the userís machine. If you use cookies, be aware that people can refuse them. You should always have a backup plan in case a user does not accept cookies. Make an effort to explain what youíre doing with cookies. This explanation will also help alleviate any fears about the use of personal preferences and information.

Ahmed Hamdy Eissa's E-mail Address

Go to top of page

Ahmed's Home Page