• Resolved nickpapag

    (@nickpapag)


    @misplon Hello Andrew. I’m facing again an issue with my carousels.
    Every morning i check my site and all my carousels load the 10 first posts.
    I empty the page cache and then everything OK for a day.
    Next morning, the same…
    This happens since 1.17.3. I’m testing it for 4 days now.(when in 1.15.8 never happened this)
    Any idea about this? I’m using w3 total cache but this is new issue.
    Thanks in advance for your time

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

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter nickpapag

    (@nickpapag)

    @misplon Thank u Andrew. The thing that i don’t understand is that every morning i need to empty cache and then till i go to sleep for night everything works perfect.

    Thread Starter nickpapag

    (@nickpapag)

    @misplon Back again with news from w3.

    Their clue:
    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.

    Andrew I have no problem to make the changes described in second method but i would be grateful if u check it once again as this issue was not present before.
    Thanks again for your support

    Plugin Contributor alexgso

    (@alexgso)

    Hi nickpapag,

    I can confirm your what they said is correct. If I open the JS file in incognito mode the correct file is output. Unsure how Andrew and myself cached the old JS file as when we previously viewed your website it was working as expected.

    We do add a query/version string to our assets but your caching plugin is removing them. I recommend following the steps they outlined to prevent the post carousel JS file from being altered.

    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.

    Kind regards,
    Alex

    Thread Starter nickpapag

    (@nickpapag)

    @alexgso First of all a big THANK YOU! All the team is here and i am greatful for that.
    I still cannot understand why this works for a day, after empty all caches and next morning, again i have to empty again without adding content in site.
    The issue appeared since latest update.
    anyway…
    Alex, as an amateur don’t know much of this. Do you mean to apply the second method described by w3
    “”…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.””

    Plugin Contributor alexgso

    (@alexgso)

    Hi nickpapag,

    Unfortunately, I’m not too sure why it would work for a couple of days and the issue would occur. I suspect it may relate to your W3 settings though as I know that plugin automatically clears its cache after a few days so that would align with the plugin clearing its cache.

    Yes, please follow the second method W3 outlined.

    Kind regards,
    Alex

    Thread Starter nickpapag

    (@nickpapag)

    @alexgso ,@misplon, @siteorigin
    Thanks for your support.
    New w3 settings fixed my issue and everything looks perfect ??

    Plugin Support Andrew Misplon

    (@misplon)

    Super, really glad to hear you’ve made progress and all is working normally now. Thanks for the update ??

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Post Carousel 1.17.3. and cache’ is closed to new replies.