You’ll know because users won’t get displayed the consent notice, or cookies that track personal data will be stored automatically without their prior consent
Oh, your EU cookie consent pop-up is not working as expected when enabling cache on your WordPress site? No worries. This is still quite a common issue when combining a cache plugin with a EU cookie laws plugin.
It feels a lot better knowing you’re not the only one experiencing it, right?
- Cache Enabler not working with Eu Cookie Law plugin
- Caching plugins like WP Fastest cache causing issues
- PHP Cookies Doesn’t Work With WP Super Cache
- Which cookie law plugins are compatible with WP Rocket?
However, it is important to set up web sites properly in order to comply with GDPR regulations, as well as it is to understand why this is a bit of a headache.
It is not too obvious that two different pieces of software are being put to work together.
The thing is that the cache plugin should not cache the GDPR cookie by any means, ever; if that is the case, something got misconfigured along the way.
You’ll know because users won’t get displayed the consent notice, or cookies that track personal data such as Google Analytics and Google AdSense will be stored automatically without their prior consent.
How to Solve The Issue?
The cache plugin and the GDPR plugin of your choice must be compatible.
- Learn about your cookie plugin set up. Does it use one cookie only? What’s its name? Does it use more? How are they used?
- Get familiar with your cache plugin
- Exclude the cookies from the cache
It is eventually up to you, the webmaster, to make sure the GDPR plugin’s acceptance cookie – or cookies – is not cached.
Bear in mind that, for example, some web sites may install two cookies: an acceptance cookie and a refusal one; whereas others will install an acceptance cookie only, setting its value to
Then, the WP cache plugin should hopefully provide with an easy way to exclude the cookies you don’t want to be cached.
Figure 1. Click on the Add New Rule button
Figure 2. Exclude the
Figure 3. Voila!
This should do the trick with any other cache/GDPR combo as long as the two plugins are compatible.
I hope this was useful. Thanks so very much for reading and sharing.