Never cache cookies
-
Dear Support,
I am writing you to understand how I could implement with SG Optimizer the function not to cache cookies. This function is available for example in other Cache plugins such as WPRocket.
The issue is the following, SG Optimizer is not caching if there are cookies in the header.
Now, preventing plugins to add cookies to the header is not always possible. There is a function in Woocommerce allowing the display of recently viewed products. Whether this widget is used or not, woocommerce is adding cookies to the header.
In case somebody is not using this feature, he/she could implement a code in function to exclude woocommerce to run the function.
But what about is somebody is really using this feature, I cannot believe that SG Optimizer would not allow users to let websites displaying recently viewed products unless the user accept a long loading time as Nginx would not be able to solve the page, therefore ultimately being penalized by google.
Could you please tell me:
- how could add an exception in SG Optimizer, therefore exclude woocommerce_recently_viewed to be cached?
- In case this SG Optimizer does not currently provide this feature, could you please help me to identify a temporary solution. Therefore developing a code that would avoid woocommerce_recently_viewed to add cookies to the header? (please see this post where the user was helped by the hosting provider to solve the issue https://www.ads-software.com/support/topic/recently-viewed-cookie-causing-cache-bypass-how-to-disable/ ).
Best regards,
F.
The page I need help with: [log in to see the link]
- The topic ‘Never cache cookies’ is closed to new replies.