function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amoldavskyamoldavsky 

unable to set persistent cookie

Hey,

 

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?