Get rid of Minify HTML option #2682
What are we proposing to do?
With this update we are hoping to remove the « Minify HTML » option from WP Rocket UI (File Optimization tab).
Why are we doing this?
GT Metrix has deprecated this recommandation as the effect on overall performance is very small :
GT Metrix was the latest performance tool to recommend HTML minification. PageSpeed Insight and Pingdom Tools ignore this recommandation since a while.
Here a GT Metrix test comparaison:
With Minify HTML
Without Minify HTML
The loading time is exactly the same. Why? The page size only increased by 0.01KB...
How will we do this feature?
From version 3.7, all users will not have this option in WP Rocket UI and HTML minification won't be applied anymore.
Both existing and new users will have the same experience.
Since we are removing a feature, this should be low risk. The major concern is educating customers.
Documentation and Translations
The text was updated successfully, but these errors were encountered:
@Camilo517 We won't have an option to just delete HTML comment. It won't speed up your website at all.
In average, on desktop, HTML minification will improve by only 7ms your loading time, which is insignificant. We prefer to be focused on improving existing and new features which could help to save seconds!
Sub-task for epic #2682 ### inc/Plugin.php
✔️- Remove the minify_html_subscriber entry from the subscribers ### inc/classes/subscriber/Optimization/class-minify-html-subscriber.php ✔️- Deprecate the class ### inc/Engine/Optimization/ServiceProvider.php ✔️- Remove registering minify HTML subscriber in $provides and register() ### inc/vendors/classes/class-minify-html.php ✔️- Deprecate the class
@AlessioGr I can understand your perspective. 7ms is better than 0. Keeping it might not cause any harm, but that's not always the case.
Don't worry, we are planning on many features that will save seconds, not milliseconds. Thanks for your input!
I remember this was removed at least one other time before, and for those of us that still wanted it, we could at least add a line of code to wp-config.php to get it back. Might that happen again, or is it really gone completely, for good?
I'm sure I'm preaching to the choir on this, but isn't the philosophy that every little bit counts? Yes, it's only a fraction of a second faster, but on just one loading of one page. If you have thousands, tens of thousands, hundreds of thousands, or even millions of visitors, this feature will have exponential value in terms of server resources.
I do understand that the greater good must be for the majority of users, who on average probably only have hundreds of visitors (and so it really will make no difference), but I thought I'd throw my $0.02 in just in case it manages to sway the matter at all.
@bhadaway Thanks for taking the time to provide feedback. I understand your point of view, and it is hard to take away features.
The entire code is removed from WP Rocket, so there is no filter or code that can bring it back. This was removed as part of making WP Rocket more efficient both for customers and developers. Minification of HTML consumes server time too. A million pages to minify (every 8 hours) is a lot of server resources that gives negligible returns.
Lesser code to maintain also means we can focus on innovative new features that will give real returns. Don't worry, when we take away 0.01second of performance, we will add 10X or more performance gains with other new features.
It's clear that this feature is most likely gone for good, so I only wish to add the following for the sake of concluding the discussion. When you say needs to re-minify every 8 hours, I assume you mean if the user has set the cache to automatically clear every 8 hours, not if it's set to never clear automatically?
Also, I felt minifying all the HTML into one line had other value like hiding formatting, cleaning up the code/comments, etc. I simply preferred it. Again, I understand that I'm an outlier and a good 95% of users probably weren't even aware of the feature or its results anyway.
In any case, WP Rocket is an essential tool for any website built with WordPress. Thanks for all the hard work and I'm sure I'll continue to be a user no matter how the project evolves in the future.
Not sure why you are taking the 7ms as the "definition". Maybe in a very short html, improvement its just 7ms. But in a 2400 lines html, were 50% are blank spaces and new lines, that will be a little bit more than 7ms. As html grows, minifying html becomes exponentially more useful. Why don't leave it as an option to enable/disable? if it cause problems just disable it.
If you are using gzip or Brotli, that will remove the whitespaces anyway. The difference wouldn't make much sense in terms of overall performance.
Not every user is happy to disable an option. They feel like they are not getting their full value out of it. We need to spend time and energy to investigate and figure out what the issue is.
The main reason to remove is that the feature didn't add any considerable value. Most hosts use gzip.
(translated). I want to join the conversation just now, because I installed WP Rocket recently and I find a regular plugin like other cache plugins. WP Rocket appears to be quite "heavy" on the WordPress backend, but it improves significantly for the frontend.
WP Rocket is better for mobile devices, if you test it on PageSpeed Insights you can see performance improvements.
And now talking about minify HTML: it seems that developers are worried about people who don't want minify HTML and ignore those who want minify HTML. I see a full plugin when it has all the options to choose from. This is a fact!
The point is: WP Rocket developers stick only to GT Metrix, but all of their customers test PageSpeed Insights, including me.
Virtually all popular WP site caching and optimization plugins have the minify HTML option. Is only WP Rocket right? I see the opposite!
If WP Rocket wants to do a reputation analysis, make a free WordPress version available. I don't mean the plugin is bad, but it would be a 3 star plugin. I repeat, the plugin is not bad, on the contrary WP Rocket is great, but only because the information is complex and the resources incomplete, at least for most.