WP-CSS-Streamliner: CSS optimization plugin for WordPress

Thursday May 31 2007

This post serves as a 'homepage' for WP-CSS-Streamliner, a WordPress plugin that will greatly enhance the client-side performance of your site. The was originally written as a showcase example in my article named 'On a quest for ultimate website performance' in which I describe several techniques that help improve the of your . Read it to find out what the purpose of this plugin really is.

WP-CSS-Streamliner is WordPress 2.5 compatible!

Features

WP-CSS-Streamliner has the following features:

  • Grabs all <link> tags from your pages in real-time and transforms them into one new one pointing to a highly optimized combined CSS file
  • Performs gzip on the optimized CSS file
  • Exclude mechanism to keep certain CSS out of the optimization process, for example print CSS files, alternate stylesheets or IE specific CSS within conditional comments
  • Caches different combinations of CSS on a per-page basis. Every combination will be cached and served once
  • Rewrites image URL's in CSS to absolute ones in order to make CSS coming from different directories still work properly when served from one location
  • Automatically excludes CSS served from other hosts (no need to use the exclude mechanism for this)
  • Force-refresh option to refresh the cache in case of trouble

For more information, read the README.txt provided in the archive.

Compatibility

The All-In-One-SEO-Pack plugin breaks your site when used in combination with WP-CSS-Streamliner. I think it's not WP-CSS-Streamliner's fault but I'm going to look into it later.

WP-CSS-Streamliner was developed on WordPress 2.1.x and should work on any 2.x version. In case you encounter trouble, let me know about it and I'll try to fix it.

HELP! It doesn't work!

In case the plugin results in broken pages or other undesired effects, do the following:

  • In rare cases the caching process results in broken . This happens when a visitor calls the page at the exact moment when one of your CSS files is being updated on disk. Call your page again in your browser with ?refresh appended. It will refresh the cache.
  • Read the README.txt if you hadn't already. If you did, read it again. There's troubleshooting hints in there.
  • Exclude all CSS through the exclusion mechanism by adding them to nocompress.inc and remove them one by one, starting with your main CSS file. This will help you find the troublesome CSS file. If it's an IE specific CSS file, an alternate CSS file or a print CSS file, leave it out. If it's something else I'd love to hear about it.
  • Check if files are being created in your wp-content directory. They should look like c9a61def0d2950b10d8078b605290622.css. Check what's in it. The files should contain highly compressed CSS.
  • If all this fails or brings up clues about a bug, post a comment below this post.

Current version and download

The current version is: 1.0.3.

Download WP-CSS-Streamliner

Dark Matter Pro: a premium photoblog template.

Affiliate program available

bookmarking

Commentary

Join the discussion! Leave a comment through the comment form below!

Got something to add to this?

Feel free to leave a comment on this site. You can use Textile and Emoticons. Your email address is only used to show a gravatar. Please stay on-topic and use common decency. Spammers will be shot in front of a live studio audience.

If you plan on posting code, use pastebin please and post a URL to the code. The comment processing doesn't deal very well with code. Sorry for the inconvenience.

Human comment spammers: don't bother posting your crap here. Comments are moderated and I won't let any of your shit through.

Remember personal info?
Yes
No

Trackbacks

If you have an interesting related post on your own site you can leave a trackback. As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once.

 

  • Featured Links
RockySomewhere near the Orion NebulaBookalicio.usGolden Gate BridgeThames River BankJackie and mePimpin' it