Minification is the process of minimizing code and markup in your web pages and script files. It’s one of the main methods used to reduce load times and bandwidth usage on websites. Minification dramatically improves site speed and accessibility, directly translating into a better user experience. The minified version of this sample code is 48% smaller. In some cases, minification can reduce file size by as much as 60%.
What is removed during file minification includes:
- Whitespace characters
- Line breaks
- Block delimiters
Beautify reformats source code to improve readability by an human. This basically means reformatting source code to follow some (user-defined) coding convention (i.e. reindenting, splitting long lines, adding whitespace to make code lighter to read, etc.).