Skip to content

Cookie Domain

May 14, 2009

From the site:

Each cookie also has a domain and a path. The domain tells the browser to which domain the cookie should be sent. If you don’t specify it, it becomes the domain of the page that sets the cookie, in the case of this page Please note that the purpose of the domain is to allow cookies to cross sub-domains. My cookie will not be read by because its domain is . When I set the domain to, the search sub-domain may also read the cookie. I cannot set the cookie domain to a domain I’m not in, I cannot make the domain . Only is allowed, in this case.

If I set cookie for site : it cannot work -> for
So CAS server can only work for both domains if you specify the p:cookieDomain=”” in the file

By default if domain=/ browser only sends to the url from which cookie is created. Ultimately task of sending back cookie is the responsibility of the browser based on the domain of the cookie.
If cookie is defined with lifetime as -1 (cookieMaxAge) it expires when browser closes.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: