+ Start a Discussion

unable to set persistent cookie



I am unable to set a persistent cookie via Apex, I can only hack my way in through Javascript.

Whatever you set for "maxAge" except for 0 or -1 results in expiration time of:
Sun 07 Dec 1969 03:28:36 GMT

new Cookie(ZIID_COOKIE_NAME, ziid, null, 315360000, false);




Which indicated it is expired. So basically the cookies can either be session length or expired.

That does not make any sense to me whats so ever, any ideas?