WP Engine Caching
-
Love the plugin but I’m having trouble getting it to work properly on my production site through WP Engine. The version I have on my staging site works perfectly, however WP Engine only caches the production environment. Cookies that have been blocked on the live site due to this do not generate after opt-in and refreshing the page.
The required cn_cookies_accepted() function is executed with PHP, which according to the description below from WP Engine cannot be used to display cookies.
Cookies can still be used with page caching. However, they need to be handled predominantly with Javascript instead of PHP. If you try to use PHP to read cookies, it will likely only display an empty cookie array.
This does not mean that you cannot use PHP at all with cookies. If you want to use PHP, then you will need to use Ajax to make requests to the server and run PHP code. WordPress has native support for Ajax functionality, and also makes that functionality extensible.
Can you provide a proper work-around or advice for this? Thanks!
- The topic ‘WP Engine Caching’ is closed to new replies.