Currently I have the cookie to be added as:
document.cookie="key=value".concat(";path=/");
And this will add a cookie with no host information. However if I changed to:
document.cookie="key=value".concat(";path=/;domain=.mydomain.ca");
The cookie will not be generated. Similarly, if I have "expires=" in the cookie it will also not be generated.
I am running on localhost, and I am not sure if there any restriction on what domain I can use? Or what else could cause failure on setting the cookie?