<?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: Scaling Your Frontend: Far-Futures Headers and Template Tags</title>
	<atom:link href="http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html</link>
	<description>A blog about Django, JavaScript, CSS, and general web development.</description>
	<lastBuildDate>Fri, 12 Mar 2010 19:46:01 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20703</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 18 Mar 2009 18:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20703</guid>
		<description>That&#039;s very interesting tabo. I hadn&#039;t paid very close attention, as it appeared it was working fine. Anyways, you could use the same basic code to do something similar.</description>
		<content:encoded><![CDATA[<p>That&#8217;s very interesting tabo. I hadn&#8217;t paid very close attention, as it appeared it was working fine. Anyways, you could use the same basic code to do something similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20701</link>
		<dc:creator>simon</dc:creator>
		<pubDate>Mon, 16 Mar 2009 10:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20701</guid>
		<description>Check out &lt;a href=&quot;http://code.google.com/p/django-compress/&quot; rel=&quot;nofollow&quot;&gt;django-compress&lt;/a&gt;. It versions, combines, and minifies your js/css files. 

I use a &lt;a href=&quot;http://code.google.com/p/django-compress/issues/detail?id=19&quot; rel=&quot;nofollow&quot;&gt;patched&lt;/a&gt; version to bypass using settings.py (current trunk requires this).</description>
		<content:encoded><![CDATA[<p>Check out <a href="http://code.google.com/p/django-compress/" rel="nofollow">django-compress</a>. It versions, combines, and minifies your js/css files. </p>
<p>I use a <a href="http://code.google.com/p/django-compress/issues/detail?id=19" rel="nofollow">patched</a> version to bypass using settings.py (current trunk requires this).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arne Brodowski</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20700</link>
		<dc:creator>Arne Brodowski</dc:creator>
		<pubDate>Mon, 16 Mar 2009 09:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20700</guid>
		<description>Because of the caching-issue tabo mentioned I&#039;m using this approach for quite some time now (docstring is in english):

http://www.django-hosting.de/wiki/MediaFileExpire/

It&#039;s very similar to your solution but it doesn&#039;t append the mtime as a query string. Instead it appends the mtime in the filename just before the fileextension and is used in conjunction with some mod_rewrite rule to strip the mtime before reading the file from disk.</description>
		<content:encoded><![CDATA[<p>Because of the caching-issue tabo mentioned I&#8217;m using this approach for quite some time now (docstring is in english):</p>
<p><a href="http://www.django-hosting.de/wiki/MediaFileExpire/" rel="nofollow">http://www.django-hosting.de/wiki/MediaFileExpire/</a></p>
<p>It&#8217;s very similar to your solution but it doesn&#8217;t append the mtime as a query string. Instead it appends the mtime in the filename just before the fileextension and is used in conjunction with some mod_rewrite rule to strip the mtime before reading the file from disk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tabo</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20699</link>
		<dc:creator>tabo</dc:creator>
		<pubDate>Mon, 16 Mar 2009 09:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20699</guid>
		<description>Are you aware that if you do this, your static files won&#039;t be cached?

http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/</description>
		<content:encoded><![CDATA[<p>Are you aware that if you do this, your static files won&#8217;t be cached?</p>
<p><a href="http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/" rel="nofollow">http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20697</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 16 Mar 2009 03:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20697</guid>
		<description>Honza you are quite correct about a lot of this. The MEDIA_URL solution would be a very useful way to do it, but it isn&#039;t much different than what this is doing (and I think mediaurl() actually simplifies things).

As for the filesystem access, this is entirely up to what you are doing and how you&#039;re doing it. This is meant to be used as a simple example, but if you have a heavy traffic site you&#039;re probably not serving media from your system so this wouldn&#039;t work. On the off chance you are, you may want to run some kind of in-memory caching mechanism on it (wouldn&#039;t be hard to build).</description>
		<content:encoded><![CDATA[<p>Honza you are quite correct about a lot of this. The MEDIA_URL solution would be a very useful way to do it, but it isn&#8217;t much different than what this is doing (and I think mediaurl() actually simplifies things).</p>
<p>As for the filesystem access, this is entirely up to what you are doing and how you&#8217;re doing it. This is meant to be used as a simple example, but if you have a heavy traffic site you&#8217;re probably not serving media from your system so this wouldn&#8217;t work. On the off chance you are, you may want to run some kind of in-memory caching mechanism on it (wouldn&#8217;t be hard to build).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dc</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20692</link>
		<dc:creator>dc</dc:creator>
		<pubDate>Sun, 15 Mar 2009 05:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20692</guid>
		<description>Very useful.. Thanks</description>
		<content:encoded><![CDATA[<p>Very useful.. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Honza Kral</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20691</link>
		<dc:creator>Honza Kral</dc:creator>
		<pubDate>Sun, 15 Mar 2009 04:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20691</guid>
		<description>Why go to all this trouble which requires:
 - access to the files from your frontend (that should not be in high traffic site)
 - a filesystem access for every URL rendered (with hundreds of thousands of files, this gets ugly pretty quickly)
 - requires you to use template tag for every single occurence of such URL (no URL&#039;s in static files then)

instead you can just set MEDIA_URL = &#039;some_url/%s&#039; % VERSION and have your deployment system handle the directories on the media server (simple symlink is usually enough). Settings.py is just a python file, why not use that and compute the VERSION once and for all.

VERSION can be taken from svn&#039;s revision and/or any arbitrary string (we, for example, take it from the package version that we deploy, same version we use to identify DB schema version and resolve dependencies). Plus your deployment process can go into your static files (js and css) and add the version there so that you won&#039;t have to generate those dynamically.</description>
		<content:encoded><![CDATA[<p>Why go to all this trouble which requires:<br />
 &#8211; access to the files from your frontend (that should not be in high traffic site)<br />
 &#8211; a filesystem access for every URL rendered (with hundreds of thousands of files, this gets ugly pretty quickly)<br />
 &#8211; requires you to use template tag for every single occurence of such URL (no URL&#8217;s in static files then)</p>
<p>instead you can just set MEDIA_URL = &#8217;some_url/%s&#8217; % VERSION and have your deployment system handle the directories on the media server (simple symlink is usually enough). Settings.py is just a python file, why not use that and compute the VERSION once and for all.</p>
<p>VERSION can be taken from svn&#8217;s revision and/or any arbitrary string (we, for example, take it from the package version that we deploy, same version we use to identify DB schema version and resolve dependencies). Plus your deployment process can go into your static files (js and css) and add the version there so that you won&#8217;t have to generate those dynamically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20690</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 15 Mar 2009 01:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20690</guid>
		<description>I can&#039;t understand reason for that. Testing ? 
Changing file means that you&#039;ve updated it&#039;s timestamp. So, next time you&#039;ll have new (non-cached) file delivered to client.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t understand reason for that. Testing ?<br />
Changing file means that you&#8217;ve updated it&#8217;s timestamp. So, next time you&#8217;ll have new (non-cached) file delivered to client.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20689</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 15 Mar 2009 01:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20689</guid>
		<description>That&#039;s the same thing I wanted to do at first, but then I realized that it didn&#039;t really matter. File modification time is MUCH easier :)</description>
		<content:encoded><![CDATA[<p>That&#8217;s the same thing I wanted to do at first, but then I realized that it didn&#8217;t really matter. File modification time is MUCH easier <img src='http://www.davidcramer.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parand</title>
		<link>http://www.davidcramer.net/code/429/scaling-your-frontend-far-futures-headers-and-template-tags.html/comment-page-1#comment-20688</link>
		<dc:creator>Parand</dc:creator>
		<pubDate>Sun, 15 Mar 2009 01:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/?p=429#comment-20688</guid>
		<description>Thanks for this, I&#039;ve been meaning to do it forever and this is just the kick in the pants needed to implement it. I was thinking of using the svn version number, but file modification time is even easier.</description>
		<content:encoded><![CDATA[<p>Thanks for this, I&#8217;ve been meaning to do it forever and this is just the kick in the pants needed to implement it. I was thinking of using the svn version number, but file modification time is even easier.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
