29

What do browsers do with expired cookies? I know that the app won't read them in, and I'm assuming the browser wouldn't send them, but are they purged from the file system with any regularity?

migrated from stackoverflow.com Nov 11 '11 at 9:35

This question came from our site for professional and enthusiast programmers.

26

Taken From http://msdn.microsoft.com/en-us/library/aa289495(v=vs.71).aspx

If a cookie has expired, the browser does not send that particular cookie to the server with the page request; instead, the expired cookie is deleted.

5

This depends upon the specific browser and also the user's personal settings. Welcome to the world of web development, where everybody is a special case. This is one of the reasons you need to test your site extensively, with multiple browsers, from different locations.

  • 3
    Yeah, some firefox versions seem to conserve expired cookies forever. I just deleted some cookies from my Firefox which expired in April 2012. (There were newer cookies with same domain and name, though.) – Paŭlo Ebermann Jan 8 '13 at 10:35
  • Hahahahahahahaha, sadly not the answer I wanted but thanks for the info. – tirithen Mar 5 '15 at 14:06
1

Browser checks for expired cookies when a page is requested from that domain. If a cookie has expired, the browser does not send that particular cookie to the server with the page request, and deletes it.

If a page has not been requested from that domain, the cookie will reside on your browser till it is overwritten by another cookie (happens when memory allocated for storing cookies gets used up).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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