Why people minify assets and not the HTML?
One likely reason is that markup typically changes MUCH more often, and would have to be minified for every page load. For instance on a given Stack Overflow page, there are timestamps, usernames, and rep counts that could change with every page load, meaning you would have to minify for each page load as well. With "static" files like css and javascript, you can minify far less often, so in the minds of some, it is worth the work up front.
Consider also that every major web server and browser support gzip, which compresses all of your markup (quickly) on the fly anyway. Because minifying is slower and much less effective than gzipping anyway, webmasters may decide that minifying for every page load isn't worth the processing cost.
Why do many sites minify CSS and JavaScript but not HTML?
Because if you're doing things properly you're serving HTML gzipped anyway, so the low-hanging fruit of HTML minification - whitespace - isn't all that relevant. There aren't lots of easy targets (e.g. variable names) for minification in HTML, which are present in CSS and JavaScript. Much of the content of HTML is the actual content of the page, which probably can't be minified (and, as others have pointed out, will almost certainly vary more frequently than your CSS or JS).
Does minified JavaScript code improve performance?
Minifying improves performance for your page overall by decreasing the load time (even if only slightly).
Neither minifying nor obfuscating alter the execution time by any perceivable amount for the vast majority of JavaScript code out there.
I do recommend minifying for those reasons and more. Minifying multiple scripts together (like jQuery and its plugins) can yield even greater savings.
As pointed out, on constrained devices and/or with very large codebases minifying could yield a noticeable result.
CakePHP: Best way to handle asset minification / combining?
If you're after something more simple than Mark Story's AssetCompress plugin, check this out:
https://github.com/joshuapaling/CakePHP-Combinator-Plugin
It will combine and minify JS and CSS files, and you can easily make it only combine/minify when debug mode is 0 (there's a example of that in the .markdown on GitHub). It uses the date modified of the included JS/CSS files to decide when it needs to make a new cached file.
It isn't nearly as full-featured as Mark Story's plugin, but it is simple, does the job, and it should only take you 10 or 15 mins to set up.
Angular 7 is not minifying html, js, css files
Ok, looks like I figure this out. "Builder" option in angular.json
file has been changed. It's because custom webpack which was used in the project. Simply changed:
"builder": "@angular-builders/custom-webpack:browser"
to:
"builder": "@angular-devkit/build-angular:browser"
that solved the problem with minification all files on production environment.
Related Topics
CSS: Responsive Way to Center a Fluid Div (Without Px Width) While Limiting The Maximum Width
Controlling Spacing Between Table Cells
How Could I Play a Shoutcast/Icecast Stream Using HTML5
Set Div to Remaining Height Using CSS with Unknown Height Divs Above and Below
Using "Label For" on Radio Buttons
How to Use Text-Overflow Ellipsis in an HTML Input Field
How to Make a Div Take The Full Width of The Page When It Is Inside Another Div That Have 90% Width
How to Display Openweathermap Weather Icon
How to Prevent Div Tag Starting a New Line
How to Auto Resize HTML Table Cell to Fit The Text Size
HTML5 Drag and Drop Images from a Toolbar to a Canvas
Is This Empty Space Actually Margin-Right Which Is Not Recognized by Dev Tools
CSS Override Rules and Specificity
How to Put Table in The Center of The Page Using CSS
Increase Cursor Size in HTML Body