<?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: Flushing the Document Early</title>
	<atom:link href="http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/</link>
	<description>Essential knowledge for making your web pages faster.</description>
	<lastBuildDate>Thu, 09 Sep 2010 03:45:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anentropic</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-2337</link>
		<dc:creator>Anentropic</dc:creator>
		<pubDate>Wed, 08 Sep 2010 10:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-2337</guid>
		<description>@bob
Apache doesn&#039;t necessarily send a chunk of content down to the client every time you call flush() from PHP... calling flush() just makes the content available to Apache, which may wait until it has a decent sized chunk to send.

I think this may be why you only see the flush() calls working like you expect when you sleep() after.

I could be wrong though, while since I did any PHP.</description>
		<content:encoded><![CDATA[<p>@bob<br />
Apache doesn&#8217;t necessarily send a chunk of content down to the client every time you call flush() from PHP&#8230; calling flush() just makes the content available to Apache, which may wait until it has a decent sized chunk to send.</p>
<p>I think this may be why you only see the flush() calls working like you expect when you sleep() after.</p>
<p>I could be wrong though, while since I did any PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Peters</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-2118</link>
		<dc:creator>Aaron Peters</dc:creator>
		<pubDate>Fri, 28 May 2010 07:48:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-2118</guid>
		<description>Only supported in Opera?
That&#039;s just too bad.

Yes, doing tests with this, with the objective to then implement it at a client (so they don&#039;t have to refactor the app).
Aborting now, due to lack of browser support :(

txs for reply</description>
		<content:encoded><![CDATA[<p>Only supported in Opera?<br />
That&#8217;s just too bad.</p>
<p>Yes, doing tests with this, with the objective to then implement it at a client (so they don&#8217;t have to refactor the app).<br />
Aborting now, due to lack of browser support :(</p>
<p>txs for reply</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-2115</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Thu, 27 May 2010 21:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-2115</guid>
		<description>@Aaron: Trailers are only supported in Opera: http://www.browserscope.org/?category=network&amp;v=top . Are you doing this just for testing? I&#039;m not surprised that PHP would not allow it. You could look at the Browserscope code for this test and see how it was done. Note: I didn&#039;t write that code so you&#039;ll have to talk to the creator for Q&amp;A.</description>
		<content:encoded><![CDATA[<p>@Aaron: Trailers are only supported in Opera: <a href="http://www.browserscope.org/?category=network&#038;v=top" rel="nofollow">http://www.browserscope.org/?category=network&#038;v=top</a> . Are you doing this just for testing? I&#8217;m not surprised that PHP would not allow it. You could look at the Browserscope code for this test and see how it was done. Note: I didn&#8217;t write that code so you&#8217;ll have to talk to the creator for Q&#038;A.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Peters</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-2113</link>
		<dc:creator>Aaron Peters</dc:creator>
		<pubDate>Thu, 27 May 2010 13:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-2113</guid>
		<description>All,

I&#039;d appreciate your help.

I have a case where the flush() works fine, but using the Trailer header does not. PHP throws the &quot;Cannot modify header information - headers already sent by&quot; error.

Test page: http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.php
Source code: http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.txt

Any tips is highly appreciated!

(Apache 2.2.8, PHP 5.2.4, mod_deflate is on)</description>
		<content:encoded><![CDATA[<p>All,</p>
<p>I&#8217;d appreciate your help.</p>
<p>I have a case where the flush() works fine, but using the Trailer header does not. PHP throws the &#8220;Cannot modify header information &#8211; headers already sent by&#8221; error.</p>
<p>Test page: <a href="http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.php" rel="nofollow">http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.php</a><br />
Source code: <a href="http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.txt" rel="nofollow">http://www.aaronpeters.nl/sandbox/centralpoint/flush/alex/test-no-smarty-trailer-header-2.txt</a></p>
<p>Any tips is highly appreciated!</p>
<p>(Apache 2.2.8, PHP 5.2.4, mod_deflate is on)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manjusha</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-1241</link>
		<dc:creator>Manjusha</dc:creator>
		<pubDate>Mon, 14 Dec 2009 19:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-1241</guid>
		<description>Excellent post! Can we have more posts on easy-to-fix back-end optimizations please? I just realized my website&#039;s time-to-first-byte is pretty high.</description>
		<content:encoded><![CDATA[<p>Excellent post! Can we have more posts on easy-to-fix back-end optimizations please? I just realized my website&#8217;s time-to-first-byte is pretty high.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Melvin</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-1066</link>
		<dc:creator>Melvin</dc:creator>
		<pubDate>Fri, 06 Nov 2009 13:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-1066</guid>
		<description>Steve, without Gzip the file gets flushed early, without even using flush();
Here&#039;s the page. http://tinyurl.com/yfbf7y2 please note that if you test more than once, you need to change the dates on the left, as the results gets cached in the SID.
Also here are some results from Firebug&#039;s &quot;NET&quot; tab that I found interesting http://tinyurl.com/yzmmfx6

Thanks!</description>
		<content:encoded><![CDATA[<p>Steve, without Gzip the file gets flushed early, without even using flush();<br />
Here&#8217;s the page. <a href="http://tinyurl.com/yfbf7y2" rel="nofollow">http://tinyurl.com/yfbf7y2</a> please note that if you test more than once, you need to change the dates on the left, as the results gets cached in the SID.<br />
Also here are some results from Firebug&#8217;s &#8220;NET&#8221; tab that I found interesting <a href="http://tinyurl.com/yzmmfx6" rel="nofollow">http://tinyurl.com/yzmmfx6</a></p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-1059</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Fri, 06 Nov 2009 00:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-1059</guid>
		<description>@Melvin: Test it without gzip and make sure you&#039;re sending enough data. If it still doesn&#039;t work, post a test URL and I&#039;ll take a look.</description>
		<content:encoded><![CDATA[<p>@Melvin: Test it without gzip and make sure you&#8217;re sending enough data. If it still doesn&#8217;t work, post a test URL and I&#8217;ll take a look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Melvin</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-1052</link>
		<dc:creator>Melvin</dc:creator>
		<pubDate>Thu, 05 Nov 2009 19:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-1052</guid>
		<description>Great info! But I&#039;m still out of luck. 
I use mod deflate and so I&#039;m using ob_flush(); followed by flush();. I&#039;ve tried placing it everywhere in the document! 
My Apache version is Apache/2.2.3 (CentOS) so I have set DeflateBufferSize 1. (setting 0 gave me an error that it has to be positive)
But this is still not flushing anything to the browser. I&#039;ve tried in Chrome and Firefox, and can clearly see nothing is flushed when inspecting Firebug. IE actually now takes 5 times as long!

Is there a solution, or am I doomed to never being able to use mod deflate?
Strangely, before using mod_deflate, the content would flush automatically without a flush() command in the code...

Thanks Steve, your advice as well as your tools are such a great help!</description>
		<content:encoded><![CDATA[<p>Great info! But I&#8217;m still out of luck.<br />
I use mod deflate and so I&#8217;m using ob_flush(); followed by flush();. I&#8217;ve tried placing it everywhere in the document!<br />
My Apache version is Apache/2.2.3 (CentOS) so I have set DeflateBufferSize 1. (setting 0 gave me an error that it has to be positive)<br />
But this is still not flushing anything to the browser. I&#8217;ve tried in Chrome and Firefox, and can clearly see nothing is flushed when inspecting Firebug. IE actually now takes 5 times as long!</p>
<p>Is there a solution, or am I doomed to never being able to use mod deflate?<br />
Strangely, before using mod_deflate, the content would flush automatically without a flush() command in the code&#8230;</p>
<p>Thanks Steve, your advice as well as your tools are such a great help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-802</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Tue, 15 Sep 2009 16:51:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-802</guid>
		<description>Does anyone know why I can only flush() in PHP if I sleep() afterwards?  Currently, my site looks better but actually loads more slowly.</description>
		<content:encoded><![CDATA[<p>Does anyone know why I can only flush() in PHP if I sleep() afterwards?  Currently, my site looks better but actually loads more slowly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2009/05/18/flushing-the-document-early/comment-page-1/#comment-697</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Sat, 11 Jul 2009 13:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=386#comment-697</guid>
		<description>The addition of Chunked Encoding to HTTP/1.1 specifies how the server can indicate the end of the response. In &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1&quot; rel=&quot;nofollow&quot;&gt;section 3.6.1&lt;/a&gt; it says &quot;The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line.&quot;

And just to clarify, HTTP/1.1 uses persistent connections by default, not Keep-Alive.</description>
		<content:encoded><![CDATA[<p>The addition of Chunked Encoding to HTTP/1.1 specifies how the server can indicate the end of the response. In <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1" rel="nofollow">section 3.6.1</a> it says &#8220;The chunked encoding is ended by any chunk whose size is zero, followed by the trailer, which is terminated by an empty line.&#8221;</p>
<p>And just to clarify, HTTP/1.1 uses persistent connections by default, not Keep-Alive.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
