Session Cookies not deleting after all browser instances are closed

If a session cookie is a cookie without an expiration date, and session cookies expire when the browser is closed, then why are these cookies remaining on my computer? I have cookies on my computer that were created as many as 5 days ago that have"none" as the expiration date. Shouldn't these types of cookies be deleted when I close my browser?  This behavior is present in IE7.  I am not expiriencing it in IE8.  Is there an IE setting to set how long session cookies should be stored? 
I am developing an application that sets a cookie.  When I view the cookie in Windows Explorer the expires attribute is set to 'None'.  I expect that when a user closes their browser, this cookie will delete.  What I see is that even if a user restarts their computer, the cookie is still there.  I can view them here: $\Documents and Settings\username\Local Settings\Temporary Internet Files
Answer
Answer
My problem is that I did not realize that the cookies did have expires dates.  The expires date that I see in Windows explorer when viewing cookies is not what determines if this cookie is persistent or not.  When cookies were being added, they were actually just appending to the contents of the cookie that was visible through windows explorer.  If those cookies that append to the content have expires dates, then this cookie is persistent.  If no dates are set, then this cookie does not get created on disk.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

Hi,

Cookies are removed after the browser is closed, however some cookies still remain.

For example:

Document Object Model (DOM) storage

The DOM storage is a kind of "super cookie" web developers can use to retain information. Like regular cookies, they are not kept after the window is closed.

There are many types of cookies a few of them are listed below:

Persistent cookies (or saved cookies) remain on your computer after you close Internet Explorer. Websites use them to store information, such as a sign-in name and password so that you don't have to sign in each time you go to a particular site. Persistent cookies can remain on your computer for days, months, or even years.

First-party cookies come from the website that you're viewing and can be either persistent or temporary. Websites might use these cookies to store information that they'll reuse the next time you go to that site.

Third-party cookies come from other websites' advertisements (such as pop-up or banner ads) on the website that you're viewing. Websites might use these cookies to track your web use for marketing purposes.

Cookies: frequently asked questions

http://windows.microsoft.com/en-us/windows7/Cookies-frequently-asked-questions

Hope this information is helpful. Please let us know if you require further help.

Regards

Rehman – Microsoft Support

 

John Rubdy
Forum Moderator | Microsoft Community

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 30, 2020 Views 10,371 Applies to:

Related Forums