This topic has 13 replies, 3 voices, and was last updated 2 years, 2 months ago ago by Rose Tyler
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?
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.
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.
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
private
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
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
But when I change theme the dynamic cache works. Doesn’t that mean that it’s from the theme?
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
I have talked with the server. Check private
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
Thank you so much!
You’re welcome!
Regards
Tagged: dynamic cache, optimization, product page, sg optimizer, woocommerce, wordpress
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