• filipfek

    (@filipfek)


    Hi,

    First of all, thank you for creating such a great plugin – Posts Like Dislike is an excellent tool, lightweight and very useful. I really appreciate your work on it.

    However, I noticed one limitation that can be confusing for users: the like count does not update dynamically after clicks the like button (temporarily is, for example, it changes from 0 to 1, but when I refresh the page I see 0). Even though the action is registered and saved (I can confirm the count updates correctly in the backend), the number displayed on the frontend doesn’t change until the cache clears (The user has to wait for their cache to refresh. When I am logged in as WP Admin, I can see the changed value right away).

    This behavior becomes especially noticeable in the following scenario:

    • On Device A, I click the “like” button. The count changes from 0 to 1.
    • If I check the post in the admin panel, I can see the updated count.
    • But on Device B (another user or incognito session) or on Device A after refreshing page, the count still shows “0” – even though it’s already updated in the database.
    • The counter only reflects the new value after a delay (likely due to caching or lack of dynamic fetching).

    This can create a confusing experience for users who don’t see immediate feedback. I understand the plugin uses cookie or IP restriction for vote tracking, but it would be really helpful if the like count could update via AJAX, fetching the live value after someone votes.

    Would you consider adding an option to:

    • Automatically update the counter on click via AJAX?
    • Or provide code / JS method to refresh the counter?

    Thank you again for all your work! Looking forward to future updates.

    Best regards,
    Filip

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Regan Khadgi

    (@regankhadgi)

    Hello Filip,

    Thank you for writing to us and thank you for your suggestion. Yes currently the like and dislike is generated within the page’s content where the comments are generated. This is a bit tricky because dynamically loading also can be affected by cache because while loading dynamically we will need to fetch it through an endpoint(URL) and the endpoint’s data will also be cached and same thing will happen.

    The best solution would be to clear the cache when the post is liked or disliked so that it can display the new updated data.

    Can you please let us know which cache plugin are you using? There are way too many different caching plugins and different cache plugins store the cache in different mechanism and they clear the cache on their own way but we will check if there is any hooks available for that plugin to clear the cache.

    Thanks.

    Thread Starter filipfek

    (@filipfek)

    Hello Regan!

    Thank you very much for your reply. To be honest, I’m currently not using any cache plugin at all.

    If you are able to recommend a lightweight, non-bloated, and free cache plugin that would work well in the context of “Post like and dislike,” and which I can easily configure to refresh the like data (and how to do that in the easiest way), I’d be more than happy to test it out 🙂

    Thanks again!
    Filip

    Thread Starter filipfek

    (@filipfek)

    Hi @regankhadgi

    would you be able to suggest what Cache plugin in this context would be best to use? I would be very grateful 🙂

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

The topic ‘Likes dynamic refreshing’ is closed to new replies.