[wp-hackers] Packing JavaScript

Otto otto at ottodestruct.com
Wed Sep 19 19:10:09 GMT 2007

On 9/19/07, Ozh <ozh at planetozh.com> wrote:
> So far, the best script I've seen regarding serving JS (and CSS) is to
> be found here:
> <http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files>
> Handles 304, Etags, browsers' inconsistencies etc.. It concatenates
> and gzip stuff, reducing both the number of queries and the bandwidth
> used, with a minimal CPU overhead
> I implement something based on this on every site & theme I do now,
> it's really great

That's damned clever. I like that a lot. With a little modification to
allow it to cache the gzip compressed document and to eliminate the
concatenation, that could be used anywhere. I might work that into my
site this evening and see what impact it has.

I don't like his .htaccess rules though, he's relying on the files
being in the right directories. With only minor modifications, it
could be made to work with any JS or CSS file on the whole site.

More information about the wp-hackers mailing list