I'm creating a simple cookie and want to set sameSite to "Lax.. However, whenever I set this in my funciton, sameSite isn't actually being set.
I understand this needs to be set, alongside secure...? Where am I going wrong?
function setCookie(name, value, expirydays) {
var d = new Date();
d.setTime(d.getTime() + (expirydays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = name + "=" + value + "" + expires + "sameSite=Lax; Secure";
}
seCookie("ejOptExp", "Fkh3wu6USS-7HjQMGoRnDw.2", 7);
I'm using EditThisCookie chrome extension, to view my cookie data. And it looks like samesite is always set to none?
Thank you.
