_satellite.setCookie(cookiename, value, days)

Avatar

Avatar

sanketd28

Avatar

sanketd28

sanketd28

01-07-2018

Hi,

I would to set cookie using _satellite.setCookie(cookiename, value, days) but if you see the parameters, we have an option to expire it in days. On the other hand, I want to expire the cookie when user session ends. Is there any way to achieve this?

Thanks in Advance !

View Entire Topic

Avatar

Avatar

marion33678522

Avatar

marion33678522

marion33678522

05-07-2018

Hello sanketd28​ ,_satellite.setCookie("helloCookie", "test", 0);

From old memory, I think if you give a 0 value, or no value at all, the cookie will expire after the session.

Such as :

_satellite.setCookie("helloCookie", "test", 0);

or


_satellite.setCookie("helloCookie2", "test2");

I did this a long time ago , you should still test it ! Dev tools (F12) in chrome or firefox, give you the expiration of all your cookies !

Cheers !

Mario