Permanent vs. Temporary Cookies
Posted by Rick Tempestini on August 18, 2007
Cookies, by default, when created using the following code sample, expire when the browser closes:
If, however, the Expires property is set to a date and time in the future of the current date and time, a persistent cookie file will be written to the local client hard drive. For Internet Explorer, cookies are placed in the c:\Documents and Settings\[user_name]\Cookies directory.
Therefore, the code sample below will write a permanent cookie to the clients hard drive because the Expire property was set to a time in the future.
Now, looking into my local cookies directory I see my new cookie file:
If I open the cookie, I can now see the name of the cookie “TestCookie” and the name-value pair that I stored in the cookie: setting1-test.
Like this:
This entry was posted on August 18, 2007 at 1:27 pm and is filed under Other. Tagged: ASP.NET, Browser, Cookies. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.




Allyson Y. Schwartz said
Tech Question:
Q
fibre optic christmas trees said
Good day is Blogengine a free blogging software like wordpress? Also does it have lots of plugins and themes for it? I would like to start using it for my new blog if it does. Thanks…
asp.net, c#,javascript said
asp.net, c#,javascript…
[...]Permanent vs. Temporary Cookies « TEMPESTINI.NET[...]…
Christmas Trees said
Christmas Trees…
[...]Permanent vs. Temporary Cookies « TEMPESTINI.NET[...]…