First let’s understand what is minification.
Minification is the process of minimizing code. In simple words, Minification is the process to remove all unnecessary characters in javascript and css files to make them more compact. This includes the removal of whitespace, comments, new line characters etc.
Why minify?
When creating HTML, CSS and JavaScript files, developers tend to use spacing, comments and well-named variables to make code and markup readable for themselves. It also helps others who might later work on the assets. While this is a plus in the development phase, it becomes a negative when it comes to serving your pages. Web servers and browsers can parse file content without comments and well-structured code, both of which create additional network traffic without providing any functional benefit.
To minify JS, CSS and HTML files, comments and extra spaces need to be removed, as well as crunch variable names so as to minimize code and reduce file size. The minified file version provides the same functionality while reducing the bandwidth of network requests.
Before:

After:

Minification vs compression:
Minification removes whitespace and other unnecessary characters from the file to create a different CSS file with exactly the same meaning.
but compressing uses a compression algorithm (such as gzip) and adds an HTTP response header to tell the client that the file is compressed CSS (instead of plain text CSS) so it can be decompressed before being passed to the CSS parser.
Advantages:
There are some online tools available, you can easily minify your code for any website. And for you WordPress users, there are some powerful plugins available to minify. Some of them are:
Tips for minifying your files without breaking your site:
Thankyou for reading...
Please follow Web Camp for more such information.
Also, If you or your developer want me to develop something for you, you can contact me at : nidhigupta12811@gmail.com
Till then..#StaySafe #KeepLearning #KeepCoding