Skip to content

24 ways to impress your friends

Vote down?

Pim Vernooij

Nice article, but what i’m really interested in, is minify/compress scripts on-the-fly, a.k.a. in a production environment.
I did this combined with combining css and javascript files. The compressed versions are cached server side, and only regenerated if a requested file has been changed server side. This is a big advantage, because the development version keeps it’s markup and comments, only if requested through the website, a new compressed/minified copy will be made and stored in a cache file.

For javascript i’m using a php port of JSMin, and for CSS a custom regex script. I’ve looked into CSSTidy (php port also), but couldn’t get it to work properly.. The only output i got was the html’ed output to the browser.

Is there such thing for compressing png’s?