Various caching-files depending on the data stored in the cookie
-
Hello!
When using a caching plugin different versions (depends of the cookies allowed by the user) of the pages have to be cached and send to the visitor. My caching plugin can do this by defining different paths. But to set them I have to read the cookie′s content – this does not work.
To test it, I setup a shortcode:
// test shortcode function test_shortcode_func() { if (isset( $_COOKIE['gdpr[allowed_cookies]']) ) { $testshortcode = 'is set'; } else { $testshortcode = 'is NOT set'; } return $testshortcode . "<---1"; } add_shortcode( 'testshortcode', 'test_shortcode_func' );
Do you have an idea why the cookie named “gdpr[allowed_cookies]” can′t be accessed? It′s stored in my browser but the shortcode only displays ‘is NOT set’.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Various caching-files depending on the data stored in the cookie’ is closed to new replies.