开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜