开发者 | teckel |
---|---|
更新时间 | 2023年2月26日 06:47 |
捐献地址: | 去捐款 |
PHP版本: | 5.2.4 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv3 or later |
版权网址: | 版权信息 |
Yes. Under the Settings menu in the admin console there's a Minify HTML menu item which allows you to modify Minify HTML settings.
Magic, obviously! Actually, it creates an output buffer and then preforms its 'magic' on the output buffer. It kinda is like magic.
Normally, you won't notice any changes to the way the site looks in the browser. However, if you rely on white space between HTML tags (which you shouldn't be doing) you may notice very isolated elements with reduced horizontal spacing. This is because inline objects will add a few pixels of spacing if there's whitespace between the objects. I consider Minify HTML a good way of finding these style 'errors' and correcting them with proper padding or margin style.
Plenty. On my server that's running dozens of websites, it takes 0.007 seconds to minify a page. Also, because the HTML file is smaller, it will speed up transfer and rendering times. Minify HTML doesn't use bloated external libraries that add additional overhead and therefore take longer to process.
With real-world test sites, the HTML file is around 20-25% smaller. Even when using deflate/gzip compression the resulting file is around 20% smaller, speeding up download times.
With Minify HTML, the source HTML file will be smaller, therefore, it will compress faster and be even smaller once compressed. Also, even with deflate/gzip, your HTML markup will still look sloppy and amateurish. Minify HTML corrects this even for deflated/gzip transfers (and also saves another 20% in bandwidth).