<?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: How we hash our Javascript for better caching and less breakage on updates</title>
	<atom:link href="http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/</link>
	<description>Communiqués from the Green Felt developers</description>
	<lastBuildDate>Sun, 01 Aug 2010 01:52:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Yuval Kogman</title>
		<link>http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/comment-page-1/#comment-1409</link>
		<dc:creator>Yuval Kogman</dc:creator>
		<pubDate>Wed, 09 Sep 2009 17:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.greenfelt.net/?p=31#comment-1409</guid>
		<description>I use a similar technique but instead of minifying dynamically I just use git&#039;s hashing:

http://blog.woobling.org/2009/06/git-s3-and-rewritemap.html</description>
		<content:encoded><![CDATA[<p>I use a similar technique but instead of minifying dynamically I just use git&#8217;s hashing:</p>
<p><a href="http://blog.woobling.org/2009/06/git-s3-and-rewritemap.html" rel="nofollow">http://blog.woobling.org/2009/06/git-s3-and-rewritemap.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack9</title>
		<link>http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/comment-page-1/#comment-1398</link>
		<dc:creator>Jack9</dc:creator>
		<pubDate>Thu, 03 Sep 2009 07:14:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.greenfelt.net/?p=31#comment-1398</guid>
		<description>http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/

autoVer works (implemented in your scripting language dejour). Changing the filename is the best cache-buster there is, so whatever is easiest for you.</description>
		<content:encoded><![CDATA[<p><a href="http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/" rel="nofollow">http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/</a></p>
<p>autoVer works (implemented in your scripting language dejour). Changing the filename is the best cache-buster there is, so whatever is easiest for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jedediah Smith</title>
		<link>http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/comment-page-1/#comment-1397</link>
		<dc:creator>Jedediah Smith</dc:creator>
		<pubDate>Thu, 03 Sep 2009 06:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.greenfelt.net/?p=31#comment-1397</guid>
		<description>To deal with the client-server problem, add an api version number to all api calls and a special failure response that can come from any call telling the client to refresh the whole app.</description>
		<content:encoded><![CDATA[<p>To deal with the client-server problem, add an api version number to all api calls and a special failure response that can come from any call telling the client to refresh the whole app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac Z. Schlueter</title>
		<link>http://blog.greenfelt.net/2009/09/01/caching-javascript-safely/comment-page-1/#comment-1393</link>
		<dc:creator>Isaac Z. Schlueter</dc:creator>
		<pubDate>Wed, 02 Sep 2009 17:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.greenfelt.net/?p=31#comment-1393</guid>
		<description>At Yahoo, I&#039;ve built something like this twice, for two separate projects.  There are a few other solutions floating around, but our environments are so often complicated and distributed, it&#039;s hard to get a good mix of production speed and development convenience that works in a general way.

The problems that I&#039;d see with this approach are that a) you&#039;re not concatenating your scripts in production (or maybe you are, and just didn&#039;t mention that in the article), and b) you&#039;re not loading your scripts from a CDN, meaning that they must be built on every FE box that you deploy on.

On my most recent project, http://apps.yahoo.com, we developed a system consisting of these components:

a) An INI file mapping the &quot;raw&quot; location to the &quot;prod&quot; location.  The entries look something like: &quot;/path/to/script.js: /path/to/script-89fn3902ha8ofh3o8ahfao03ha.js&quot;

b) A combo handler script our our CDN server.

c) A PHP class that can be called and either spits out the raw javascript files as multiple script tags, or a single script tag pointing at the concatenated files.  It allows the developer to customize the settings, so you can test the concatenated scripts by just running the build and pointing it at your local box.

d) A build program that concatenates all the scripts in the htdocs/js folder, gives them a hash, pushes to the CDN server (or whichever server you point it at), and creates the INI file for deployment.

So, we&#039;d build away in development, happily using our 15 script tags that point at unconcatenated unminified stuff, and then run the build script on it, push the package to our test box, run our tests against the built JS, and finally push to the several production servers.

None of this is rocket surgery, and of course, it&#039;s unlikely that Green Felt needs to solve the kinds of problems of scale that Yahoo faces.  The main point, which I think you&#039;ve done well, is to figure out a system where developers can iterate quickly, and pages can load even more quickly.</description>
		<content:encoded><![CDATA[<p>At Yahoo, I&#8217;ve built something like this twice, for two separate projects.  There are a few other solutions floating around, but our environments are so often complicated and distributed, it&#8217;s hard to get a good mix of production speed and development convenience that works in a general way.</p>
<p>The problems that I&#8217;d see with this approach are that a) you&#8217;re not concatenating your scripts in production (or maybe you are, and just didn&#8217;t mention that in the article), and b) you&#8217;re not loading your scripts from a CDN, meaning that they must be built on every FE box that you deploy on.</p>
<p>On my most recent project, <a href="http://apps.yahoo.com" rel="nofollow">http://apps.yahoo.com</a>, we developed a system consisting of these components:</p>
<p>a) An INI file mapping the &#8220;raw&#8221; location to the &#8220;prod&#8221; location.  The entries look something like: &#8220;/path/to/script.js: /path/to/script-89fn3902ha8ofh3o8ahfao03ha.js&#8221;</p>
<p>b) A combo handler script our our CDN server.</p>
<p>c) A PHP class that can be called and either spits out the raw javascript files as multiple script tags, or a single script tag pointing at the concatenated files.  It allows the developer to customize the settings, so you can test the concatenated scripts by just running the build and pointing it at your local box.</p>
<p>d) A build program that concatenates all the scripts in the htdocs/js folder, gives them a hash, pushes to the CDN server (or whichever server you point it at), and creates the INI file for deployment.</p>
<p>So, we&#8217;d build away in development, happily using our 15 script tags that point at unconcatenated unminified stuff, and then run the build script on it, push the package to our test box, run our tests against the built JS, and finally push to the several production servers.</p>
<p>None of this is rocket surgery, and of course, it&#8217;s unlikely that Green Felt needs to solve the kinds of problems of scale that Yahoo faces.  The main point, which I think you&#8217;ve done well, is to figure out a system where developers can iterate quickly, and pages can load even more quickly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
