Closed sadbird520 closed 1 week ago
is minifying outputted html really worth the hassle?
With serverside enabled http compression, and user's browser content-encoding enabled by default, such minifying techniques became a relict of the past, when almost all website's traffic is compressed using gzip,deflate or brotli algorithm. Did you even check if your website's content isn't already compressed?
If only purpose is getting rid of white spaces and new lines in outputted html, you can use a _pregreplace function in your template. There are dozens of snippets about this on stackoverflow. But the real compression gain using such method is unnoticeable.
Thank you for your answer. It seems that there is really no need to force compression of HTML code.
Thank you to the developer for this fantastic work! Hopefully, developers will add this HTML compression feature. https://github.com/pfaciana/tiny-html-minifier