WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Cookies & cache (2 posts)

  1. octuss
    Member
    Posted 10 months ago #

    Hi,

    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: /');
    exit();
    } 
    
    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 :)

    http://wordpress.org/plugins/w3-total-cache/

  2. octuss
    Member
    Posted 10 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags