J!Extensions Store™
Faq Can i use page caching while blocking cookies and resources?

Can i use page caching while blocking cookies and resources?

Created on:Thursday, 03 May 2018 00:00

In case it's necessary to allow visitors to switch back and forth between accept/decline cookies and resources, the page caching could be a big problem if the same cache is used inconditionally and it could prevent the dynamic switching to work correctly.
Using the standard Joomla! System - Page Cache plugin is not enough because it has not features to separate each cache based on cookie preferences.

If you really want to use an effective page caching you have to switch to a smarter solution such as JotCache. JotCache can play well with GDPR and they can be configured to cooperate and maintain a well performing website.

All you have to do is to open to the JotCache plugin configuration, go to the “Advanced” tab and enter “#cookieconsent_status” into the “Cookies split” field.
jotcache cookie cache split
After this, you have to fully disable the Joomla! System - Page Cache plugin and to turn off the "Automatic cache management" parameter inside the GDPR component configuration.
gdpr auto manage cache
This will result in separate cache files for users that allow Cookies and for users who do not allow them, without GDPR purging the cache of a page when accessed with different Cookie settings.

Notice that if you are using cookie categories to block third-party domains and resources, this could not be enough and you may need to keep the GDPR parameter "Automatic cache management" still active or completely disable JotCache.
Additionally if you are using Development Mode in a JA template pay attention to disable it otherwise JotCache can't work.