What are Cookies?

A cookie is plain text file (usually small in size) generated by a website, stored on the visitors computer. This file is used to store a value for a specific key, or as it is called in programming, a key value par. This key-value par can only be read by the website that set the cookie and the visitor itself.

What are cookies used for?

Cookies can be used for different reasons like session management, personalization and tracking. Cookies are usually used to improve the visitors user experience of the website by remembering the visitors previous choices or authentication details, thus letting the visitor browse the site without authenticating herself every time they visit the address from the same computer etc.

Different types of Cookies

Cookies are often divided in two different groups: session cookies and persistent cookies. A session cookie is a temporary cookie which is stored for the entire duration of the session. The session cookie is automatically deleted when the visitor close their browser. A typical example of a session cookie is the shopping cart cookie. Where the previous choices of the visitor is remembered at the checkout page.

Persistent cookies on the other hand are stored for an arbitrary period of time, say 30minutes or one year. The cookie life length is set by the developer of the website. These types of cookies are often used for quick authentication, language or theme selections or other types of customization of a website.

Tracking & Cookie Profiling

All cookies are not in line with the users wish or preferences. While a lot of the cookies are created with good intentions to improve functionality and the users experience web experience, others are used for tracking purposes or profiling that might cross a line that the user is not comfortable with.

A heavily discussed topic is the targeted advertisements that are based on the users cookie profile. This is mainly done with something called 3rd party cookies.

3rd party cookies

Sometimes a web server or website loads scripts, images or other assets from another location than the URL that the visitor entered into their web browser. The loading of these scripts enables cookies to be stored at the visitors device from the other location. One of the most common examples of this are the social media widgets used to share or like an article or page.

These cookies are often used for tracking or cookie profiling to customize ads after user behavior. Targeted advertisements have been up for discussion related to privacy.

Deleting cookies

As the life length of a cookies differ a lot, there are times when you may want to delete some cookies before their expiry date. This can be done by clearing the cookies on your computer which is usually done in your web browser.