ResourceSquisher uses a combination of JavaScript/CSS minifying, concatenation, gzip compression, and both server-side and client-side caching. All methods except for concatenation are optional and can be enabled/disabled via the configuration file (RS_config.php). I have used this same method on some sites and found that it is possible to achieve a 6:1 compression ratio, as well as drastically reducing the number of HTTP requests made, while still taking advantage of a client-side cache.
Special thanks to Douglas Crockford and Ryan Grove for creating JSMin (http://code.google.com/p/jsmin-php/), and to Joe Scylla for creating cssmin (http://code.google.com/p/cssmin/), on which this project is based.
Usage of ResourceSquisher is very simple. Once configured for your environment (you"ll have to set some paths in RS_config.php), you can simply use the two provided scripts as the src/href for your scripts/styles. For example,
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001092s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.075428s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001003s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001095s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.000985s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003303s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000874s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.003717s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.015248s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001181s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 2317 [ RunTime:0.036872s ]