O'Reilly logo

Mobile Web Performance Optimization by S. Niranga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Minifying CSS and JavaScript

When we develop our websites, we often leave white space and comments in our code so humans can easily read and understand it. However, when the code file is being executed on our devices, excess white spaces and comments no longer convey a meaning to humans. So, if we can remove the extra characters from our files, it will reduce our file size and enhance the performance of our website. There are many tools available out there that we can use to remove unnecessary characters (minify them) from our code.

Minifying CSS

In the preceding section, I discussed CSS preprocessors. Both SASS and LESS have CSS minifying options that developers can easily use. The main advantage of CSS preprocessor minification is that developers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required