<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Cookie is lost when browser is closed</title>
	<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/</link>
	<description></description>
	<pubDate>Wed, 07 Jan 2009 09:00:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Munish Bansal</title>
		<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-18608</link>
		<pubDate>Mon, 13 Oct 2008 01:20:10 +0000</pubDate>
		<guid>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-18608</guid>
					<description>Thanks a lot...very nice explaination and solution.</description>
		<content:encoded><![CDATA[<p>Thanks a lot&#8230;very nice explaination and solution.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Daniel</title>
		<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-17639</link>
		<pubDate>Sat, 20 Sep 2008 01:11:39 +0000</pubDate>
		<guid>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-17639</guid>
					<description>If the ASP.NET Session Id cookie is set to expire immediately on browser close, will this trigger the Session_End event on the server?

Thanks,
/Daniel</description>
		<content:encoded><![CDATA[<p>If the ASP.NET Session Id cookie is set to expire immediately on browser close, will this trigger the Session_End event on the server?</p>
<p>Thanks,<br />
/Daniel
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dalmo</title>
		<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-5509</link>
		<pubDate>Fri, 21 Sep 2007 14:26:04 +0000</pubDate>
		<guid>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-5509</guid>
					<description>Thanks a lot. Very useful this trick!!!!!!</description>
		<content:encoded><![CDATA[<p>Thanks a lot. Very useful this trick!!!!!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Vesy</title>
		<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-1722</link>
		<pubDate>Thu, 05 Apr 2007 17:55:17 +0000</pubDate>
		<guid>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-1722</guid>
					<description>Thanks for the advice about Domain and Path members.

I know that without setting expire date the cookie will behave like a &quot;session cookie&quot;. But the fact is that I'm setting the expiration date. The strange thing was that once I change the cookie value this expiration date is lost. So the steps are:

1) Create a cookie
2) Set cookie expiration date
3) Add cookie to Cookies collection

Then if you change the cookie value, the expiration date set in step 2 is lost and the cookie starts to behave like a &quot;session cookie&quot;.

That's why I'm saying above that &quot;everytime you change the cookie value, you need to set cookie expiration date too&quot;.

I hope this comment crerifies the misunderstanding.</description>
		<content:encoded><![CDATA[<p>Thanks for the advice about Domain and Path members.</p>
<p>I know that without setting expire date the cookie will behave like a &#8220;session cookie&#8221;. But the fact is that I&#8217;m setting the expiration date. The strange thing was that once I change the cookie value this expiration date is lost. So the steps are:</p>
<p>1) Create a cookie<br />
2) Set cookie expiration date<br />
3) Add cookie to Cookies collection</p>
<p>Then if you change the cookie value, the expiration date set in step 2 is lost and the cookie starts to behave like a &#8220;session cookie&#8221;.</p>
<p>That&#8217;s why I&#8217;m saying above that &#8220;everytime you change the cookie value, you need to set cookie expiration date too&#8221;.</p>
<p>I hope this comment crerifies the misunderstanding.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Georgi</title>
		<link>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-1717</link>
		<pubDate>Thu, 05 Apr 2007 12:52:34 +0000</pubDate>
		<guid>http://www.aspnettricks.com/archives/cookie-is-lost-when-browser-is-closed/#comment-1717</guid>
					<description>Cookie without expire date is &quot;session cookie&quot;. It acts the same way Session variables do. 

Consider also setting HttpCookie.Domain and  HttpCookie.Path members, because if you set cookie at www.domain.com, you might not be able to read it from https://secure.domain.com/</description>
		<content:encoded><![CDATA[<p>Cookie without expire date is &#8220;session cookie&#8221;. It acts the same way Session variables do. </p>
<p>Consider also setting HttpCookie.Domain and  HttpCookie.Path members, because if you set cookie at <a href='http://www.domain.com' rel='nofollow'>www.domain.com</a>, you might not be able to read it from <a href='https://secure.domain.com/' rel='nofollow'>https://secure.domain.com/</a>
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
