views:

64

answers:

1

Hi!

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 cookie 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

+4  A: 

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
dana
the cookie is set somewhere else. and the google search appliacne is on using something like mysite.search.com and when I try to get the cookie from mysite.com it doesnt seem to get it.Is it possible to retrieve cookie from a different domain? How do i do it?thanks
You can't: it would be a giant security hole if `mysite.host.com` could grab any cookie it wanted from `yoursite.host.com`.
egrunin