You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Romayev <ro...@yahoo.com> on 2004/08/17 20:57:30 UTC

[flow] How to remove a permanent cookie?

Hello,

I'm trying to figure out how to remove a permanent
cookie using flow.  The following code does not work,
is there anything I'm doing wrong?

function logout(redirect) {
    var cookies = cocoon.request.getCookies();
    for (var i=0; i<cookies.length; i++) {
        var cookie = cookies[i];
        
        if (cookie.name == "mycookie") {
            cookie.maxAge = 0;
            cocoon.response.addCookie(cookie);
        }     
    }

    cocoon.redirectTo(redirect);
}

Thanks,
-Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org