Wordpress LScache Plugin: Exclude html from minify
Last Updated on: Wed, 15 Apr 2026 00:00:02 How can I exclude a specific html file from minify? I have a specific plugin which does not work with minify html enabled. Thanks! Hi, unfortunately there is no such way you may need to set HTML minify OFF Best regards, Thank you for your reply @CacheCrawler! So do you think its a problem in the code that could potentially be fixed to make minify html work? Thanks. @ben72 There must be other reason why this plugin doesnt work if HTML minify is ON. To minify HTML only means that line breaks and double spaces are removed. HTML minify doesnt change the code. Then there is a conflict with the FacetWP plugin when I use it in one case. Where should I report this? There is not a real conflict and nothing has to be reported. You must either exclude specific requests from being cached or from optimizing. Maybe plugin support can tell you what exactly has to be done. I got this response from FacetWP: FacetWP uses HTML comments to detect the post loop and add a facetwp-template class. HTML minification removes that HTML comment causing the issue. If it is the same issue, the fix would be to not use HTML minification, or to add the facetwp-template class manually, as described in above link. Or, if Lite Speed Cache provides a way, exclude HTML comments from being removed. Maybe Litespeed could avoid removing ? Thanks. This is not good if detection is done with comments because removing comments is also part of HTML minify. In this case you cant use HTML minify function, but this is not a bug or a malfunction of the cache plugin. Minifying HTML always removes comments and is like a standard . Maybe plugin support has any idea to add a filter that prevents removing of comments. Maker of this plugin should find any other solution for detection, because each plugin for optimization works like LiteSpeed cache plugin if it has a function for HTML minify. Hi, well , there isnt really any filter or exclude but I will advice our devs for such case Thanks! I got it solved by adding a css-class manually. From the facetwp devs: Maybe LiteSpeed Cache developers could consider adding a hook to (a) prevent comments from getting stripped, or (b) whitelist specific comment tags. FacetWPs automatic query detection on WP archive pages and pages with custom queries requires the HTML comment for the frontend Javascript to add the facetwp-template class. But you can easily circumvent this by adding the facetwp-template class manually to the div around your loop. You can then use HTML minification.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference