<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Rails Cookie Detection</title>
	<atom:link href="http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/feed/" rel="self" type="application/rss+xml" />
	<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/</link>
	<description>Building Blocks &#038; Learning Experiences</description>
	<lastBuildDate>Fri, 14 May 2010 05:40:38 -0600</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Art</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-5077</link>
		<dc:creator>Art</dc:creator>
		<pubDate>Mon, 19 Oct 2009 15:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-5077</guid>
		<description>Is this the way handle cookies-disabled cookies user and told them to enabled it or make rails work without cookies ?

And what is request.cookies[&quot;_session_id&quot;] anyway ? is it cookies ? session ? or what ?

Thanks,</description>
		<content:encoded><![CDATA[<p>Is this the way handle cookies-disabled cookies user and told them to enabled it or make rails work without cookies ?</p>
<p>And what is request.cookies["_session_id"] anyway ? is it cookies ? session ? or what ?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ClearCove &#187; Blog Archive &#187; Recipe: Detect whether cookies are enabled in rails</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-4946</link>
		<dc:creator>ClearCove &#187; Blog Archive &#187; Recipe: Detect whether cookies are enabled in rails</dc:creator>
		<pubDate>Wed, 30 Sep 2009 03:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-4946</guid>
		<description>[...] recipe works as of Rails 2.3 (new cookie handling). It is inspired by this article. The recipe in the original article does not work with newer versions of rails. So I updated it and [...]</description>
		<content:encoded><![CDATA[<p>[...] recipe works as of Rails 2.3 (new cookie handling). It is inspired by this article. The recipe in the original article does not work with newer versions of rails. So I updated it and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ericw</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-4329</link>
		<dc:creator>ericw</dc:creator>
		<pubDate>Thu, 13 Aug 2009 20:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-4329</guid>
		<description>@wn: Because the cookies_test method is defined in ApplicationController (an &quot;abstract&quot; controller), it can be called as an action on any controller in your application (like the Foo controller to which I alluded.)  So no, that is not a mistake.

Your last statement isn&#039;t a question, but I think to answer it, yes, it does set the cookie, but your server won&#039;t receive the cookie until after the redirect, that&#039;s why we need the redirect at all.

e.</description>
		<content:encoded><![CDATA[<p>@wn: Because the cookies_test method is defined in ApplicationController (an &#8220;abstract&#8221; controller), it can be called as an action on any controller in your application (like the Foo controller to which I alluded.)  So no, that is not a mistake.</p>
<p>Your last statement isn&#8217;t a question, but I think to answer it, yes, it does set the cookie, but your server won&#8217;t receive the cookie until after the redirect, that&#8217;s why we need the redirect at all.</p>
<p>e.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wn</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-4300</link>
		<dc:creator>wn</dc:creator>
		<pubDate>Tue, 11 Aug 2009 16:51:39 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-4300</guid>
		<description>Hi,
(using rails 2.3.2)
Question, in the application controller you have a method 
cookies_test and in cookies_required you do a call to
...
redirect_to(:controller =&gt; &quot;foo&quot;, :action =&gt; &quot;cookies_test&quot;)
...

What should cookies_test in controller foo do ? Or is this a mistake
and it should read 
...
redirect_to(:controller =&gt; &quot;application&quot;, :action =&gt; &quot;cookies_test&quot;)
...

Or I am missing something ? 
Question, on the very first page visit, the browser doesn&#039;t set the cookie.
It merely redirects.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
(using rails 2.3.2)<br />
Question, in the application controller you have a method<br />
cookies_test and in cookies_required you do a call to<br />
&#8230;<br />
redirect_to(:controller =&gt; &#8220;foo&#8221;, :action =&gt; &#8220;cookies_test&#8221;)<br />
&#8230;</p>
<p>What should cookies_test in controller foo do ? Or is this a mistake<br />
and it should read<br />
&#8230;<br />
redirect_to(:controller =&gt; &#8220;application&#8221;, :action =&gt; &#8220;cookies_test&#8221;)<br />
&#8230;</p>
<p>Or I am missing something ?<br />
Question, on the very first page visit, the browser doesn&#8217;t set the cookie.<br />
It merely redirects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ericw</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-398</link>
		<dc:creator>ericw</dc:creator>
		<pubDate>Wed, 01 Oct 2008 15:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-398</guid>
		<description>The article mentioned in the comment above, while it does misstate how my solution works, does find an alternative solution, that is likely to be better and faster.  You should check it out.

e.</description>
		<content:encoded><![CDATA[<p>The article mentioned in the comment above, while it does misstate how my solution works, does find an alternative solution, that is likely to be better and faster.  You should check it out.</p>
<p>e.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Puerto Rican Rails Dude &#187; Blog Archive &#187; Quick and Dirty Browser Cookie Testing</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-397</link>
		<dc:creator>The Puerto Rican Rails Dude &#187; Blog Archive &#187; Quick and Dirty Browser Cookie Testing</dc:creator>
		<pubDate>Wed, 01 Oct 2008 02:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-397</guid>
		<description>[...] I decided to implement a redirect, thanks to ideas given by this blog post. It worked, but it left me with a parameter in my URL the first time the user visited the site. It [...]</description>
		<content:encoded><![CDATA[<p>[...] I decided to implement a redirect, thanks to ideas given by this blog post. It worked, but it left me with a parameter in my URL the first time the user visited the site. It [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-15</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 16 Oct 2007 08:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-15</guid>
		<description>I couldn&#039;t understand some parts of this article Rails Cookie Detection, but I guess I just need to check some more resources regarding this, because it sounds interesting.</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t understand some parts of this article Rails Cookie Detection, but I guess I just need to check some more resources regarding this, because it sounds interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ericw</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-12</link>
		<dc:creator>ericw</dc:creator>
		<pubDate>Fri, 05 Oct 2007 14:28:07 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-12</guid>
		<description>Let me explain more fully then.

With the original solution, a GET parameter was used.  So when a user first came to your site, a cookie would be set on their browser, and they would be redirected to test for the existence of that cookie.  The page they were redirected to would have a URL like this: http://kill-0.com/?cookie_detect=true.  Now, let&#039;s say they bookmarked that page.  Then they cleared their cookies, or you restarted your server, or just cleared your server sessions out.  When the user returns to that bookmark, the original solution will see that GET parameter (?cookie_detect=true), but not the cookie that is supposed to be with it.  This will cause the site to assume the user does not have cookies enabled.  It will then redirect the user to a page saying as much.  Because my design does not use a GET parameter, there is no threat of that happening.

Does that make it clearer?

e.</description>
		<content:encoded><![CDATA[<p>Let me explain more fully then.</p>
<p>With the original solution, a GET parameter was used.  So when a user first came to your site, a cookie would be set on their browser, and they would be redirected to test for the existence of that cookie.  The page they were redirected to would have a URL like this: <a href="http://kill-0.com/?cookie_detect=true" rel="nofollow">http://kill-0.com/?cookie_detect=true</a>.  Now, let&#8217;s say they bookmarked that page.  Then they cleared their cookies, or you restarted your server, or just cleared your server sessions out.  When the user returns to that bookmark, the original solution will see that GET parameter (?cookie_detect=true), but not the cookie that is supposed to be with it.  This will cause the site to assume the user does not have cookies enabled.  It will then redirect the user to a page saying as much.  Because my design does not use a GET parameter, there is no threat of that happening.</p>
<p>Does that make it clearer?</p>
<p>e.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rochkind</title>
		<link>http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/comment-page-1/#comment-11</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Thu, 04 Oct 2007 14:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://kill-0.com/duplo/2007/07/12/rails-cookie-detection/#comment-11</guid>
		<description>This is interesting, I found your page on google when looking for a good solution to this problem. 

I don&#039;t entirely understand your solution, or what your solution has over your original attempt? How does it fix the &quot;server restart or deleted sessions&quot; problem you first identify? I don&#039;t really understand. More explanation would be welcome!</description>
		<content:encoded><![CDATA[<p>This is interesting, I found your page on google when looking for a good solution to this problem. </p>
<p>I don&#8217;t entirely understand your solution, or what your solution has over your original attempt? How does it fix the &#8220;server restart or deleted sessions&#8221; problem you first identify? I don&#8217;t really understand. More explanation would be welcome!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
