Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Html minification
1. HTML Minification
Minify is a programming term that basically means to remove any unnecessary characters
that are not required for the code to execute. Minifying your code speeds up your page
loading, making visitors and search engines happy.
Minifying your code removes:
• White space characters
• New line characters
• Comments
• Block delimiters
These types of characters are used to add readability to the code but they are not required for
the code to execute properly. There are several types of tools that you can use to minify your
code manually. You can minify by hand or use one of the many free online tools and copy and
paste your code from and to your site. Some of the tools that I had tried are :
1. https://github.com/kangax/html-minifier
Preface:
• I Downloaded the source code and executed locally.
Screenshot: Minification without preserving line breaks. (43.9% score)
2. Difficulty Faced :
• The source code is found to have problems while executed with Google Chrome browser.
Advantages :
• It has a numerous provisions with which a user can decide the criterias for minifying the HTML
provided.
• Line Breaks can be preserved for readability while minification. However the minification score
won't be as high as when minified without preserving those.
Here, we have achieved 29.6% score on minification. Line breaks are preserved for better readability.
2. http://www.willpeavy.com/minifier/
Preface
• Upon navigating to the URL, we are provided with a text area where we can paste our HTML
code to be minified.