<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>David Cramer's Blog - Latest Comments in Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://davidcramer.disqus.com/</link><description></description><atom:link href="https://davidcramer.disqus.com/thread_20/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 16 Mar 2009 06:40:33 -0000</lastBuildDate><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710312</link><description>&lt;p&gt;Check out &lt;a href="http://code.google.com/p/django-compress/" rel="nofollow noopener" target="_blank" title="http://code.google.com/p/django-compress/"&gt;django-compress&lt;/a&gt;. It versions, combines, and minifies your js/css files.&lt;/p&gt;&lt;p&gt;I use a &lt;a href="http://code.google.com/p/django-compress/issues/detail?id=19" rel="nofollow noopener" target="_blank" title="http://code.google.com/p/django-compress/issues/detail?id=19"&gt;patched&lt;/a&gt; version to bypass using &lt;a href="http://settings.py" rel="nofollow noopener" target="_blank" title="settings.py"&gt;settings.py&lt;/a&gt; (current trunk requires this).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">simon</dc:creator><pubDate>Mon, 16 Mar 2009 06:40:33 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710311</link><description>&lt;p&gt;Because of the caching-issue tabo mentioned I'm using this approach for quite some time now (docstring is in english):&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.django-hosting.de/wiki/MediaFileExpire/" rel="nofollow noopener" target="_blank" title="http://www.django-hosting.de/wiki/MediaFileExpire/"&gt;http://www.django-hosting.d...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It's very similar to your solution but it doesn'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.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arne Brodowski</dc:creator><pubDate>Mon, 16 Mar 2009 05:58:27 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710310</link><description>&lt;p&gt;Are you aware that if you do this, your static files won't be cached?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/" rel="nofollow noopener" target="_blank" title="http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/"&gt;http://www.stevesouders.com...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tabo</dc:creator><pubDate>Mon, 16 Mar 2009 05:19:49 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710309</link><description>&lt;p&gt;Very useful.. Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dc</dc:creator><pubDate>Sun, 15 Mar 2009 01:48:59 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710308</link><description>&lt;p&gt;Why go to all this trouble which requires:&lt;br&gt; - access to the files from your frontend (that should not be in high traffic site)&lt;br&gt; - a filesystem access for every URL rendered (with hundreds of thousands of files, this gets ugly pretty quickly)&lt;br&gt; - requires you to use template tag for every single occurence of such URL (no URL's in static files then)&lt;/p&gt;&lt;p&gt;instead you can just set MEDIA_URL = 'some_url/%s' % VERSION and have your deployment system handle the directories on the media server (simple symlink is usually enough). &lt;a href="http://Settings.py" rel="nofollow noopener" target="_blank" title="Settings.py"&gt;Settings.py&lt;/a&gt; is just a python file, why not use that and compute the VERSION once and for all.&lt;/p&gt;&lt;p&gt;VERSION can be taken from svn'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't have to generate those dynamically.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Honza Kral</dc:creator><pubDate>Sun, 15 Mar 2009 00:06:19 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710307</link><description>&lt;p&gt;I can't understand reason for that. Testing ? &lt;br&gt;Changing file means that you've updated it's timestamp. So, next time you'll have new (non-cached) file delivered to client.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick</dc:creator><pubDate>Sat, 14 Mar 2009 21:38:15 -0000</pubDate></item><item><title>Re: Scaling Your Frontend: Far-Futures Headers and Template Tags</title><link>http://cramer.io//429/scaling-your-frontend-far-futures-headers-and-template-tags.html#comment-64710306</link><description>&lt;p&gt;Thanks for this, I'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.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Parand</dc:creator><pubDate>Sat, 14 Mar 2009 21:14:21 -0000</pubDate></item></channel></rss>