How To Compress Your CSS

January 19th, 2007 Comments Off

A while back I created a small JavaScript Compression tool, which basically stripped the unnecessary whitespace from your JavaScript to help it load faster for your visitors. Another language that is vulnerable to whitespace is CSS, and I set out with the intention of creating a CSS compression when I found that someone else already had. Over at CSS drive, they have the exact little script I was imagining. This great little tool compressed my CSS by 20%.

In the near future, I will be looking to create a little tool that will compress WordPress Templates. Some PHP template engines have the feature to strip whitespace from the HTML they output. However, WordPress does not output the HTML all at once, rather in spurts so it’s harder to accomplish this.

Comments are closed.

What's this?

You are currently reading How To Compress Your CSS at Code and Coffee.