W3 Total Cache
Cookies & cache (2 posts)

  1. octuss
    Posted 2 years ago #


    I've got minor programming skills, I must say. And have got an important problem after installing w3tc.

    What i'm trying to do is to let visitors accept cookie policy. I include an external file to header.php, which looks like:

    <?php if($_GET[ciastka] == 'yes') {
    setcookie('ciastka01a9e', 1, time()+3600*24*365, COOKIEPATH, COOKIE_DOMAIN, false);
    header('Location: /');
    if (!isset($_COOKIE['ciastka01a9e'])) { 
    //do some html&jquery with text & approval link
    else {
    //stay empty

    everything worked great but after the page is cached, it doesn't work.. It seems like the cache should be deleted everytime someone accept cookies - and that will generate a lot of useless operations...

    Can someone help me?

    P.S. Sorry for my bad english :)


  2. octuss
    Posted 2 years ago #

    anybody? I don't belive that no one has tried to set cookie in wordpress :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic