Another EU GDPR Acceptance Cookie Cached on a WP Site

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?

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 into users’ computers automatically without their prior consent.

How to Solve The Issue?

Be aware:

The cache plugin and the GDPR plugin of your choice must be compatible.

The solution:

  • 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 true or false accordingly.

Then, the WP cache plugin should hopefully provide with an easy way to exclude the cookies you don’t want to be cached.

Now let’s look at one combo in particular. Excluding cookies is a piece of cake with WP Fastest Cache and Cookie Notice, which uses one single cookie named cookie_notice_accepted.

Figure 1. Click on the Add New Rule button

Figure 2. Exclude the cookie_notice_accepted cookie

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.