Gzip in Enonic CMS

Posted by

    "Grade F on Compress components with gzip". If you have done some work on website optimisation, you probably have seen your optimisation tools complaining about compressing your static resources. Now Enonic CMS takes care of this for you.

    Enabling gzip compression is a simple and effective way of saving bandwidth and speeding up your site. Explained in few words, your browser tells the web server that it supports gzip compression, and if the server is set up to serve a compressed version, it sends this in return. If not, a regular uncompressed version is sent.

    Until recently, you would have needed to configure your web server to enable gzip compression. We have experienced that this easily is forgotten when putting a new site into production. 

    Good news, from 4.7.5, gzip compression is enabled by default on text based static resources such as CSS and JavaScript. Need proof? Check out the two screenshots below, taken from the latest 4.7.5 snapshot.


    Gzip CSS

    Gzip Javascript


    Check out this Google Developer article for more information on how Gzip works.