Dynamic cache of sg optimizer doesn’t work on product page

This topic has 13 replies, 3 voices, and was last updated 2 years, 2 months ago ago by Rose Tyler

  • Avatar: Nick
    Nick
    Participant
    October 11, 2022 at 09:14

    Hello,

    I am using the siteground optimizer and the dynamic cache doesn’t seem to work on product pages. (but works on other pages)

    – I have tried switching to another theme and dynamic cache works.
    – I have deactivated all plugins and left only woocommerce and store activated and the issue remains.

    So, it’s definitely something from the theme. The reason for that appears to be the cache-control: s-maxage=604800, max-age=60 headers applied somewhere on the theme templates or elsewhere.

    Could you please find the set-cookie-header and tell me how to remove it?

    Please, contact administrator
    for this information.
    12 Answers
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    October 11, 2022 at 09:34

    Hello, @Nick,

    Actually, the thing is our theme has cache options too if you are using the cache plugins then make sure that the theme options for the cache are turned off because both enabled at the same time will cause unexpected issues on the site. You can find the theme options for cache by navigating to the XSTORE >> Theme Options >> Speed Optimization Wizard check the image: https://postimg.cc/PPjRGgQx disable the options from there and then check back to your issue after clearing the browser cache.

    Regards 8Themes Team.

    Avatar: Nick
    Nick
    Participant
    October 11, 2022 at 10:16

    I have already tried disabling everything in cache settings etc. Still, the dynamic cache doesn’t work.

    There is probably a set-cookie header set by the theme which needs to be removed.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 12, 2022 at 08:17

    Hello @Nick,

    Provide temporary wp-admin + FTP access, and screenshots for a better understanding of your request.
    Then I will pass this topic to our dev team.

    Regards

    Avatar: Nick
    Nick
    Participant
    October 12, 2022 at 08:37

    private

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 12, 2022 at 08:43

    Thanks for the reply.
    I’ve passed it to one of our technicians, and I will let you know once get an answer. Please be patient.

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 13, 2022 at 08:37

    Hello,

    We don’t have any cache control set actions in our theme. You may check it by yourself but we are sure about it. All caching which we use in our theme are in use by default WordPress functions ‘wp_cache_set’ and ‘wp_cache_get’. Maybe it is better for you to contact SG support because maybe they add some code inside .htaccess or anything else which should be modified on switching theme or fully removed.

    Regards

    Avatar: Nick
    Nick
    Participant
    October 13, 2022 at 08:44

    But when I change theme the dynamic cache works. Doesn’t that mean that it’s from the theme?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 13, 2022 at 10:09

    Hello,

    No, it doesn’t mean that definitely.
    Because dynamic cache could write some content inside .htaccess file (or any other ones) only when XStore theme was active. It could be done only on first fresh installation of plugin. So if you switch theme the code is still unworking (is relative) only for XStore Theme.
    Please, contact with plugin’s support !

    Regards

    Avatar: Nick
    Nick
    Participant
    October 14, 2022 at 06:36

    I have talked with the server. Check private

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 13:46

    Hello,

    You may add next custom php code to your child-theme/functions.php

    add_action( 'wp', function() {
        remove_action( 'template_redirect', 'wc_track_product_view', 20 );
        remove_action( 'template_redirect', 'et_wc_track_product_view', 20 );
    }, 70 );

    Also, don’t forget to clear your browser cookies -> https://support.google.com/accounts/answer/32050?hl=en&co=GENIE.Platform%3DDesktop

    Regards

    Avatar: Nick
    Nick
    Participant
    October 14, 2022 at 15:23

    Thank you so much!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 14, 2022 at 15:36

    You’re welcome!

    Regards

  • Viewing 13 results - 1 through 13 (of 13 total)

The issue related to '‘Dynamic cache of sg optimizer doesn’t work on product page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.