<?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"
	>
<channel>
	<title>Comments on: Automatic asset versioning in Django</title>
	<atom:link href="http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/feed/" rel="self" type="application/rss+xml" />
	<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/</link>
	<description>the personal blog of Stuart Colville covering modern web development techniques and best practices</description>
	<pubDate>Fri, 29 Aug 2008 07:55:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Lukasz Korzybski</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64389</link>
		<dc:creator>Lukasz Korzybski</dc:creator>
		<pubDate>Tue, 10 Jun 2008 20:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64389</guid>
		<description>Great stuff, thanks a lot :)

One note thought: 

Atually as Steve pointed out in his comment to &lt;a href="http://developer.yahoo.net/blog/archives/2007/05/high_performanc_2.html" rel="nofollow"&gt;High Performance Web Sites: Rule 3 - Add an Expires Header&lt;/a&gt; the HTTP 1.1 specs says that URLs with query strings should not be cached only when there is no explicit expiration information:

From HTTP 1.1 spec, section 13.9:
&lt;cite&gt;
e note one exception to this rule: since some applications have
   traditionally used GETs and HEADs with query URLs (those containing a
   "?" in the rel_path part) to perform operations with significant side
   effects, caches MUST NOT treat responses to such URIs as fresh unless
   the server provides an explicit expiration time.
&lt;/cite&gt;

Also, RoR have some kind of template tag for auto versioning and it uses QS as far as I know.

 - Lukasz</description>
		<content:encoded><![CDATA[<p>Great stuff, thanks a lot <img src='http://muffinresearch.co.uk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One note thought: </p>
<p>Atually as Steve pointed out in his comment to <a href="http://developer.yahoo.net/blog/archives/2007/05/high_performanc_2.html" rel="nofollow">High Performance Web Sites: Rule 3 - Add an Expires Header</a> the HTTP 1.1 specs says that URLs with query strings should not be cached only when there is no explicit expiration information:</p>
<p>From HTTP 1.1 spec, section 13.9:<br />
<cite><br />
e note one exception to this rule: since some applications have<br />
   traditionally used GETs and HEADs with query URLs (those containing a<br />
   &#8220;?&#8221; in the rel_path part) to perform operations with significant side<br />
   effects, caches MUST NOT treat responses to such URIs as fresh unless<br />
   the server provides an explicit expiration time.<br />
</cite></p>
<p>Also, RoR have some kind of template tag for auto versioning and it uses QS as far as I know.</p>
<p> - Lukasz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64293</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Mon, 28 Apr 2008 05:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64293</guid>
		<description>I was just looking around for some background to write something just like this for Django!

Thanks very much for saving me several hours!

- rich</description>
		<content:encoded><![CDATA[<p>I was just looking around for some background to write something just like this for Django!</p>
<p>Thanks very much for saving me several hours!</p>
<p>- rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross Bruniges</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64229</link>
		<dc:creator>Ross Bruniges</dc:creator>
		<pubDate>Thu, 10 Apr 2008 07:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64229</guid>
		<description>I have a feeling that this will provide very very useful to a number of people :&#62;</description>
		<content:encoded><![CDATA[<p>I have a feeling that this will provide very very useful to a number of people :&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Colville</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64215</link>
		<dc:creator>Stuart Colville</dc:creator>
		<pubDate>Tue, 08 Apr 2008 10:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64215</guid>
		<description>@Brad: Excellent points well made. I've updated the script accordingly.</description>
		<content:encoded><![CDATA[<p>@Brad: Excellent points well made. I&#8217;ve updated the script accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Wright</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64212</link>
		<dc:creator>Brad Wright</dc:creator>
		<pubDate>Tue, 08 Apr 2008 08:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64212</guid>
		<description>Oops, my mod_rewrite had fail:

&lt;code&gt;RewriteRule ^/static/([a-z-]+)\.[0-9]+\.(css&#124;js) /static/$1\.$2 [L]&lt;/code&gt;

Is better.</description>
		<content:encoded><![CDATA[<p>Oops, my mod_rewrite had fail:</p>
<p><code>RewriteRule ^/static/([a-z-]+)\.[0-9]+\.(css|js) /static/$1\.$2 [L]</code></p>
<p>Is better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Wright</title>
		<link>http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64210</link>
		<dc:creator>Brad Wright</dc:creator>
		<pubDate>Tue, 08 Apr 2008 07:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2008/04/08/automatic-asset-versioning-in-django/#comment-64210</guid>
		<description>Hey Stu,

It seems &lt;a href="http://www.thinkvitamin.com/features/webapps/serving-javascript-fast#comment-846" rel="nofollow"&gt;Opera and Safari don't cache file paths with query strings&lt;/a&gt;, as per the HTTP spec, and given that it's part of the spec we have no guarantee that other browsers won't behave the same in the future. Probably best to do something like:

&lt;code&gt;return path_string.replace('.css', '.%d.css' % mtime)&lt;/code&gt;

And have something like this in mod_rewrite:

&lt;code&gt;RewriteRule ^/static/([a-z-]+)\.[0-9]+\.(css&#124;js) /static/$1\.$s [L]&lt;/code&gt;

This keeps the filenames looking like: &lt;code&gt;/static/css/style.1207433992.css&lt;/code&gt;, but rewrites them to the latest versions in your static server.</description>
		<content:encoded><![CDATA[<p>Hey Stu,</p>
<p>It seems <a href="http://www.thinkvitamin.com/features/webapps/serving-javascript-fast#comment-846" rel="nofollow">Opera and Safari don&#8217;t cache file paths with query strings</a>, as per the HTTP spec, and given that it&#8217;s part of the spec we have no guarantee that other browsers won&#8217;t behave the same in the future. Probably best to do something like:</p>
<p><code>return path_string.replace('.css', '.%d.css' % mtime)</code></p>
<p>And have something like this in mod_rewrite:</p>
<p><code>RewriteRule ^/static/([a-z-]+)\.[0-9]+\.(css|js) /static/$1\.$s [L]</code></p>
<p>This keeps the filenames looking like: <code>/static/css/style.1207433992.css</code>, but rewrites them to the latest versions in your static server.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
