<?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: Fake Filenames for Far Future Expires Headers</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andy</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-225025</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Wed, 03 Nov 2010 18:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-225025</guid>
		<description>Has anyone come across the following problem

I have searched high and low  and not found anything about this....

the + in the file name seems to thwart the far futures expires

http://www.ineaguide.org/files/imagecache/100X100/villa+eugenie.jpg</description>
		<content:encoded><![CDATA[<p>Has anyone come across the following problem</p>
<p>I have searched high and low  and not found anything about this&#8230;.</p>
<p>the + in the file name seems to thwart the far futures expires</p>
<p><a href="http://www.ineaguide.org/files/imagecache/100X100/villa+eugenie.jpg" rel="nofollow">http://www.ineaguide.org/files/imagecache/100X100/villa+eugenie.jpg</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-207662</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Fri, 12 Mar 2010 21:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-207662</guid>
		<description>I can totally understand that.  A lot of what I do in my code is based purely on aesthetics (I am not joking).</description>
		<content:encoded><![CDATA[<p>I can totally understand that.  A lot of what I do in my code is based purely on aesthetics (I am not joking).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-207661</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 12 Mar 2010 21:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-207661</guid>
		<description>Yep, I used to do the same thing (see http://www.barneyb.com/barneyblog/2009/01/07/getsubversionrevision-udf/), and while it seemed to work correctly, I was never very happy with the gnarly-looking URLs.  Having the number in the filename appeals far more to my sense of aesthetics, as well as appearing to use normal web best practices.</description>
		<content:encoded><![CDATA[<p>Yep, I used to do the same thing (see <a href="http://www.barneyb.com/barneyblog/2009/01/07/getsubversionrevision-udf/)" rel="nofollow">http://www.barneyb.com/barneyblog/2009/01/07/getsubversionrevision-udf/)</a>, and while it seemed to work correctly, I was never very happy with the gnarly-looking URLs.  Having the number in the filename appeals far more to my sense of aesthetics, as well as appearing to use normal web best practices.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-207660</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Fri, 12 Mar 2010 21:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-207660</guid>
		<description>One approach that I have used in the past, which is quite similar, is to have the &quot;script version&quot; as a query param rather than as the file name:

/path/to/script.js?v=#application.scriptVersion#

I am not 100% sure if this will cache the same same way as a file name, though.  As far as the header values, I&#039;ve only ever played with the expires - I have no idea how to mess with ETags on IIS :)</description>
		<content:encoded><![CDATA[<p>One approach that I have used in the past, which is quite similar, is to have the "script version" as a query param rather than as the file name:</p>
<p>/path/to/script.js?v=#application.scriptVersion#</p>
<p>I am not 100% sure if this will cache the same same way as a file name, though.  As far as the header values, I've only ever played with the expires &#8211; I have no idea how to mess with ETags on IIS :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-207589</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 11 Mar 2010 17:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-207589</guid>
		<description>Chris,

Yeah, you&#039;re right.  I simplified the rules from what I actually use, and screwed it up.  All fixed now though.

Using Ant to set the variable from SVN is a cinch, though it&#039;ll increment too often if you just check &quot;last revision&quot;.  You don&#039;t want to be updating the variable every time a non-asset changes or you&#039;ll needlessly be churning cache and reduce the effectiveness.  But you could certainly constrain the check to only the asset files, and increment only when those change.

I used a similar approach on a site a while back where the production site was actually a working copy (not ideal, but there were legit reasons), so I could just inspect the SVN metadata of the working copy itself to get the number.  That worked pretty well too.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>Yeah, you're right.  I simplified the rules from what I actually use, and screwed it up.  All fixed now though.</p>
<p>Using Ant to set the variable from SVN is a cinch, though it'll increment too often if you just check "last revision".  You don't want to be updating the variable every time a non-asset changes or you'll needlessly be churning cache and reduce the effectiveness.  But you could certainly constrain the check to only the asset files, and increment only when those change.</p>
<p>I used a similar approach on a site a while back where the production site was actually a working copy (not ideal, but there were legit reasons), so I could just inspect the SVN metadata of the working copy itself to get the number.  That worked pretty well too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Blackwell</title>
		<link>https://www.barneyb.com/barneyblog/2010/03/10/fake-filenames-for-far-future-expires-headers/comment-page-1/#comment-207561</link>
		<dc:creator>Chris Blackwell</dc:creator>
		<pubDate>Thu, 11 Mar 2010 09:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=1362#comment-207561</guid>
		<description>The rewrite rule isn&#039;t quite right, there&#039;s no second group to be referenced as $2
Should be 

RewriteRule    (.*)_[0-9]+\.js$    $1.js

What would be really cool is if you had your ant build script set the variable application.scriptVersion with your revision from SVN</description>
		<content:encoded><![CDATA[<p>The rewrite rule isn't quite right, there's no second group to be referenced as $2<br />
Should be </p>
<p>RewriteRule    (.*)_[0-9]+\.js$    $1.js</p>
<p>What would be really cool is if you had your ant build script set the variable application.scriptVersion with your revision from SVN</p>
]]></content:encoded>
	</item>
</channel>
</rss>
