Saturday, October 20, 2007

Persistent Cookie Death: Is it a problem

All measurements of Consumer Engagement are dependent on snippets of information called Cookies. A Cookie is served by a domain to a web browser.

Cookies introduce a sense of "state" to HTTP, which is a "stateless protocol". This means that the server that responded to the browser's HTTP Request remembers the browser, as long as the cookie is alive.

Cookies are of 2 types from a cookie-life perspective: Session and Persistent. A session cookie expires within typically 30 minutes. A persistent cookie on the other hand has a life of much more, typically days, months or years.

Everybody loves cookies: Is this a problem?

With the granularity of consumer response gleaned with cookies, domains typically several cookies, and it is not uncommon to see over 15 cookies served.

The constraints in this are:

Every Domain can sever a maximum of 20 cookies to a specific browser at any point in time
The browser can have only 300 cookies, (each with a max size of 4 KB - too much)
If this limit is breached, older cookies get deleted. Session cookies are killed first, and then persistent cookies.

If a persistent cookie that I have served to a browser is deleted, I will miscalculate causality. Lets say someone searched for PC and went to www.dell.com. Post that search, the consumer bookmarked the site or typed in directly. If the persistent cookie was still alive I woudl have been able to recognize this visitor as originally from a Search Engine rather than a direct visit, with the objective of crediting points to the Search Engine.

Also, my web analytics tool will treat a repeat consumer as a new consumer, and any personalisation engine that the site www.dell.com may have will be lost, resulting in a sub-optimal user experience.

Is this a problem?

I dont think so. I think 300 is pretty comfortable. I have no emprical data to back this right now, but m going to go count the number of cookies in my machine, and write a blog post about that data soon -:)

But i think there is hope in the 4 KB number. I am unable to check this now, but would think that cookies would be no more 100 Bytes. That means we could relax the constraint on size and make it a total number of cookies subject to not exceeding a total size of 300 x 4 kb = 1.2 Megs.

That is a lot of cookie space. Not something I would lose sleep over.

No comments: