How do i set my cookies to a specific domain?
I have www.m开发者_如何学Goysite.com
and static-cookieless.mysite.com
. My www site seems to be setting cookies on mysite.com thus my static site is no longer cookieless. How do i set cookies to only my www site?
I am using plain javascript (well, jquery.cookie but i know how to edit that easily)
document.cookie = 'cookie_name=' + cookie_value+ ',path=/,domain=mydomain.com';
May be the link below will be useful http://javascript.about.com/library/blwcookie.htm
精彩评论