Support » Plugin: Ocean Posts Slider » Random posts with page cache

  • Resolved wpkiller

    (@wpkiller)


    Dear Nick,

    Thanks again for a great plugin. I’m using it on a client’s front page set to show 5 random posts.

    The thing is that with W3TC using page cache – the random won’t work. I had to instruct W3 to not cache the frontpage all together in order for the random to work. This results of course in higher response times for the frontpage.

    Any easy workaround maybe? I understand there’s a solution using jQuery or something, but I’m not a full stack programmer unfortunately. At least not yet. 🙁

    TIA.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author oceanwp

    (@oceanwp)

    Hello, sorry but it seems to be a cache issue not a problem with the plugin.

    Correct. I didn’t say it’s a problem with the plugin. Thought you might have a workaround. Maybe excluding a js file or something.
    Thanks anyway.

    Plugin Author oceanwp

    (@oceanwp)

    Ah ok 🙂
    Try to exclude this script:
    /wp-content/plugins/ocean-posts-slider/assets/js/main.min.js

    Unfortunately, there’s no way to exclude a js under page cache. 🙁
    I’m using Autoptimize for minification. Tried to exclude the js there, but then the whole posts slider was gone.

    Plugin Author oceanwp

    (@oceanwp)

    Hi, can you send me the page url where you have the problem?

    Plugin Author oceanwp

    (@oceanwp)

    Hi, your caching plugin is activated? Because it works on my side.

    Sure. 🙂
    As I said, I’m turning off the page cache for the front page (there’s such a feature in W3TC).

    Plugin Author oceanwp

    (@oceanwp)

    Hi, I reloaded the page several times, there are no issues, the slider is displayed every time.

    Sure. I’ll say it for the 3rd time – I’ve disabled the page cache for the front page.
    That’s why you don’t see any problem.

    If you want, maybe we should set a time frame for me to bring the cache back so you can see it.

    Plugin Author oceanwp

    (@oceanwp)

    You need to activate it, otherwise, I don’t see if there is a problem. I have some minutes now, if you activate it, maybe I can see if there is a JS error in the console.

    Great, I’ve activated it now.
    There are indeed several errors for onloadwff.js file.

    Plugin Author oceanwp

    (@oceanwp)

    It doesn’t work on your side? I checked your site, it works, the slider is displayed.

    It is displayed. But it’s set to random. So every page refresh should show different posts. But iot will always show the same posts while cache is on.

    Plugin Author oceanwp

    (@oceanwp)

    Ah yes. Have you tried another caching plugin? Like WP Fastest Cache? Or I recommend WP Rocket, which for me the best caching plugin ou there.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Random posts with page cache’ is closed to new replies.