[Plugin: WP Super Cache] I've done a mod to Minify (strip out spaces, comments) (3 posts)

  1. joelhardi
    Posted 7 years ago #

    Hi all!

    I've done a mod that uses Minify to further shrink HTML that's static-cached by WP Super Cache (it doesn't waste CPU doing this to dynamic pages). What that means is that it strips out code comments and unnecessary whitespace from the HTML and any inlined CSS or Javascript.

    You can read more about it and download the code here: http://lyncd.com/2008/11/minify-for-wordpress/. (And view source to see what it does!)

    I couldn't determine a way to get it to work with Donncha's plugin hooks, so right now it's just a separate class and a patch to 2 of the WP Super Cache files. (And I just put everything in one tarball, if that's what you're looking for.)

    Hopefully you'll find this useful (or at least interesting). Feel free to post comments/questions here, but I'll get to them sooner if they're posted here, since the blog pings me.

    Note: It does require PHP5, since Minify is written in PHP5, and PHP4 is teh suck.

  2. ghosttie
    Posted 7 years ago #

    This sounds like an excellent idea - I think it should be merged with WP Super Cache

  3. Donncha O Caoimh
    Posted 7 years ago #

    joelhardi - I've just checked in a new filter called "wpsupercache_buffer" that you can hook into.

    You can grab the latest version from svn at http://svn.wp-plugins.org/wp-super-cache/trunk/ if you want to try it out.

Topic Closed

This topic has been closed to new replies.

About this Topic