Cookies are a Sometimes Food

There's been a lot of talk about HTTP cookies lately. I decided to take a look at my cookies database and these are some of the things I found:

  • There were 1298 cookies. This is probably fewer than most people have, because I have third-party cookies disabled. Also occasionally I delete cookies from domains I don't recognise.
  • 579 (45%) of them had expired.
  • 468 (36%) hadn't been used for 3 months. 31 hadn't been used for 6 months. 2 hadn't been used for over a year.
  • 401 (31%) expire more than a year from now. 296 (23%) expire more than 2 years from now. 236 (18%) expire more than 5 years from now.
  • 35 expire sometime in the year 2038. 50 expire after 2038.
  • 2 expire in the year 4751 (!!) and one expires sometime after the year 10000 (the value is so large Javascript and I have given up calculating it).

So what?

Firefox doesn't clear away expired cookies. No big deal for most people. You might think otherwise.

It's the expiry dates that get me. Is there really any reason for a website to store a cookie for 25 years? Is it really going to be useful to Dell, to know when I last visited (September 15th, apparently) 900 years from now? Does Bitbucket need to know what repos I recently viewed, until a few decades before the Mayan Calendar requires a sixth digit? (You remember the Mayans, right?)

Sooo, what?

Because I can, I made a small add-on to clean up some of this detritus from the cookies database. It can delete expired cookies, cookies you haven't used for a while (you get to set how long), and will alter the expiry date of remaining cookies so that they don't last until the Sun burns up the Earth. It will even do so automatically, when you take a break to watch Sesame Street.

You can use it now too. Here it is. I named it Cookie Time after a company that makes delicious real cookies (feel free to send me some).

Om nomnom nom nom.