Hi, I have a website with static html pages on http://abc.com and dynamic php pages on http://login.abc.com I need to access cookie set by dynamic pages from static pages using javascript. What I did was to include javascriipt from http://login.abc.com into static pages. I assumed that it can access cookie from subdomain since it was loaded from subdomain. However it does not work. Can someone help Thanks Kristine
when you save a variable to cookie, please add domain value. For example: whenever you save a variable (in both domain and subdomain) as follow: document.cookie = cookieName+"="cookieValue+ ";expires=" + expirationString+";path=/;domain=example.com"; now your cookie is available in any sub-domain.