Issues with page cache or proxy CDN
-
Hi. Great plugin. However, I have run in to issues with my page cache (LSCache) and QUIC.cloud proxy CDN (similar to Cloudflare).
When both page cache and CDN are turned off, all works well. When I turn on either, the cookie prefs don’t get changed or updated. I looked in to this and it seems that the initial cookie settings are sent thru in page response headers, so they are cached by the page or CDN cache.
I managed to get it to work with LScache by using their Cache Vary options (so diff version of page cached for each cookie variation).
To fix this I followed the info provided in [1] to set a cache-vary for the plugin cookies in my sites .htaccess file:
#
# LS Cache vary to cache diff versions of page based on GDPR cookie values.
#
<IfModule LiteSpeed>
RewriteEngine On
RewriteRule .* - [E="Cache-Vary:wpl_viewed_cookie,wpl_user_preference"]
</IfModule>[1] : https://ww.wp.xz.cn/support/topic/honoring-a-cookie-while-still-caching/
However, almost all of my sites use CDN to speed up page delivery to improve user experience and google page speed ranking.
Do you have any ideas how to make this work with a proxy CDN like QUIC.cloud or Cloudflare?
-C
The topic ‘Issues with page cache or proxy CDN’ is closed to new replies.