cookie name set in the directory

I have 3 urls to my jobs site :-
 1-jobs.st.com
 2-employment.st.com
 3-people.st.com

when i open the url 1 and set cookie it store 'jchand@jobs[1]' in the directory,
if i use url 2 and set cookie it store 'jchand@employments[1]' in the directory,  and for
url 3 jchand@people.

the impact is if set cookie through url 1, I can not see the cookie in URL2 or 3 and its for every url.
Is there any way where I can set the cookie in URL 1 and use perfectly when I open the application using URL 2 or URL 3
Jagannath11Asked:
Who is Participating?
 
qwaleteeConnect With a Mentor Commented:
Syntax... setCookie(name, value, expires, path, domain, secure)
0
 
qwaleteeCommented:
For the cookie domain, you need to use st.com instead of the full host name. That laso means, of course, that you have to be consistent in the way the site is accessed, i.e., it always has to be ****.st.com, not IP address or a diferent domain name.
0
 
qwaleteeCommented:
Oops, left out a period, s/b domain=.st.com -- the first . before st is important.
0
 
Jagannath11Author Commented:
Its really KOOL brother, thanks a lot

cheers
jagannath
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.