<?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: Compressed JavaScript</title>
	<atom:link href="http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/</link>
	<description>cat /dev/random</description>
	<lastBuildDate>Sat, 04 Jul 2009 08:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Magnolia</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-702177</link>
		<dc:creator>Magnolia</dc:creator>
		<pubDate>Thu, 27 Nov 2008 16:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-702177</guid>
		<description>A simple online javascript minifier can be found at http://netspurt.com
It is based on dojo&#039;s shrinksafe</description>
		<content:encoded><![CDATA[<p>A simple online javascript minifier can be found at <a href="http://netspurt.com" rel="nofollow">http://netspurt.com</a><br />
It is based on dojo&#8217;s shrinksafe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Hathaway</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-495196</link>
		<dc:creator>Neil Hathaway</dc:creator>
		<pubDate>Fri, 27 Jun 2008 20:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-495196</guid>
		<description>why not just make your js/css files minified from your editor during the build process, heres how in netbeans 6.1 ide.</description>
		<content:encoded><![CDATA[<p>why not just make your js/css files minified from your editor during the build process, heres how in netbeans 6.1 ide.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-484090</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Fri, 20 Jun 2008 20:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-484090</guid>
		<description>@Osama A. -

I think as long as mod_gzip caches the resulting files, then that&#039;s probably good enough.</description>
		<content:encoded><![CDATA[<p>@Osama A. -</p>
<p>I think as long as mod_gzip caches the resulting files, then that&#8217;s probably good enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Osama A.</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-482674</link>
		<dc:creator>Osama A.</dc:creator>
		<pubDate>Thu, 19 Jun 2008 19:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-482674</guid>
		<description>Hey,

Do you guys think there is a performance hit by using mod_gzip instead of this technique? Would pre-compression give any long-lasting performance improvements?

Or do you guys think that with the caching in mod_gzip it becomes irrelevant for static files like JS anyway because the server will only zip the first time and not onwards?

Your comments pls</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>Do you guys think there is a performance hit by using mod_gzip instead of this technique? Would pre-compression give any long-lasting performance improvements?</p>
<p>Or do you guys think that with the caching in mod_gzip it becomes irrelevant for static files like JS anyway because the server will only zip the first time and not onwards?</p>
<p>Your comments pls</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve rasmussen</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-403510</link>
		<dc:creator>steve rasmussen</dc:creator>
		<pubDate>Mon, 14 Apr 2008 23:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-403510</guid>
		<description>For those of you who can&#039;t get this to work here is some more detailed information.

.htaccess
RewriteEngine On
AddEncoding x-gzip .gz 
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]

This one will work on css and js files any file really, just gzip it and if it exists it will use it (unless the client is using safari).

To make this work you have to fix the mime records that apache uses. In httpd.conf comment the global setting that looks like this:

#AddType application/x-tar .tgz

Then you need to make sure that your &quot;AddEncoding x-gzip .gz&quot; directive will work by setting your directory to have &quot;AllowOverride All&quot;. Still in httpd.conf in my vhost I added:

        &lt;Directory /home/username/public_html&gt;
               AllowOverride All
        &lt;/Directory&gt;

If there are still problems edit mime.type and comment out the gzip line. Don&#039;t forget to restart apache. I hope this saves someone hours.</description>
		<content:encoded><![CDATA[<p>For those of you who can&#8217;t get this to work here is some more detailed information.</p>
<p>.htaccess<br />
RewriteEngine On<br />
AddEncoding x-gzip .gz<br />
RewriteCond %{HTTP:Accept-encoding} gzip<br />
RewriteCond %{HTTP_USER_AGENT} !Safari<br />
RewriteCond %{REQUEST_FILENAME}.gz -f<br />
RewriteRule ^(.*)$ $1.gz [QSA,L]</p>
<p>This one will work on css and js files any file really, just gzip it and if it exists it will use it (unless the client is using safari).</p>
<p>To make this work you have to fix the mime records that apache uses. In httpd.conf comment the global setting that looks like this:</p>
<p>#AddType application/x-tar .tgz</p>
<p>Then you need to make sure that your &#8220;AddEncoding x-gzip .gz&#8221; directive will work by setting your directory to have &#8220;AllowOverride All&#8221;. Still in httpd.conf in my vhost I added:</p>
<p>        &lt;Directory /home/username/public_html&gt;<br />
               AllowOverride All<br />
        &lt;/Directory&gt;</p>
<p>If there are still problems edit mime.type and comment out the gzip line. Don&#8217;t forget to restart apache. I hope this saves someone hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JoZ</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-401090</link>
		<dc:creator>JoZ</dc:creator>
		<pubDate>Thu, 10 Apr 2008 21:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-401090</guid>
		<description>The only problem I see with the suggested methods is that most rely on having the possibility to use .htaccess, a thing I cannot do on one hosting service I use... The solution more interesting for me was the first one proposed byKenrick, because it use a .php script but unfortunately the link to the script doesn&#039;t work anymore... :(</description>
		<content:encoded><![CDATA[<p>The only problem I see with the suggested methods is that most rely on having the possibility to use .htaccess, a thing I cannot do on one hosting service I use&#8230; The solution more interesting for me was the first one proposed byKenrick, because it use a .php script but unfortunately the link to the script doesn&#8217;t work anymore&#8230; :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-341205</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Wed, 30 Jan 2008 13:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-341205</guid>
		<description>@blogging developer - 

Thanks for pointing that one out.  Seems Javascript compression has been getting a lot of attention.</description>
		<content:encoded><![CDATA[<p>@blogging developer &#8211; </p>
<p>Thanks for pointing that one out.  Seems Javascript compression has been getting a lot of attention.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blogging developer</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-340218</link>
		<dc:creator>blogging developer</dc:creator>
		<pubDate>Tue, 29 Jan 2008 17:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-340218</guid>
		<description>Another free online tool for compressing javascript is &lt;a href=&quot;http://www.compressjavascript.com&quot; title=&quot;free online tool for compressing javascript&quot;&gt;http://www.compressjavascript.com&lt;/a&gt;

cheers,
blogging developer
</description>
		<content:encoded><![CDATA[<p>Another free online tool for compressing javascript is <a href="http://www.compressjavascript.com" title="free online tool for compressing javascript">http://www.compressjavascript.com</a></p>
<p>cheers,<br />
blogging developer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Here it comes</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-326152</link>
		<dc:creator>Here it comes</dc:creator>
		<pubDate>Sun, 13 Jan 2008 18:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-326152</guid>
		<description>I hope webmasters use this trick to compress js. It&#039;s really nervous to wait for 200kb &quot;AJAX2.0&quot; to load, even through SSL...</description>
		<content:encoded><![CDATA[<p>I hope webmasters use this trick to compress js. It&#8217;s really nervous to wait for 200kb &#8220;AJAX2.0&#8243; to load, even through SSL&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jenna Fox</title>
		<link>http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/comment-page-1/#comment-287435</link>
		<dc:creator>Jenna Fox</dc:creator>
		<pubDate>Tue, 27 Nov 2007 11:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/#comment-287435</guid>
		<description>There is a &quot;feature&quot; style bug in CFNetwork, which safari uses to download files like javascript, html, and so on. The short version is that it tries to force safari to download any url where the URL contains &quot;.gz&quot;, and that if such a url is referenced, like from a script tag, inside a html document, instead of decompressing it, it just doesn&#039;t. The javascript parser then tries to read the raw gzip binary, fails, and doom soon follows!

The work around is to simply not leave .gz in the filename. I call my compressed javascripts .jsgz and have the needed code in my .htaccess to tell apache that .jsgz files have the encoding of &#039;x-gzip&#039;, and the mime type of &#039;text/javascript&#039;. It works great. The bug has been reported to apple and members of the WebKit team are pushing for it to be fixed soon, but till then this workaround works and brings you the support of all the major browsers!</description>
		<content:encoded><![CDATA[<p>There is a &#8220;feature&#8221; style bug in CFNetwork, which safari uses to download files like javascript, html, and so on. The short version is that it tries to force safari to download any url where the URL contains &#8220;.gz&#8221;, and that if such a url is referenced, like from a script tag, inside a html document, instead of decompressing it, it just doesn&#8217;t. The javascript parser then tries to read the raw gzip binary, fails, and doom soon follows!</p>
<p>The work around is to simply not leave .gz in the filename. I call my compressed javascripts .jsgz and have the needed code in my .htaccess to tell apache that .jsgz files have the encoding of &#8216;x-gzip&#8217;, and the mime type of &#8216;text/javascript&#8217;. It works great. The bug has been reported to apple and members of the WebKit team are pushing for it to be fixed soon, but till then this workaround works and brings you the support of all the major browsers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
