Disable JS/CSS minification on Liferay

Goal

Disabling, at runtime, the minification of JS/CSS files in Liferay

Description

Most of the time, it is a good idea to have Lifeary minify JS and CSS files in order to increase performance of the site. However, during development, when we want to inspect some JS code or similar, it is useful to disable that in order to be able to understand what code is being executed and what it is doing. This recipe shows a way to achieve that with the addition of a couple of request parameters that will disable the filtering filter that minimizes those files.

How to

As explained here, we can append the following request parameters to the URL of the page we are looking at:

&js_fast_load=0&css_fast_load=0&strip=0

Explanations

The parameter js_fast_load set to 0 (or false), will skip the minification of the JS files. The css_fast_load set to 0 (or false), will skip the minification of the CSS files. Finally, strip set to 0 (or false), disables HTML stripping.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s