| From: berbercarpet | Date Sent: 2009-03-19 08:07:54 |
| Subject: highly recommended: jason huck's asset manager | To: Lasso Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
at LDC2008, jason huck presented on an asset management system that he
has built.
it has received far too little attention.
i can not emphasize enough how much this thing just effing rocks.
you really really owe it to yourself to integrate it into your workflow.
in addition to caching your javascripts and CSS files, it allows you
to group them in to "global includes" that AUTOMATICALLY get included
on all of your pages, in the right place.
upgrading to jquery 1.3.2?
simply remove jquery 1.2.6 from global and put 1.3.2 in and -- *poof*
you're using the latest version with no code-rewriting *anywhere*
AND IT GETS CACHED
(caching is optional, of course, so you can use this in development
and production both)
go now, and download it, and read the paper, and implement it.
i'll wait, go ahead.
it will take you an hour, max, and then you'll save 45 minutes a day,
at least, from here on out.
http://icanhaz.com/asset-mgr-lasso8
| From: Bil Corry | Date Sent: 2009-03-19 09:32:01 |
| Subject: Re: highly recommended: jason huck's asset manager | To: Lasso Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
berbercarpet wrote on 3/19/2009 10:07 AM:
> at LDC2008, jason huck presented on an asset management system that he
> has built.
>
> it has received far too little attention.
>
> i can not emphasize enough how much this thing just effing rocks.
It will greatly improve the response of any website.
FWIW, this is how I configure Apache to set the Expires header:
#####################################################
# CONFIGURE media caching
#
Header unset ETag
FileETag None
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Last-Modified
Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT"
Header set Cache-Control "public no-transform"
</FilesMatch>
#
#####################################################
The reason I remove and disable the ETag is because supposedly some browsers will ignore your Expires header when it's present:
http://www.askapache.com/htaccess/apache-speed-etags.html
The reason I remove the Last-Modified header is for the same reason:
http://www.askapache.com/htaccess/apache-speed-last-modified.html
The reason I set the Cache-Control header to 'public' is so the browser will cache media over HTTPS (see tip #3):
http://blog.httpwatch.com/2009/01/15/https-performance-tuning/
The reason I set the Cache-Control header to 'no-transform' is to prevent proxies from modifying my content.
Jason uses mod_expires and I explicitly set the Expires header. From what I recall, mod_expires added some headers I didn't want, thus my switch to explicitly setting the Expires header.
- Bil