I am using YUI Compressor to minify Javascript files. However these Javascript files contains some custom content (embedded JSP tags) that I would need YUI Compressor to ignore. I am looking for something similar to the “custom preservation rules” in htmlcompressor.
Does anyone know whether this can be done with YUI Compressor? If not, can anyone suggest an alternative?
If you’re using JSP to generate javascript, then compress the output of the JSP script, rather than before.
If you can’t, you should split off the javascript that is static, and serve the dynamic javascript separately.