Search code examples
javascriptcssjsfminify

Best method to minify js and css in a JSF 1.1 based web app


What are the best practices that can be followed to minify js and css in a JSF application?


Solution

  • I'd suggest to use YUI Compressor for this. With this tool you can minify CSS and JS files programmatically. If you're using an IDE or any build tool which utilizes Ant under the covers (such as Eclipse), then you could use YUI Compressor Ant Task to automate minification during project build with help of Ant. Or if you're using Maven, then you could use Minify Maven Plugin for this.