What is Minification?

What is Minification?

The code in your web pages can be quite confusing and intricate, and it’s very easy to lose your place looking through the code. Web developers create code in specific ways so that they perform a task properly. However, the more code you have on a web page or website, the more there is for a browser or web server to read through, and therefore it can slow your site down. Minification is the process of reducing the code to improve loading times and bandwidth. In return, this creates a better user experience for anyone visiting those web pages. 

A More Detailed Look

In more basic terms, the process of minification means taking out any extra or unnecessary parts of CSS and JavaScript files to make them smaller and more compact. When code is initially written by developers, it includes things such as line breaks, white spaces, and different comments that makes the code easier to read by people, but isn’t completely necessary for the browser to process the code. 


Web developers initially write code in a ‘human-friendly’ way so that it can still be understood by someone examining the code. Computers and software applications don’t need the line breaks and other nuances to understand the purpose of the code. Therefore, removing these extra parts and pieces creates less code for a browser or program to read through, in return making loading times faster and creating a better user experience. 


Another part of the minification process is concatenation. This part of the process means combining or joining together the code. After removing the extra lines, white spaces, and other unnecessary pieces, the next step is concatenation. Concatenation takes several files or pieces of code and joins them together to make just a few files, or even just one file. This allows the web server to receive information in one package, rather than individual, separate files, that would take much more time to go through. 

How Does it All Help?

Web servers can only handle a limited amount of tasks at one time, though the number of tasks can still be quite large. Regardless, there is a limit to how much a web server can handle at one time. Instead of sending separate files or pieces of code one at a time to the web server, minification helps to combine all these files to send simultaneously. Again, this helps to reduce loading times. The lower your loading time for your website and web pages, the better user experience you will have. People tend to ‘bounce off’ a web page if it takes longer than 2 seconds to load. Therefore, if your website takes longer than that to load, you will lose web traffic and possible conversions. 

Example and Explanation

Imagine you are being handed a stack of napkins, one single napkin at a time, for you to store and put away. In this situation, you are like the web server, where code and files are sent to be read and processed. You can imagine how long it would take to unpack a box of napkins one by one. Instead of being handed a single napkin at a time, you begin to get a handful of napkins. This can be related to minification. Instead of handing code or files one by one to the server, minification helps to group and condense files so they can be sent in larger clusters together, at one time. Therefore, it will take less ‘handfuls’ going back and forth between the server and web page, and the page will load faster. 

Pegasaas Performance Plugin

Pegasaas offers a performance plugin that will monitor your web performance and page speeds. Our plugin will give you suggestions on how to improve your performance or loading times, which can include minification or other processes. Visit our website for more information or to sign up today!

Comments are closed.