[opencms-dev] Auto-Condense Javascript and CSS code - new opencms tag cms:minify

Christian Steinert christian_steinert at web.de
Sun Feb 22 12:07:17 CET 2009


Dear Michael,

I looked a bit at how opencms image scaling is done because I hoped that 
the minification could be hooked up like that.
But it seems that the image loader directly contains the scaling code. 
This seems to suggest to me that there is no way that is both 
straightforward AND clean to add minification as a post-processing step 
- independent of the resource type that is used.

Do you agree with this, or do you have a good idea where the 
minification could be hooked up? Where, for example would you hook up a 
mechanism which allows to control minification through a file system 
property?

Maybe, adding a JSP somewhere inside of /system/ is the way to go, after 
all. In this way, only three things would be needed:
1. a simple URL-generating that points to a JSP somewhere in /system/ 
and adds a few parameters
2. a simple JSP that accepts the request and causes the minification to 
be performed
3. a Bean which is called by the JSP to do the actual work

As noted before, I am not entirely enthusiastic about forcing the 
generated URLs to start with /system/, but maybe others would not care.
What do you think - is this the way to go?

Best Regards
Christian




More information about the opencms-dev mailing list