My persistent cookies are being deleted when I close and reopen the browser on iOS Safari (and Chrome). I'm on iOS 11, but have tested on iOS10/9 also. The cookies persist correctly on Android and desktop. And strangely, it works fine for Firefox on iOS.
What am i missing here?
Here is my javascript code the sets the cookie and expire date:
setCookie = function(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
setCookie("test", "random test value", 365);