I have been trying a few variations of syntax to attempt to get the cookie to update with the same site values and appear in chrome devtools like they do for this https://samesite-sandbox.glitch.me/ from chrome.
None of them appear to work, using = instead of : causes errors, changing the case for samesite doesn't seem to function either.
$.cookie("testName", "Test Name",{ expires : 365, SameSite: 'lax'});
I haven't been able to find any information on this online at all. Current Jquery version is 1.12.1
I have found this to work: append ";SameSite=Lax" to the path.
So, the above example would become:
$.cookie("testName", "Test Name",{ expires : 365, path: "/;SameSite=Lax"});
In $.cookie, the default path is "/". Please note, that as of September 2020, some browsers may also need the "secure: true" appended. Making it:
$.cookie("testName", "Test Name",{ expires : 365, path: "/;SameSite=Lax", secure: true});
Fyi, this method of appending to the path, is used in older frameworks like vbscript or .net 2.0, which don't have some of the more recent settings changes.
Looks like the Jquery Cookie Plugin is unmaintained and it's from 2014, reading the docs, it doesn't support that.
So, what are your options?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With