<?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: Compress CSS on the fly</title>
	<atom:link href="http://grupenet.com/2007/10/01/compress-css-on-the-fly/feed/" rel="self" type="application/rss+xml" />
	<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/</link>
	<description>Software tips and tricks</description>
	<lastBuildDate>Sat, 05 Nov 2011 23:18:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Tony</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1378</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Mon, 21 Feb 2011 15:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1378</guid>
		<description>I had a problem using firebug with files compressed this way.</description>
		<content:encoded><![CDATA[<p>I had a problem using firebug with files compressed this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mario</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1316</link>
		<dc:creator>mario</dc:creator>
		<pubDate>Tue, 16 Feb 2010 14:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1316</guid>
		<description>code thanks admin..</description>
		<content:encoded><![CDATA[<p>code thanks admin..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1290</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 28 Oct 2009 20:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1290</guid>
		<description>I recently built a mod_perl output filter which runs inside Apache. It intercepts requests for .css files and compresses them on the fly. It doesn&#039;t mess with any cache headers. See here:

&lt;a href=&quot;https://secure.grepular.com/blog/index.php/2009/10/28/compressing-css-on-the-fly/&quot; rel=&quot;nofollow&quot;&gt;Compressing CSS on the Fly&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I recently built a mod_perl output filter which runs inside Apache. It intercepts requests for .css files and compresses them on the fly. It doesn&#8217;t mess with any cache headers. See here:</p>
<p><a href="https://secure.grepular.com/blog/index.php/2009/10/28/compressing-css-on-the-fly/" rel="nofollow">Compressing CSS on the Fly</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KTB</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1257</link>
		<dc:creator>KTB</dc:creator>
		<pubDate>Tue, 31 Mar 2009 20:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1257</guid>
		<description>Heres a even simpler method to save a huge amount of bandwith:

# A Week Expires header from askapache

Header set Cache-Control &quot;max-age=604800, public&quot;

# compress all files from :http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

SetOutputFilter DEFLATE

#Etags From: http://httpd.apache.org/docs/2.2/mod/core.html#fileetag
FileETag MTime Size

I love this one^^</description>
		<content:encoded><![CDATA[<p>Heres a even simpler method to save a huge amount of bandwith:</p>
<p># A Week Expires header from askapache</p>
<p>Header set Cache-Control &#8220;max-age=604800, public&#8221;</p>
<p># compress all files from :<a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/" rel="nofollow">http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/</a></p>
<p>SetOutputFilter DEFLATE</p>
<p>#Etags From: <a href="http://httpd.apache.org/docs/2.2/mod/core.html#fileetag" rel="nofollow">http://httpd.apache.org/docs/2.2/mod/core.html#fileetag</a><br />
FileETag MTime Size</p>
<p>I love this one^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1198</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Thu, 30 Oct 2008 23:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1198</guid>
		<description>In my experience compressing the css does make it a little lighter, but if done dynamically it actually takes a little more time to get to the browser client because of the overhead removing the whitespace.

To make it cacheable you can configure your apache to add an expires header or do it by sending the header using PHP as passerby said.

I decided not to use ob_start method because it actually made it slower for the browser to get it (~110ms compressing vs. ~75ms natural) what i did do was to generate one whole big CSS file from several files to reduce the number of requests made to the server.

If you still want to compress your CSS dynamically I found a better function at http://php.oregonstate.edu/manual/en/function.php-strip-whitespace.php (look in the comments).</description>
		<content:encoded><![CDATA[<p>In my experience compressing the css does make it a little lighter, but if done dynamically it actually takes a little more time to get to the browser client because of the overhead removing the whitespace.</p>
<p>To make it cacheable you can configure your apache to add an expires header or do it by sending the header using PHP as passerby said.</p>
<p>I decided not to use ob_start method because it actually made it slower for the browser to get it (~110ms compressing vs. ~75ms natural) what i did do was to generate one whole big CSS file from several files to reduce the number of requests made to the server.</p>
<p>If you still want to compress your CSS dynamically I found a better function at <a href="http://php.oregonstate.edu/manual/en/function.php-strip-whitespace.php" rel="nofollow">http://php.oregonstate.edu/manual/en/function.php-strip-whitespace.php</a> (look in the comments).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Comprimiendo con PHP el cÃ³digo de tu hoja estilos CSS dinÃ¡micamente - elWebmaster.com</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-1139</link>
		<dc:creator>Comprimiendo con PHP el cÃ³digo de tu hoja estilos CSS dinÃ¡micamente - elWebmaster.com</dc:creator>
		<pubDate>Fri, 01 Aug 2008 17:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-1139</guid>
		<description>[...] Fuente: GrupeNet [...]</description>
		<content:encoded><![CDATA[<p>[...] Fuente: GrupeNet [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: passerby</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-840</link>
		<dc:creator>passerby</dc:creator>
		<pubDate>Thu, 24 Jan 2008 04:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-840</guid>
		<description>This is a great suggestion and works awesome. If you implement the PHP header expires function you can cache the css file for as long as you like.

$offset = 60 * 60 * 24 * 1;
header(&quot;Expires: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;, time() + $offset) . &quot; GMT&quot;);

That would make the css file cached for about 2 days. You can adjust that as needed. Have a good day. :)</description>
		<content:encoded><![CDATA[<p>This is a great suggestion and works awesome. If you implement the PHP header expires function you can cache the css file for as long as you like.</p>
<p>$offset = 60 * 60 * 24 * 1;<br />
header(&#8220;Expires: &#8221; . gmdate(&#8220;D, d M Y H:i:s&#8221;, time() + $offset) . &#8221; GMT&#8221;);</p>
<p>That would make the css file cached for about 2 days. You can adjust that as needed. Have a good day. <img src='http://grupenet.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared Schwager</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-783</link>
		<dc:creator>Jared Schwager</dc:creator>
		<pubDate>Wed, 21 Nov 2007 14:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-783</guid>
		<description>Karol Krizka, I actually removed the code from my website after reading the &lt;a href=&quot;http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-617&quot; rel=&quot;nofollow&quot;&gt;points that Rithiur made&lt;/a&gt;.

I may try my hand at making a script that will compress HTML also, but I&#039;m still learning about how to use regex in PHP. It can get quite confusing at times.</description>
		<content:encoded><![CDATA[<p>Karol Krizka, I actually removed the code from my website after reading the <a href="http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-617" rel="nofollow">points that Rithiur made</a>.</p>
<p>I may try my hand at making a script that will compress HTML also, but I&#8217;m still learning about how to use regex in PHP. It can get quite confusing at times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karol Krizka</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-782</link>
		<dc:creator>Karol Krizka</dc:creator>
		<pubDate>Tue, 20 Nov 2007 21:07:22 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-782</guid>
		<description>Hmm, your example does not seem to work here. But nevertheless, it is a very good idea. Also implementing the changes that Rithiur recommended would be a good addition. Finally you should be able to compress your HTML code in a similar way, no? What do you think?</description>
		<content:encoded><![CDATA[<p>Hmm, your example does not seem to work here. But nevertheless, it is a very good idea. Also implementing the changes that Rithiur recommended would be a good addition. Finally you should be able to compress your HTML code in a similar way, no? What do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared Schwager</title>
		<link>http://grupenet.com/2007/10/01/compress-css-on-the-fly/comment-page-1/#comment-628</link>
		<dc:creator>Jared Schwager</dc:creator>
		<pubDate>Mon, 22 Oct 2007 16:23:52 +0000</pubDate>
		<guid isPermaLink="false">http://grupenet.com/2007/10/01/compress-css-on-the-fly/#comment-628</guid>
		<description>Rithiur, I can&#039;t believe I hadn&#039;t thought of that before. Great point! I&#039;ve definitely learned a couple new things today. I&#039;m somewhat new to PHP, so thanks for the pointers!</description>
		<content:encoded><![CDATA[<p>Rithiur, I can&#8217;t believe I hadn&#8217;t thought of that before. Great point! I&#8217;ve definitely learned a couple new things today. I&#8217;m somewhat new to PHP, so thanks for the pointers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

