A cookie is a small text file, saved in a browser’s directory and stored in RAM, that obtains information sent by a website, to be stored on a web browser so that it can be read back later from that browser.
Additionally, the cookie may also be saved to the target computer’s hard drive when the user leaves or logs off the website providing the cookie.
A cookie is typically used to remember information about a specific visitor to a website.
SINGLE USE COOKIES
A Cookie can inform a web server as to whether or not you have visited the site before, and can communicate small pieces of information, such as a user id or password, from the web server back to itself the next time you visit the same site again.
Cookies usually only last until you exit your browser, at which time they are destroyed.
PERSISTENT COOKIES
An alternative form of cookie, known as a persistent cookie, has an expiration date built into it and is stored on your hard drive until the time of said date.
A persistent cookie can be used for tracking purposes.
This is achieved by recording a user’s browsing habits, by identifying them whenever they return to the website.
SAVES PASSWORDS
There are many uses for cookies that I will cover at a later date.
One use, however, is for storing passwords and user id’s for specific websites.
On sites that offer a personalised viewing experience, your web browser will be requested to utilise a small amount of space on your computer’s hard drive in order to store your preferences.
This allows your browser to check to see if you have any predefined preferences, i.e. a cookie, for that unique server, every time you log onto that particular website.
If you do have a pre-defined preference then the browser will send the cookie to the server, along with your request for a web page.
Whilst I will address some of the negative aspects of cookies in the future, there are some benefits afforded by them, such as site personalisation.
One of the other common uses is to the ‘Remember Me’ feature employed by some websites, allowing you to sign into a site, forum, etc, without having to re-type your user id and password every time.
Share this post: Tweet It | Facebook It | Stumble It | Digg It | Delicious It


{ 2 comments… read them below or add one }
You numpty!
When I saw the title I hoped this was going to be a recipe
{ 3 trackbacks }