Before I started this exercise on cookies below, the author had be set my browser (firefox in my case) to ask every time, so it would ask if I wanted to allow the cookie.
First I set myCookie to just the cookieName & value, and it worked as expected --the browser displayed the privacy alert asking me if I wanted to allow the cookie, as expected. Then I added the date, and again I got the privacy alert, just as I was supposed to. Next the path -- same results.
But, when I added the domain, I did not get the privacy alert. Can you pls. tell me why not?
var date = new Date();
var expireDate = date.toGMTString();
var domain = ";domain=braingia.org";
var myCookie=cookName + "=" + cookVal + ";expires=" + expireDate + path + domain;
document.cookie = myCookie;