MINIFY RESOURCES (HTML, CSS, AND JAVASCRIPT)

DifficultyEasy
PriorityHigh
Average Score88%

Brief

Minification refers to the process of winnowing out all nonessential code from a computer program without affecting its efficacy.

Description

Minification, in the context of websites, pertains to winnowing out all nonessential web resources from the source code without affecting its functionality. Many CSS instructions have a high probability of being redundant when new configurable WordPress themes are applied. For example, CSS for all available colors will still be loaded even if a single color configuration is selected for the WordPress theme. Hence, cleaning up all unused CSS must be the first step to minification; and it can deliver significant savings in page load times. Minification via minifying tools like Refresh-SF, CSS Minifier, CSSNano etc. can be followed for an all-round minification. JavaScript can be minified using Yahoo’s YUI Compressor, Google’s Closure Compiler, JSMin etc. whereas HTMLMinifier may be used for HTML minification. Google’s Closure Compiler is a JavaScript optimizing tool that removes dead code, and provides warnings for potentially dangerous operations. It reduces the size of the JavaScript files, which in turn, increases web performance. The Closure Compiler facilitates easy maintenance of JavaScript, and enhance its stability and security.