i want set cookies for the site say http://www.example.com using the javascript and the code i am using is
cookiestring="NAME="+value+";EXPIRES="+duration;
document.cookie = cookiestring;
so it is working fine but when i use same code to set Domain name as ".example.com" as
cookiestring="NAME="+value+";EXPIRES="+duration+";DOMAIN=.example.com";
then its not working.
also i tried to by giving PATH=/ its not creating the cookie
these cookies i want for redirecting depending on the sub domain like abc.example.com or xyz.example.com
how to set common domain ie .example.com for domain as well as subdomains to access from any domains.
if name of the cookie is 'city' i must able to access that cookie from http://www.example.com, abc.example.com or xyz.example.com

