Setting the cookie to -1 will make firefox keep the cookie rather than delete it

Line : 870 : 
case 'logout': 
boost_set_cookie(-1);

should be

Line : 870 : 
case 'logout': 
boost_set_cookie(0,time() - 3600);

Comments

mikeytown2’s picture

cookie gets removed in the next request. see boost_init

marios88’s picture

I have cacherouter enabled too

in my case the cookie gets stuck to -1 and i get fresh served pages for every user that has logged out.

I saw boost_init, but why wait for the next request when you can remove it now?

just my 2 cents

mikeytown2’s picture

thread where this came from
#305071: user logout, Header unset ETag & browser caching front page
I should set this to 30 seconds: boost_set_cookie(-1);

marios88’s picture

Status: Active » Closed (works as designed)

It indeed works as you pointed out

I figured out the problem was i set cookies to end "At End Of Session" in my config.php

Changing this to stock values fixed the matter.

mikeytown2’s picture

mind documenting exactly what you had to change so the next person who has this issue can find this thread and fix it on their box?

marios88’s picture

In settings.php cookies have to have a greater than zero lifetime.( Not "at end of session")

this will work fine with boost

ini_set('arg_separator.output',     '&');
ini_set('magic_quotes_runtime',     0);
ini_set('magic_quotes_sybase',      0);
ini_set('session.cache_expire',     200000);
ini_set('session.cache_limiter',    'none');
ini_set('session.cookie_lifetime',  2000000);
ini_set('session.gc_maxlifetime',   200000);
ini_set('session.save_handler',     'user');
ini_set('session.use_cookies',      1);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid',    0);
ini_set('url_rewriter.tags',        '');

According to my tests this will not work and will make the UID cookie get stuck to -1

ini_set('arg_separator.output',     '&');
ini_set('magic_quotes_runtime',     0);
ini_set('magic_quotes_sybase',      0);
ini_set('session.cache_expire',     200000);
ini_set('session.cache_limiter',    'none');
ini_set('session.cookie_lifetime',  0);
ini_set('session.gc_maxlifetime',   200000);
ini_set('session.save_handler',     'user');
ini_set('session.use_cookies',      1);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid',    0);
ini_set('url_rewriter.tags',        '');
mikeytown2’s picture

Title: Cookies » Cookies - Add documentation; potential code change.
Status: Closed (works as designed) » Needs review