Pop up reappears after acceptance
-
hi,
I know that the issue is related to the cache. I’m using Cache Enabler plugin, and I asked them why the banner is cached also if I exclude stm_gdpr_cookie. This is their answer:
You’re right, the following would be correct to have a cookie matching stm_gdpr_cookie bypass the cache:
/^(wp-postpass|wordpress_logged_in|comment_author|stm_gdpr_cookie)_?/
However, when checking your website I see that this will not solve the issue that you’re currently experiencing. The cookie is not set until after the notice has been dismissed. This means the page will be cached beforehand and then the cached page will not be delivered when the notice has been dismissed and the cookie has been set (meaning the notice will always be cached).
There are two solutions that I can think of that could resolve this. The first would be setting a cookie when the notice is shown and bypassing the cache when that cookie is set. If you require your page not to be cached when the notice is shown this would be a good solution. If you want your page to be cached while still showing the notice I would recommend using a JavaScript solution. Does the plugin offer the ability to hide the notice with JavaScript so it can still function on cached pages?
I hope you can help me!
Thanks
- The topic ‘Pop up reappears after acceptance’ is closed to new replies.