• Resolved nickpapag

    (@nickpapag)


    Hello and thank u for this great plugin.
    I need your help with an issue that i’m facing with site origin post carousels and caching.
    My homepage has 3 carousels that load a lot of posts but 10 by 10 at a time.
    Every morning when i test my site, the carousels display only the 10 first posts and no other post. I empty cache in w3 dashboard and the it starts loading OK the next 10, etc..
    This works fine for a while, but need to do the same procedure everyday without any change in meanwhile (e.g. adding a new post)
    Every morning i empty cache to have my carousels work.
    I have carousels also in other pages with same behavior
    Thanks in advance for your time

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Can you please share the settings you’ve enabled in Performance>General settings?
    Are you using any other caching/minify plugin, CDN, or server-side caching?
    Thanks!

    Thread Starter nickpapag

    (@nickpapag)

    hi @vmarko and thank u for your quick response.
    I’m not using any other caching/minify plugin, CDN, or server-side caching.
    Only w3 settings.
    Please check my settings:
    https://drive.google.com/file/d/1ALWe5YZh-64XnXou-CRAT2xyFtgLTqIq/view?usp=sharing

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    Thank you for the information. There is nothing in the settings that may suggest any sort of problem. I can see that you are only using Page Cache – Disk: Enhanced and Browser Cache.
    Can you please notify us once the issue re-occurs so we can check the website and inspect the source?
    Thanks!

    Thread Starter nickpapag

    (@nickpapag)

    Yes, before 5 hours, i had to empty the cache.
    When the issue appears again, i will not empty, and inform you to check, just to see how it goes.
    Thank u for your time!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag
    Thank you and we’ll make sure to check this.
    Thanks!

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko Hello again. One more day with the issue present. Please check carousels in home page.
    The 10 first posts are loading as expected and then if u navigate to the right it stops and shows nothing. Of course all of them have more than 10 posts.
    The same to all my pages that i use carousels.
    I will not clear cache until you check and confirm the issue.
    Thank u very much!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    Thank you for the information.
    Yes, I can see the issue. Can you please temporarily disable other plugins, leaving W3 Total Cache enabled and see if there is a possible conflict?
    If the issue is gone, enable the plugins one by one and see which plugin may be causing the conflict.
    Thanks!

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko Thank u Marko for your testing. Site origin tested too from their side and told me this:
    The Post Carousel JS file is from the previous update. Something is forcing the old version to be loaded. This file is outdated: https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.min.js. The non-minified version isn’t which aligns with this being a general caching issue: https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.js.

    One option might be to exclude this file from caching for the time-being.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    Thank you for the information.
    I’ve checked this and there is a possibility that the file is cached in the browser.
    Now if you go check https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.min.js you can see Cache-Control: max-age=31536000, public, meaning that the file has 1-year expiration. What happens is, those files have been cached in the user’s browser from a previous visit and the cached version is served instead of the most recent version. The expiration of this cache is called time to live, or TTL and it is associated with this local cache in your browser, which is why it will show the old version until this length of time has passed. To see the correct version of the files, the user has to either clear the browser’s local cache & reload the page or do a hard refresh of the page by pressing Ctrl+F5 to ensure their browser is using the latest file versions.
    Most of the plugin creators are using a unique query string for if they are updating some specific JS or CSS files. So ideally the mentioned file, when updated, should have a unique query string:
    https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.min.js?v=2.0
    When a user tries to access the URL, and the browser starts fetching the page data, it sees that it already has the page’s JS E.G. somefile.js, and says “Wait!, I already have this file cached, so I don’t need to fetch it again and can just present that to the visitor”. And the Browser has a point!
    In this case, the solution is to either manually add the query string to the mentioned file, or to use the option “Prevent caching of objects after settings change” in Performance>Browser Cache>CSS&JS subsection. This will ensure that all CSS and JS files have random query string E.G. https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.min.js?xNNNNN and once you update the plugin or make some custom changes in some JS or CSS file, simply click on the Update media query string button just above the General subsection in Performance>Browser Cache which will ensure that existing file modifications are visible to visitors with a primed cache.
    I hope this helps!
    Thank you!

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko Thank u very much for your time. Well i understand the most of your analysis, but this is a new issue so i think that latest update of plugin has to do with it.
    I will post to site origin your comment and see how it goes. If they don’t have a solution the second method seems a good alternative. Thanks again, i will inform you soon

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko Marko need your help.
    Site origin tested again and confirmed.
    They add a query/version string to assets but w3 is removing them.
    They recommend to follow your steps to prevent the post carousel JS file from being altered. Also told me to Consider disabling the specific setting that’s removing the query string as removing the query string can result in issues like happening for other plugins also.

    So… i must follow your second method?
    Sorry for stealing your time, but not an expert….

    ” “Prevent caching of objects after settings change” in Performance>Browser Cache>CSS&JS subsection. This will ensure that all CSS and JS files have random query string E.G. https://gym-vasil.lef.sch.gr/wordpress/wp-content/plugins/so-widgets-bundle/widgets/post-carousel/js/carousel.min.js?xNNNNN and once you update the plugin or make some custom changes in some JS or CSS file, simply click on the Update media query string button just above the General subsection in Performance>Browser Cache which will ensure that existing file modifications are visible to visitors with a primed cache.”

    Am i correct?
    Thanks again!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    Thank you for the information. Check the Performance>Browser Cache>CSS&JS section if the option “Remove query strings from static resources” is enabled. if so, disable it save all settings and purge the cache and see if the query string gets removed after this.
    Thanks!

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko
    No it is not enabled.
    I made the changes enabling Prevent caching of objects after settings change
    in CSS&JS section and Update media query string.
    I’ll test it for few days to see how it goes with your suggestions. Thanks again

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @nickpapag

    You are most welcome!

    Thread Starter nickpapag

    (@nickpapag)

    @vmarko New settings make it work. Thank u very much for your support!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Caching and Post carousels’ is closed to new replies.