<rss version="2.0">
		<channel>
			<title>Slicehost Forum - Getting nginx to gzip rails javascript files</title>
			<lastBuildDate>Thu, 09 Sep 2010 18:40:52 +0000</lastBuildDate>
			<link>http://forum.slicehost.com/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.1.8</generator>
			<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11002#Comment_11002</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11002#Comment_11002</guid>
		<pubDate>Mon, 26 May 2008 14:42:00 +0000</pubDate>
		<author>mick</author>
		<description>
			<![CDATA[	<p>Hi,<br />
I&#8217;ve been trying for the last couple of hours to get nginx to gzip compress javascript files being returned from mongrel.</p>

	<p>The files have mime type application/x-javascript.</p>

	<p>Below is a snippet from my nginx config:</p>

<pre><code>gzip  on;
gzip_http_version 1.0;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# make sure gzip does not lose large gzipped js or css files
# see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
gzip_buffers 16 8k;
</code></pre>

	<p>I&#8217;d really appreciate any pointers. I&#8217;ve searched the web for answers to no avail.</p>

	<p>thanks,<br />
mick</p>]]>
		</description>
	</item>
	<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11003#Comment_11003</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11003#Comment_11003</guid>
		<pubDate>Mon, 26 May 2008 15:09:14 +0000</pubDate>
		<author>mick</author>
		<description>
			<![CDATA[BTW: I'm having the same problem with other types of files (e.g. css ) as well.]]>
		</description>
	</item>
	<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11005#Comment_11005</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11005#Comment_11005</guid>
		<pubDate>Mon, 26 May 2008 15:59:39 +0000</pubDate>
		<author>mick</author>
		<description>
			<![CDATA[I believe I've narrowed it down to the fact that files which are not being gzipped have the following in their header:<br /><br />Accept-Ranges:	 bytes<br /><br />It makes sense that such files are not gzipped since that would make range based access difficult/impossible.<br /><br />I think I now just need to work out why Accept-Ranges is set for some, but not all, files. Any hints?<br /><br />thanks,<br />mick]]>
		</description>
	</item>
	<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11024#Comment_11024</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=11024#Comment_11024</guid>
		<pubDate>Mon, 26 May 2008 23:31:22 +0000</pubDate>
		<author>mick</author>
		<description>
			<![CDATA[Problem Solved:<br /><br />Turned out it was the browser caching things that was mucking me around. I had earlier gotten expiries working, and then went on to get gzip working. The files were not appearing to be gzipped as they were already cached by the browser (due to the expiries). When I manually cleared the browser cache, the files came down gzipped. Oops!<br /><br />Maybe I should use curl rather than a browser for such work in the future ...<br /><br />thanks for listening,<br />mick]]>
		</description>
	</item>
	<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=19870#Comment_19870</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=19870#Comment_19870</guid>
		<pubDate>Mon, 11 May 2009 13:02:59 +0000</pubDate>
		<author>railsninja</author>
		<description>
			<![CDATA[Thanks for posting the reason, that exact same thing was just tripping me up and prompted me to do a hard refresh on the server I was just setting up and BHAM, all was well. Thanks.]]>
		</description>
	</item>
	<item>
		<title>Getting nginx to gzip rails javascript files</title>
		<link>http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=24448#Comment_24448</link>
		<guid isPermaLink="false">http://forum.slicehost.com/comments.php?DiscussionID=1861&amp;Focus=24448#Comment_24448</guid>
		<pubDate>Wed, 07 Apr 2010 19:30:36 +0000</pubDate>
		<author>ed</author>
		<description>
			<![CDATA[:)]]>
		</description>
	</item>
	
		</channel>
	</rss>