I am wondering if there is any research on the lifespan of cookies on users computers?

For a website I'm building we are looking at giving the users some personalization based on a previous selection when they come back at a later point. However, our users mostly will come back a few months or even a year later.

Of course I can set the expiration time of the cookie to a year or longer. But overtime people get a new computer, a new install, or just a new browser (version). Or there might be other changes which make the cookie be deleted. I'm guess that the cookie won't survive the length of a year. Will it be worth saving this in a cookie? E.g., how much percentage of the cookies will still be there by that time?

  • I say set it for one year and leave it at that. It doesn't take up that much space and, if it'll help the user when they revisit your page, it'll be worth it. May 9, 2011 at 14:07
  • Sorry, I forgot to mention that I know the theoretical fact of setting the cookies expiration, but not know if the cookie will actually survive that.
    – Lode
    May 9, 2011 at 14:13
  • 1
    As long as the user doesn't clear their cookies, the expiration date should be adhered to by the browser. May 9, 2011 at 14:24
  • 6
    ...Until the Cookie Monster finds it! :P May 9, 2011 at 14:44
  • depending on the nature of the site, session data can balloon if you dont delete old sessions regularly. So keep that in mind if your site receives a lot of casual traffic. May 9, 2011 at 18:05

2 Answers 2


If your user doesn't come back for a year, then whatever cookie-persisted personalization you have set has probably become moot. The user will not even remember that the personalization has been set.

Feel free to set your cookies for a year, but don't be too concerned if they expire before the user comes back.


If the users of your site have a login/account you might want to consider to store their personalization settings with their account details in the database. That way you don't need to worry about any cookie deletion or expiration.

  • Those I want this for don't, unfortunately. That is why I want this :)
    – Lode
    May 9, 2011 at 19:33
  • Fair enough, then my suggestion wouldn't help :) May 10, 2011 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.