<?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: Prevent debug info from messing with your AJAX responses</title>
	<atom:link href="http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/feed/" rel="self" type="application/rss+xml" />
	<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 09:32:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10554</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10554</guid>
		<description>@ADmad  

Yep, I did mention that in the update at the top.
The debug kit, is great... I wish it would work better in IE, because it causes some JS errors, which cross-browser testing a little more complicated.</description>
		<content:encoded><![CDATA[<p>@ADmad  </p>
<p>Yep, I did mention that in the update at the top.<br />
The debug kit, is great&#8230; I wish it would work better in IE, because it causes some JS errors, which cross-browser testing a little more complicated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ADmad</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10552</link>
		<dc:creator>ADmad</dc:creator>
		<pubDate>Sun, 29 Aug 2010 09:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10552</guid>
		<description>The timestamp echoing has been removed altogether in 1.3.3. If one needs timestamps just use the awesome DebugKit.</description>
		<content:encoded><![CDATA[<p>The timestamp echoing has been removed altogether in 1.3.3. If one needs timestamps just use the awesome DebugKit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10257</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Sat, 19 Jun 2010 21:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10257</guid>
		<description>@jblotus

Thank you. Fixed-up.</description>
		<content:encoded><![CDATA[<p>@jblotus</p>
<p>Thank you. Fixed-up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jblotus</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10256</link>
		<dc:creator>jblotus</dc:creator>
		<pubDate>Sat, 19 Jun 2010 18:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10256</guid>
		<description>hey quick note your code in the first example is missing a closing brace
if (Configure::read() &gt; 0) {
      if (!env(&#039;HTTP_X_REQUESTED_WITH&#039;) === &quot;XMLHttpRequest&quot;) {
         echo &quot;&lt;!-- &quot; . round(getMicrotime() - $TIME_START, 4) . &quot;s --&gt;&quot;;
     }
}</description>
		<content:encoded><![CDATA[<p>hey quick note your code in the first example is missing a closing brace<br />
if (Configure::read() > 0) {<br />
      if (!env(&#8216;HTTP_X_REQUESTED_WITH&#8217;) === &#8220;XMLHttpRequest&#8221;) {<br />
         echo &#8220;<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->&#8220;;<br />
     }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10255</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Sun, 13 Jun 2010 22:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10255</guid>
		<description>Like Andy I have also used the RequestHandler in the beforeFilter of the AppController to set layout to false and debug 0.  It works to disable the comment but it also disabled debug which can be frustrating. I like your method because it removes the comment but still allows debug ;) Good job!</description>
		<content:encoded><![CDATA[<p>Like Andy I have also used the RequestHandler in the beforeFilter of the AppController to set layout to false and debug 0.  It works to disable the comment but it also disabled debug which can be frustrating. I like your method because it removes the comment but still allows debug ;) Good job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonie</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10254</link>
		<dc:creator>tonie</dc:creator>
		<pubDate>Mon, 24 May 2010 20:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10254</guid>
		<description>Yay! Congrats on the new design (liked the old one better lol j/k). Nice article as always, thanks.</description>
		<content:encoded><![CDATA[<p>Yay! Congrats on the new design (liked the old one better lol j/k). Nice article as always, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JamesF</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10253</link>
		<dc:creator>JamesF</dc:creator>
		<pubDate>Sat, 15 May 2010 19:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10253</guid>
		<description>@teknoid

I wasn&#039;t even thinking about the DRY part. So many times in cake i end up writing functions to avoid violating DRY, and I only end up using it once, and I spent three times as long on it. I guess I need to get better at planning what things I might use more than once.</description>
		<content:encoded><![CDATA[<p>@teknoid</p>
<p>I wasn&#8217;t even thinking about the DRY part. So many times in cake i end up writing functions to avoid violating DRY, and I only end up using it once, and I spent three times as long on it. I guess I need to get better at planning what things I might use more than once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10252</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Sat, 15 May 2010 19:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10252</guid>
		<description>@Andy

What is $this-&gt;isAjax()? (You probably meant $this-&gt;RequestHandler-&gt;isAjax())...
Also, I don&#039;t see how that is more cake... to me app controller has other stuff to &quot;worry&quot; about.

@Jason

It&#039;s the same in case of &#039;debug&#039;. (That&#039;s what Configure::read() defaults to).

@JamesF

Not very DRY, other suggestions listed here are at least keeping the code from repeating itself over and over (especially when you have many ajax methods).</description>
		<content:encoded><![CDATA[<p>@Andy</p>
<p>What is $this->isAjax()? (You probably meant $this->RequestHandler->isAjax())&#8230;<br />
Also, I don&#8217;t see how that is more cake&#8230; to me app controller has other stuff to &#8220;worry&#8221; about.</p>
<p>@Jason</p>
<p>It&#8217;s the same in case of &#8216;debug&#8217;. (That&#8217;s what Configure::read() defaults to).</p>
<p>@JamesF</p>
<p>Not very DRY, other suggestions listed here are at least keeping the code from repeating itself over and over (especially when you have many ajax methods).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10251</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Sat, 15 May 2010 19:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10251</guid>
		<description>@Daniel Hofstetter

That timestamp is really not necessary, IMO... but it is there for now. So that&#039;s one way to avoid having it during AJAX response.
As far as other output, I believe RequestHandler outputs it properly, at least I never get that timestamp with XML or otherwise.</description>
		<content:encoded><![CDATA[<p>@Daniel Hofstetter</p>
<p>That timestamp is really not necessary, IMO&#8230; but it is there for now. So that&#8217;s one way to avoid having it during AJAX response.<br />
As far as other output, I believe RequestHandler outputs it properly, at least I never get that timestamp with XML or otherwise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoid</title>
		<link>http://nuts-and-bolts-of-cakephp.com/2010/05/14/prevent-debug-info-from-messing-with-your-ajax-response/#comment-10250</link>
		<dc:creator>teknoid</dc:creator>
		<pubDate>Sat, 15 May 2010 19:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://teknoid.wordpress.com/?p=972#comment-10250</guid>
		<description>@Nick

To me that&#039;s extra code in the layout, which is not necessary.
Also, ajax.ctp may not be the only layout you use, but that largely depends on your app.</description>
		<content:encoded><![CDATA[<p>@Nick</p>
<p>To me that&#8217;s extra code in the layout, which is not necessary.<br />
Also, ajax.ctp may not be the only layout you use, but that largely depends on your app.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

