German Greek English Spanish French Italian
menu

Minify and compress CSS and javascript : Blog

The Elxis minifier unifies and compressed CSS and javascript files to improve site performance. Blog

Home/ Blog/ Minify and compress CSS and javascript

Minify and compress CSS and javascript

The Elxis minifier unifies and compressed CSS and javascript files to improve site performance.

The CSS/javascript minifier which introduced in Elxis 4.1 was updated in Elxis 4.2. What the minifier does is to get all CSS and/or javascript files addressed for the document's head section, unifies them into a single file (1 for CSS and 1 for JS), compress them by removing comments and spaces, saves the final file into cached and serve it gunzip compressed (optionally) to the browser. With the minifier instead of having dozens of CSS/JS files in your site's head section you have just 2 files, 1 for CSS and 1 for JS. This means much fewer requests to the server, less bandwidth and thus faster page load.

In Elxis 4.1 the minifier worked excellent but with a limitation. If you had CSS rules that used background images the path of the images had to be absolute ones or relatives from site's root folder. This problem solved in Elxis 4.2. The minifier now takes under consideration the relative path of each CSS file and fixes image paths on the generated unified file. This solution has been thoroughly tested and works excellent with any image path you can imagine. Therefore if you use the CSS/JS minifier on Elxis 4.2+ sites you dont have to fix image paths any more. If you have enabled GZIP compression for the whole site then everything is served as GZIP compressed. In this case don't enable GZIP to the minifier.

Articolo precedente
New tools for developers
Articolo successivo
Fresh look for elxis.org