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

  • OpenCms 11.0.2 is a maintenance release for OpenCms 11. This version fixes a number of issues that have been detected in OpenCms 11.0.1. Also included are some improvements and security enhancements. Compared to version 10, OpenCms 11 brings a major update for the workplace, all apps have been replaced with modernized versions. Moreover, this release is compatible with Java 11 and comes with the new "Mercury" default template.
    Size:211799KB

    Click here to download

Upgrade OpenCms

  • Update your existing OpenCms installation to the current stable version 11.0.2 with the easy to use upgrade wizard.
    Size:165137KB

    Click here to download

Take the guided tour

Try the OpenCms Live Demo