I can't find a lot of info on cookies, so trying my luck here. A couple things:

  1. I can't seem to get this to work Platform.Response.RemoveCookie("mycookie");

I've removed everything on the page except for that and yet when I use the GetCookieValue function I can still retrieve it.

  1. Jackson Chen in this post says that cookies are lost when the browser is closed. But I was able to create a cookie, quit my browser, come back and it's still there. Can anyone verify his statement. If it's accurate, why am I still seeing my cookie?

It's odd to me because SetCookie and RemoveCookie are under Client Browser Functions in the documentation while GetCookieValue is under HTTP Property Functions. So maybe they don't all work together? Maybe I'm confused as to how they are supposed to work.

What I'm really after is a way to store info about a user. I using an OAuth flow and if they've already approved my application, I don't want to have to ask them again. I want to cookie them, so I can just use a refresh token and it'd be really nice if I could do this server side instead of browser side.

Oh one other thing of note. I was also not able to retrieve that cookie via regular JavaScript, which I guess makes sense since it's a session cookie.

  • It turns out I can set my cookie with regular JS and retrieve it with SSJS, so I think my problem is solved for now. Still would be nice to know why remove cookie doesn't work. Commented Jun 3, 2022 at 22:35

1 Answer 1


I couldn't get RemoveCookie to work either, but there is a work around. You can set headers instead.

HTTPHeader.SetValue("Set-Cookie", 'mycookie="deleted"; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT');

One thing to note is this will not stop a GetCookieValue request from working on the same page load, but you can check for a signOut value for example, before proceeding in your code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .