• Resolved isabeljev

    (@isabeljev)


    Hi,
    I’m using the Search & Filter plugin to display a filterable grid of projects/posts on my site, but I’m running into a compatibility issue when using it alongside the LiteSpeed Cache plugin.

    When LiteSpeed Cache is active, the filter results fail to load properly — they either don’t appear at all or the AJAX filtering breaks. If I exclude the entire page from caching, everything works as expected. However, I would prefer to keep caching enabled for the rest of the page and only ensure that the results module (within the ymc-smart-filter-container class) is not affected.

    Could you please advise:

    • Are there any specific JavaScript files or scripts related to the filter functionality that I could safely exclude via LiteSpeed’s JS Exclude settings?
    • Is the plugin fully compatible with caching systems like LiteSpeed when AJAX is enabled?
    • Are there any other recommended settings or known best practices to make sure the filters and results work correctly under LiteSpeed Cache?

    Thanks in advance for your help

    • This topic was modified 10 months, 2 weeks ago by isabeljev.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author YMC

    (@wssoffice21)

    Hi!
    We would like to note that plugins that are responsible for content caching usually have different settings, we think that the LiteSpeed Cache plugin also has this feature.. Our plugin works on asynchronous requests to the server, so it does not have a special load on loading the page content. Of course, cacheable plugins can block the execution of different types of requests, including Ajax requests. You can exclude the ability to cache our plugin files in the settings of your plugin. The main javascript file that is responsible for all the functionality of the plugin on the frontend is the file:
    /wp-content/plugins/ymc-smart-filters/includes/assets/js/script.min.js
    You can add it to the list of excluded files in the cached database so that it does not block the execution of requests. We hope this helps you.

    • This reply was modified 10 months, 2 weeks ago by YMC.
    • This reply was modified 10 months, 2 weeks ago by YMC.
    Thread Starter isabeljev

    (@isabeljev)

    Hi,

    Thank you very much for your detailed explanation, I’ll try it that way.

    Plugin Author YMC

    (@wssoffice21)

    Good Luck!

    Thread Starter isabeljev

    (@isabeljev)

    Hi, thanks for your previous reply.

    I’ve tried excluding the plugin’s JS files from LiteSpeed Cache, but I’m still facing the same issue:

    • The results module works fine after I purge the cache.
    • After about 24 hours, the module stops displaying until I manually refresh the cache again.

    I believe this is related to a WordPress nonce expiration issue (since nonces usually expire after 24h).
    If LiteSpeed serves a cached page with an expired nonce, the AJAX requests from the filters will stop working.

    Could you please confirm which nonce(s) your plugin uses on the frontend (for the results module)?
    If I know the exact nonce name, I can configure LiteSpeed’s ESI (Edge Side Includes) nonce settings to refresh it separately, without disabling cache for the entire homepage.

    Thanks a lot for your help!

    Hi @isabeljev ,

    Is your problem solved?

    Because I have the exact same issue,

    I use too LiteSpeed ​​Cache, and like you, after few days posts in the grids stop displaying, and I have to clear the cache manually. The problem returns after a few days.

    Thanks 🙂


    Thread Starter isabeljev

    (@isabeljev)

    Hi @ecodev


    Unfortunately, no one gave me a solution that actually worked.

    The only thing that solved the issue for me was excluding from the LiteSpeed Cache all the URLs where the grids are displayed. It’s not the ideal solution for me, but for now it’s the only thing I’ve found that actually works.

    Hope it helps!

    Hi @isabeljev ,

    I had to wait a few days between each test, so it took quite a while to get back to you.

    Since a week now, I haven’t had the problem anymore; I think I’ve found the cause (in my configuration).

    I disabled all the Yoast SEO plugin options in > Crawl Optimization > Disable unwanted content formats.

    Some of these “options” are potentially present in other plugins, like Asset CleanUp.

    I hope this answer help you.


    Thread Starter isabeljev

    (@isabeljev)

    Hi @ecodev ,

    Thank you for your investigation and for keeping me updated. I’m glad to hear those steps worked for you.

    In my case, on the websites where this issue occurs, I’ve already checked those Yoast SEO settings and they were disabled, so I understand the problem is not coming from that side for my clients.

    In any case, I’ll keep your suggestion in mind in case it comes up in a future project and the issue turns out to be related to what you mentioned.

    Thanks again very much!

    Best regards,

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.