What is a Cookie?

Confused about Internet Cookies! Want to know the answer to what is a cookie? This page will help explain cookies. Starting from a basic explanation of what is cookie and then helping clarify what a cookie is not. You can then move on to more details about what is a cookie like inside.

So what is a cookie?

In plain English a cookie is a simple text file. Your web browser can create this file on your local computer or mobile device. A computer cookie can have many different names. They can be called HTTP, Web, or Browser cookies. Your browser will create this text file when it is requested by the server of the web site you are visiting. Web sites normally use this text file to store data about your personal settings. At a later time they pull back that information. The web site can use this information to change the page you are viewing. In general cookies make your web browsing experience better. Read on to learn more about these little files.  If you feel like diving into the real technical aspects try this link to wikipedia.  wikipedia’s details about internet cookies.

Why is a cookie called a cookie?

Why is a simple text file that stores data called a cookie you may ask. I have found four competing stories each with their own merit. So hop over to my “Why are Browser Cookies called Cookies” page. Once you have read the options, vote on the one you think most likely. I also explain who can be credited for the first real internet cookie.

What is a cookie doing on my device?

You may wonder what is a cookie doing on my device. The simple answer is nothing. These files are not programs or viruses. they can not actually do anything by themselves. A computer cookie is only accessed and changed by your browser. The only thing a the file does is to store simple text information. The more important question is what is this file storing about me?

When is a cookie created?

These files are normally made when you first load a web page that wants to store information. The web page will first look to see if a file belonging to itself is already on your device. If an existing file is found then the data held within it will be read. The web page may change itself or pass the data found back to the parent web site. If no internet cookie is found the web page will instruct the browser to create one. Allowing this grants permission to the web site to access any information you provide. What is a cookie going to contain? Your IP address, type of browser, previous web site or any other information you provide. A web site’s privacy policy should be read before you accept their file. Opening a page can trigger secondary web sites. These secondary sites may write their own text file to your device. This is possible if they have ads, widgets or other elements on the web page. So when you open one web site, you may actually be opening content from several web sites. Each with the ability to create its own text file on you device.

Fun What is a Cookie Explanation.

What is a cookie’s limits?

Internet Cookies do have limits placed on them. The maximum size for any one file is 4KB. The maximum number of files that can be written and kept by a single domain is 20. These controls keep your browser running well. If cookies are disabled or rejected, the web page will take default action. It may therefore not perform as intended. It is possible to adjust your browser to not accept cookies. This is normally referred to as “disabling cookies”. You can find out how to do this by reading the following pages. Learn how to enable or disable cookies here.

Laws are being brought forward in relation to new technology. It is now European law to inform people before writing any file to their device. This provides the opportunity to reject the internet cookie. Refer to my article Cookie Law to learn more about this subject.

What is a cookie like inside?

Each internet cookie can contain up to six key parts. These are name, content, path, domain, expiration and secure connection.

The name is used to help identify the cookie. This is used by the web site that requested the file be created. It can sometimes identify how the file is being used. Normally the name would be hidden to help prevent hacker activity. Even possible cookie forging.

The content is the actual data that is being recorded. This data is held in a name-value pair format. This simply means that each piece of information contains two aspects, a name and a value e.g. If I wanted to store the name of this website cookiecontroller.com the name-value pair might look like this: “website=CookieController.com”.

The path and domain data allows your browser to keep a web site to cookie relationship. This to prevent a file that was created by Google from being read by Bing. This data details the origin and therefore which other web sites can access it. Read more about Cookie Domains and Paths here.

The expiration holds details about how long the browser should keep the text file. Most of these are called Session Cookies. These are removed by your Browser when you close the browser. Otherwise known as ending the browser session. The files that have a longer expiration period will be kept until that point in time. This is called a Persistent Cookie. It lives on after you have closed your browser.

The secure connection helps to ensure the web cookie can only be used in a secure way. An example of this is where a site uses Secure Socket Layers (SSL).
Learn more about about SSL here.