• Hi,

    In the options of the plugin there is an option for “Cookie expiration”.
    Which duration should I choose and what is the incidence of choosing a longer or oa shorter duration?

    Thank you very much for your explanation and help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dFactory

    (@dfactory)

    It’s pretty simple.

    You set the cookie expiration period.
    After the user accepts the cookie notice it will appear to him/her again after the selected period.

    Thread Starter fotske

    (@fotske)

    Thanks for your answer.

    What would be the goal of setting another period than “unlimited”?

    Is there a law or something like that that says that the user should give his consent for the cookies again after a certain period of time?
    I’m in Belgium for your information (but the situation for France also interests me).

    Thank you very much.

    Plugin Author dFactory

    (@dfactory)

    Officially, as far as I know, it should not exceed one year.

    But the plugin gives you a freedom of choice, depending on how strict you want to stick to these EU regulations.

    Regards,
    Bartosz Arendt
    dfactory team

    HI,

    it would nice to have “session” as an option for expiration period.

    I’ve done this by doing the following:

    in File cookie-notice.php i’ve changed the code at line 150+ to

    $this->times = array(
    	'session'	=> array( __( 'session', 'cookie-notice' ), 0 ),
    	'day'		=> array( __( '1 day', 'cookie-notice' ), 86400 ),
    	'week'		=> array( __( '1 week', 'cookie-notice' ), 604800 ),
    	'month'		=> array( __( '1 month', 'cookie-notice' ), 2592000 ),
    	'3months'	=> array( __( '3 months', 'cookie-notice' ), 7862400 ),
    	'6months'	=> array( __( '6 months', 'cookie-notice' ), 15811200 ),
    	'year' 		=> array( __( '1 year', 'cookie-notice' ), 31536000 ),
    	'infinity'	=> array( __( 'infinity', 'cookie-notice' ), PHP_INT_MAX ) 
    );

    The new thing is here the “Session”-Option.

    And in front.js i changed line 17 to:

    document.cookie = cnArgs.cookieName + '=' + cookie_value + (parseInt( cnArgs.cookieTime ) > 0 ? ';expires=' + cnLater.toGMTString() : '')+ ';' + ( cnArgs.cookieDomain !== undefined && cnArgs.cookieDomain !== '' ? 'domain=' + cnArgs.cookieDomain + ';' : '' ) + ( cnArgs.cookiePath !== undefined && cnArgs.cookiePath !== '' ? 'path=' + cnArgs.cookiePath + ';' : '' );
    

    It’s working for me, but it were nice to have it in an official release, so it’s save for Updates.

    Regards,
    Christian Hitzmann

    • This reply was modified 7 years, 9 months ago by agrajag111.
    • This reply was modified 7 years, 9 months ago by agrajag111.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cookie expiration’ is closed to new replies.