<?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 for Javascriptguy&#039;s blog</title>
	<atom:link href="http://jsguy.com/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://jsguy.com</link>
	<description>So much javascript, so little time</description>
	<lastBuildDate>Fri, 28 May 2010 23:28:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Long poll jsonp by admin</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-1009</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 28 May 2010 23:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-1009</guid>
		<description>Are you suggesting that php automatically opens a mysql connection each time?</description>
		<content:encoded><![CDATA[<p>Are you suggesting that php automatically opens a mysql connection each time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by chx</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-968</link>
		<dc:creator>chx</dc:creator>
		<pubDate>Fri, 28 May 2010 02:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-968</guid>
		<description>Be careful with this -- you might pile up a ton of MySQL connections and each connection uses some MySQL buffers... you might want to close the MySQL connection before sleeping.</description>
		<content:encoded><![CDATA[<p>Be careful with this &#8212; you might pile up a ton of MySQL connections and each connection uses some MySQL buffers&#8230; you might want to close the MySQL connection before sleeping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by Julian</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-726</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Sat, 22 May 2010 19:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-726</guid>
		<description>Glad I could help :)</description>
		<content:encoded><![CDATA[<p>Glad I could help <img src='http://jsguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by admin</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-696</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 22 May 2010 04:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-696</guid>
		<description>Excellent - the loading spinner is gone, thanks very much for updating your script! :)</description>
		<content:encoded><![CDATA[<p>Excellent &#8211; the loading spinner is gone, thanks very much for updating your script! <img src='http://jsguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by admin</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-695</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 22 May 2010 04:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-695</guid>
		<description>Great idea Akeru! I&#039;ve updated the chat.php file, it now has a configurable timeout - I&#039;ve set it to a low value, (25sec), as that seems the most common value on shared hosts, you can of course set it much higher on your own host.</description>
		<content:encoded><![CDATA[<p>Great idea Akeru! I&#8217;ve updated the chat.php file, it now has a configurable timeout &#8211; I&#8217;ve set it to a low value, (25sec), as that seems the most common value on shared hosts, you can of course set it much higher on your own host.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by Julian</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-671</link>
		<dc:creator>Julian</dc:creator>
		<pubDate>Fri, 21 May 2010 16:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-671</guid>
		<description>Just popping in to point out jQuery-JSONP 2.x has been released. The new implementation should limit the loading indicator problem.

Nice to see the plugin in use :)</description>
		<content:encoded><![CDATA[<p>Just popping in to point out jQuery-JSONP 2.x has been released. The new implementation should limit the loading indicator problem.</p>
<p>Nice to see the plugin in use <img src='http://jsguy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by Akeru</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-416</link>
		<dc:creator>Akeru</dc:creator>
		<pubDate>Fri, 14 May 2010 20:15:29 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-416</guid>
		<description>Thanks ! I played a bit with it today. Had no problem running the demo but ran into some issues.

The first one is that the mtime is not accurate enough (2secs) so I sometimes got 3,4 times the same message until I changed the usleep to a longer value. 

By playing a bit with the ts parameter before is was received (using TamperData, or such) I was able to create an infinite loop of refresh, so the ts field might not be a good idea. Use maybe session for that.

I also think it is a better idea to use another domain for longpolling only and send the message to the main domain. Sending should be fast and should not be hindered by waiting polls.

There should also be a way to end nicely the loop after some times (less than the specified JS timeout) because on your demo, my browsers (safari and firefox) both ends up with more than one long polling running. So, adding something like 

$started = time();
while (... &amp;&amp; (time() - $started) &lt; 60) { ... }
echo json_encode(....);

Would prevent memory leaks and ends nicely the query before starting a new one.

Anyway, thanks for the proof of concept !</description>
		<content:encoded><![CDATA[<p>Thanks ! I played a bit with it today. Had no problem running the demo but ran into some issues.</p>
<p>The first one is that the mtime is not accurate enough (2secs) so I sometimes got 3,4 times the same message until I changed the usleep to a longer value. </p>
<p>By playing a bit with the ts parameter before is was received (using TamperData, or such) I was able to create an infinite loop of refresh, so the ts field might not be a good idea. Use maybe session for that.</p>
<p>I also think it is a better idea to use another domain for longpolling only and send the message to the main domain. Sending should be fast and should not be hindered by waiting polls.</p>
<p>There should also be a way to end nicely the loop after some times (less than the specified JS timeout) because on your demo, my browsers (safari and firefox) both ends up with more than one long polling running. So, adding something like </p>
<p>$started = time();<br />
while (&#8230; &amp;&amp; (time() &#8211; $started) &lt; 60) { &#8230; }<br />
echo json_encode(&#8230;.);</p>
<p>Would prevent memory leaks and ends nicely the query before starting a new one.</p>
<p>Anyway, thanks for the proof of concept !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by admin</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-408</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 14 May 2010 07:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-408</guid>
		<description>You bet, &lt;a href=&quot;http://jsguy.com/labs/longpolljsonp.zip&quot; rel=&quot;nofollow&quot;&gt;uploaded it here&lt;/a&gt;, let me know if you have problems, or any good ideas!</description>
		<content:encoded><![CDATA[<p>You bet, <a href="http://jsguy.com/labs/longpolljsonp.zip" rel="nofollow">uploaded it here</a>, let me know if you have problems, or any good ideas!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Long poll jsonp by Akeru</title>
		<link>http://jsguy.com/?p=103&#038;cpage=1#comment-404</link>
		<dc:creator>Akeru</dc:creator>
		<pubDate>Thu, 13 May 2010 19:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://jsguy.com/?p=103#comment-404</guid>
		<description>Nice article ! Could you provide a zip file with the JS and PHP code to download, so I could play a bit with the concept ?</description>
		<content:encoded><![CDATA[<p>Nice article ! Could you provide a zip file with the JS and PHP code to download, so I could play a bit with the concept ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
