Many website caching tools including options for minifying HTML and CSS. Does it help? Google says yes.
Learn more about this by reading the full post over at Search Engine Roundtable.
Subscribe! You can subscribe to this podcast on Apple Podcasts, Anchor, Google Podcasts, Spotify, Breaker, Pocket Casts, RadioPublic, Stitcher, Overcast, and a variety of other places. Be sure to rate the podcast wherever you choose to listen!
If you have a caching tool on your site, such as WP Rocket on WordPress, there are options to allow you to minify your HTML and CSS. What does that mean, and does it help?
When code is written for a website, it’s typically written in a way that humans can understand, which is clearly helpful. When it’s time to go live, though, you only need Google to read your code, and human-readable code can be a bit bulky with extra spacing, comments, etc.
A lot of caching tools include an option to minify those files; in essence, to squish them down to a smaller size by removing spacing and comments and things like that. It’s an uglier-looking file (at least to us humans), but the smaller file size means that you site will load a smidge faster.
A user recently asked Google’s John Muller about this specifically, asking: “It’s recommended to compress the HTML and CSS code?”. John’s answer:
“Sometimes minifying HTML & CSS can reduce the size of the files, so it can certainly be worth looking into that.”
It’s important to note that this kind of minification is only minimally helpful. It’s good to do, for sure, but don’t spend too much time on it. Some themes and programs don’t play nicely when minified, and it’s likely not worth your time to do it if you have to troubleshoot too much.
If you have a caching plugin in place, give it a try. Choose the option to minify the files, and then site how your site looks. If it still loads properly, then congratulations — it’s a bit faster! If your site breaks or looks funny, then just undo that option, clear your cache, and move on with your life. There are a lot of pieces that go into making a site fast, and this is just one of them.