[Catalyst] Cache of unchanging content

Bill Moseley moseley at hank.org
Tue Mar 1 15:58:21 GMT 2011

On Tue, Mar 1, 2011 at 1:23 AM, John M. Dlugosz <wxju46gefd at snkmail.com>wro=

>  Say I want to use TT in the .css, so (for example) I can name my colors
> and other repeated content easily.
> I'm assuming that I can define a Path of some kind on a rule to serve
> those.  Any recipes to share?
> More critically, I want the browser to know that it doesn't have to keep
> re-fetching it on every view of every page.  How would I manage that?

At build time I minimize and compress css and js (and images) and combine
into single files grouped by page(s).  They could be pre-processed by TT
very easily.  The final file names include an MD5 of their content forcing a
re-fetch only if they ever change.  (Maybe HTML5 manifest files will
simplify this a bit.)

They get served by Catalyst with an expiration time a year or so into the
future.  The URL for the resources on the web pages point to a CDN which
caches the fetched files.  A caching proxy with a different domain would
also work.   Under development mode the css files are served directly from
the Catalyst server as separate files, not minified to make debugging

I've been debating using data URLs for the smaller background images instead
of using Sprite files, but support is not great yet.

I thought about using TT for css, but the need has never come up and it
would mean more training.

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110301/dc658=

More information about the Catalyst mailing list