How to read cookie from different domain?

Posted in Help the coder! on Sep 1, 2009 at 21:33 IST (11 months ago). Subscribe to this post Bookmark and Share Email
Showing comments 1 to 2 of total 2 on page 1 of 1
Post reply
« Previous1Next »

sonata
Rank: 77

I have cookies for the domain .forum.mywebsite.com and for .mywebsite.com.

Is it possible to read the cookie for the .mywebsite.com domain with javascript from the forum.mywebsite.com location?

Posted by sonata on Tuesday, September 1, 2009, 9:33 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment

xtrmprgrmr
Rank: 7

You can set the domain which has access to a given cookie via adding a variable

domain={domainname};

This domain as well as any of its subdomains is allowed access to the cookie (source: MDC, MSDN).

Posted by xtrmprgrmr on Tuesday, September 1, 2009, 10:15 pm
  • Currently 0.00/5

0 votes

Thank this userFlag this comment
Pages: « Previous1Next »

Post your comment (No registration required)

  Add my comment  

TechieDesi Community

Not signed in (Sign-in or Register)
Be a true TechieDesi!
Top 10 Users
Spread the word
Invite your friends
Fan stuff
Help us improve
Need Help
FAQ's
Search tips
Found a bug? Report!
Feeds and letters
Subscribe via RSS
Archives
Subscribe to newsletter
Unsubscribe e-mail
Miscellaneous
Privacy policy
Visit rootnerve
About us
About us
Support the development
Official Blog
Advertise with us
Careers
Copyright (c) 2008, TechieDesi.com. All rights reserved | About us | Do-Not-Disturb registry | Powered by rootnerve | Page rendered in 0.074 seconds