Before I go on, I must warn you. If you came here with the idea of getting a great recipe for cookies I’m afraid I have to disappoint you. Sadly enough, no chocolat chip cookies, no vanilla flavoured sugary dough, just plain old browser cookies.
A term often used in the “computer world” specially by web developers. A cookie or an HTTP cookie is a small piece of data sent from a website and stored in the user’s web browser (this is, ofcourse, just a file on your computer like any other). When you use the same website again some time later, the data stored in the cookie can be accessed and reused.
Ever wondered why in some cases a website remembers your username? Let’s get one thing out of the way. Cookies are not dangerous to your computer, they do not contain malware. Although tracking cookies (mostly third-party tracking cookies) are used to compile long-term record of your browser history.
For the record, this is illegal… Anyway, do not concern yourself all too much about this.
They have been around for quite some time now. By now there are several types of cookies. Allow me to give you a quick tour of the cookie store:
Session Cookie: This cookie exists only when the user is reading and navigating the website. This type of cookie will be deleted when the browser is closed
Persistent Cookie: The most known cookie, it persists throughout user sessions. The maximum life time of a persistent cookie is 1 year. Do keep in mind that every time you visit a website that uses this cookie, the “start date” will be reset to the current date.
Secure Cookie: This cookie had a secure attribute enabled and can only be used over an HTTPS link. It’s always ensured that this cookie is encrypted when transmitting data from client to server.
HTTPOnly Cookie: Supported by most modern browsers. This is used when transmitting HTTP of HTTPS requests, restricting any other requests.
Third-Party Cookie: Before continuing it may be interesting to know what a first party cookie is. Very simple really, this is a cookie that is wet with the same domain (or subdomain) in the address your are using. Third party cookies are set by different domains and seen in the address bar. Like an advertisement on a website.
Super Cookie: No, this is not a joke. Wait until you read about the last type of cookie. Anyway, this is a cookie with a public suffix domain (.com, .us, …). Most browsers allow by default first party cookies. http://www.wordpress.com for example can set a cookie “wordpress.com” but not “.com” (supercookie). Because else, a malicious website could also set a supercookie .com and as such corrupt or impersonate a legitimate user request to wordpress.com.
Zombie Cookie: (see I told you so). This type of cookie is recreated after it is deleted.
This is a quick intro on cookies. Should you worry about them? Not really, just keep in mind they exist. It doesn’t hurt to delete all your cookies every now and then. Each and every browser provides you with such an option. Or you could also use small tools to do so, like crap cleaner.