JavaScript and CSS minification

This is an implementation of a new tag for the OpenCms taglib that can automatically condense JavaScript and CSS code. The tag is used by enclosing a block of CSS of JavaScript with it, for example:

<cms:minify type="js">
function myFunc() {
  myVar = 123;
  alert( myVar );
}
</cms:jsminify>

The result in this case would be: "function myFunc(){a=123;alert(a)}"

The minification is done through the excellent Yahoo YUI compressor (http://developer.yahoo.com/yui/compressor/) which is also used by the jQuery project and which is, for example, able to condense variable names.

Module Version: 1.0
Provided By: Christian Steinert
License: LGPL
Click here to download (820 kb)

Download OpenCms

  • Update to OpenCms 9.5.2! This version brings template creation without the need to code, plus other features like user generated content, on-the-fly PDF generation, greatly improved documentation and much more - all presented in a responsive demo website based on Bootstrap.
    Size:136522KB

    Click here to download

Upgrade OpenCms

  • Update your existing OpenCms installation to version 9.5.2 with the easy to use upgrade wizard.
    Size:115271KB

    Click here to download

OpenCms Days 2015

  • OpenCms Days 2015 Conference and Expo

    OpenCms Days 2015 will take place Monday, September 28 to Tuesday, September 29 in Cologne, Germany.

    Highlight of the international user conference and expo will be the introduction of OpenCms 10. OpenCms Days will be the perfect opportunity to exchange experiences around OpenCms with high profile participants and speakers from all over the world.

    Visit this 2 day conference and expo to meet and mingle with leading OpenCms experts and other OpenCms users.

    OpenCms Days 2015 is targeted towards an international audience. The language spoken at the event and used for all presentations is English.

    More information...

Take the guided tour