Retrieving Cookie values from different domain
I have a site for example mysite.com which store a cookie when user enter etc.
But my search page has a different subdomain/domain search.mysite.com.
How do I retrieve the coo开发者_运维百科kie from mysite.com? when i try to retrieve the cookie using the google search appliance . it gets me the cookie for search.mysite.com. I need the cookie values from mysite.com.
Is there any way retrieve the cookie from mysite.com?
Thanks
You should set the domain of the cookie to be ".mysite.com". All sub-domains will then have access. The syntax for the Set-Cookie header is as follows:
Set-Cookie: name=newvalue; expires=date; path=/; domain=.mysite.com
精彩评论