• How can I exclude a specific html file from minify?
    I have a specific plugin which does not work with minify html enabled.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    unfortunately there is no such way

    you may need to set HTML minify OFF

    Best regards,

    Thread Starter Ben Andersen

    (@ben72)

    Thank you for your reply @qtwrk!
    So do you think it’s 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 doesn’t work if HTML minify is ON. To minify HTML only means that line breaks and double spaces are removed. HTML minify doesn’t change the code.

    Thread Starter Ben Andersen

    (@ben72)

    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.

    Thread Starter Ben Andersen

    (@ben72)

    I got this response from FacetWP:
    FacetWP uses <!--fwp-loop--> 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 <!--fwp-loop-->?

    Thanks.

    This is not good if detection is done with comments because removing comments is also part of HTML minify. In this case you can’t 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.

    • This reply was modified 2 years, 4 months ago by serpentdriver.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    well , there isn’t really any “filter” or “exclude”

    but I will advice our devs for such case

    Thread Starter Ben Andersen

    (@ben72)

    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.
    FacetWP’s 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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Exclude html from minify’ is closed to new replies.