• Resolved sinirpl

    (@sinirpl)


    Hello!

    I have found a little issue after activating LiteSpeed Cache plugin, it disables my theme visit counters for posts and pages, after cache flush it counts only the first visit. Console and WP debug mode shows no errors in PHP or JS. What should I check in settings?

    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @sinirpl, as the page is cached, the counter will also show the cached number. You may use our ESI to make it update to date, for more details, please check: https://blog.litespeedtech.com/2017/09/06/wpw-esi-and-litespeed-cache/

    HI @sinirpl, we also suggest you convert the visit counters code to ajax update which will have better performance.

    Thread Starter sinirpl

    (@sinirpl)

    Thank You very much for reply, I’ll have to add some ESI code to theme ??

    Best Regards

    Hi @sinirpl, great to hear that. As I mentioned the ESI might slow down a little bit of your site so if the counter widget is able to convert to Ajax version we recommend you to do in this way.

    Plugin Support Hai Zheng?

    (@hailite)

    Need to clarify this point:

    When using ESI, to count each visit, the page has to hit that ESI PHP, which will make each parent page visit like a non-cache visit. For example, user visits page A. In page A you embedded an ESI block B. Page A is cached (load in 10ms) while ESI B is non-cacheable (load in 2s). That will result page A loaded 2s+10ms.

    To avoid impacting the page visit, ajax will be the best choice for counting.

    Thread Starter sinirpl

    (@sinirpl)

    Thank You @stanleylitespeed and @hailite, I understand how it works, counter is from theme framework and it is Ajax, but only to add new view to database unfortunately. I didn’t lost them, but they were not shown on front-end, I see it now after inspecting the theme code, for now I will use ESI in child theme and ask theme support to make it Ajax both ways ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘blocked visit counters’ is closed to new replies.