

minification is eliminating excessive white space from the html page code
white spaces are more than one space between chars, tabs, new lines and empty lines, which are often quite usefull for coding practives, to make the code easy readable for the programmer
when the server compiles the code to produce the final html page, it needs to read any space and any empty line as well as any line which contains characters, but since there is nothing it just occupies cpu cicles and can result in slower processing
minification is handy specially in scenarios, like wordpress, where exist hundrets of funny spaguetti layers of css styling code, in order to compensate this stupid thing we can at least compact white spaces and give the code a little bit more dignity
we can still split the minification process into js, css and html minifying, when often css minifying is the most important and comes out whith a respectable performance enhancement
js minifying doesn’t show noticable results since there usually aren’t very much <script> blocks in the final rendered document, but can become an issue on heavy loaded sites where every single cpu cicle less can make a difference
html minifying is also a questionable part for low traffic sites, but shouldn’t be let out, it creates performance benefits, even if not directly noted, in peak hours the difference shows up
all three options are not bunker save and can cause unexpected results, happens that sometimes programmers have unusual habits in terms of how to use white spaces, simple example is a horizontal menu with space between each menut item, he might use three white spaces to focus better the available options, these spaces could be eliminated what then results in a manu bar without spaces between the options
knowing that, who opts for using minification should check all pages to be sure nothing unexpected happened, in our case, the user can report it and we check if we can prevent it with a special handling, it is not always possible and the site programmer should be consulted to provide a better coding of the affected section
as always, feel free to comment or ask questions
Leave a Reply