You are looking at posts that have been tagged compress
Geekie.org is making available a clone of Robson’s CSS Compressor using the GPL-licensed source code available at http://iceyboard.no-ip.org/showcode/code/css_compressor.php.
Just so that I didn’t have to go and search the Internet for this excellent CSS compressor every time I wanted to use it, I decided to host the code and frontend on our site. You can find it at http://www.geekie.org/tools/css.compressor. Bookmark it for future use! There are no advertisements on the frontend and the backend works exactly as it was intended to work at the original site.
Previously I talked about a long method of compressing JS or CSS on-the-fly with PHP’s zlib.output_compression. What this tool does isn’t “compress” in the sense of changing the output between the server and your browser, but rather optimize Cascading Stylesheets by changing the way that colours are defined to the shortest form possible, combining different declarations that are similar or identical, and removing useless measurements like 7.00 em. The result can be compressed to as little as 30% of the original code, depending on how it was written.
We recommend that you try this tool, and speed up your site. It’s easy; just copy and paste your CSS into the box and press submit. The default settings work fine for most stylesheets, and help you reduce your filesize significantly. The only downside is that the resulting code won’t be as easy to edit as before, so always keep your original, pre-optimized stylesheet backed up!




(No Ratings Yet)Today, a newly-registered user “jcapshaw” noted (on an older blog post about using zlib for output compression in PHP) that he wanted to send JavaScript, CSS, and HTML files through PHP for gzip compression. Clearly, as I pointed out in that blog post, the PHP developers prefer zlib.output_compression over the ob_start(’ob_gzhandler’) method, even though the zlib.output_compression method takes more work to set up. Why shouldn’t we apply it to other text-based files as well?
On one of my developments, RHHSMusic.com, I use several optimization methods recommended by the Yahoo! Developer Network, including:
The majority of the above are accomplished through PHP; whether it’s PHP includes, PHP classes, or using PHP to gzip CSS & JS.
This article discusses how that is accomplished.




(2 votes, average: 5 out of 5)The content on this site is published under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License, which allows any person to syndicate our content (modified or not) as long as this site or the content's author is attributed and the resulting work is also released under this license. Our feed is licensed slightly differently, under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Use of this site is subject to, and automatically constitutes acceptance of, our copyright, our licensing restrictions, our privacy policy, and our disclosure policy. Geekie.org is an asset of the FreddyWare Solutions Enterprise Network.