Are there any downloadable programs that will perform common CSS optimization techniques? Looking for something not online.
Yahoo has some excellent tools you can use for minifying JavaScript and CSS:
It is Java-based and open source.
From the link:
How does the YUI Compressor work?
The YUI Compressor is written in Java (requires Java >= 1.4) and relies on Rhino to tokenize the source JavaScript file. It starts by analyzing the source JavaScript file to understand how it is structured. It then prints out the token stream, omitting as many white space characters as possible, and replacing all local symbols by a 1 (or 2, or 3) letter symbol wherever such a substitution is appropriate (in the face of evil features such as eval or with, the YUI Compressor takes a defensive approach by not obfuscating any of the scopes containing the evil statement) The CSS compression algorithm uses a set of finely tuned regular expressions to compress the source CSS file. The YUI Compressor is open-source, so don't hesitate to look at the code to understand exactly how it works.
Check out the Yahoo! Developer Network, especially the YUI Compressor.
You might also want to look at Firebug and YSlow or Google Page Speed. They can analyze for inefficient use of CSS (you'd still have to fix the CSS yourself, though),
Depending on what kind of optimization exactly you're after, and what kind of tool you want:
- CSSTidy: CSS parser and optimizer
- Dust-Me Selectors: Firefox add-on that can find unused CSS selectors
- minify: a PHP app that combines, minifies and gzips your site's CSS and Javascript
- mod_deflate: the Apache module you should be using to gzip your content
- Page Speed: Firebug extension (like YSlow) that checks for various website optimization techniques, but can also minify your CSS for you
- YUI Compressor: Java tool to minify Javascript and CSS