Forum Moderators: open
does anyone have any input?
-Matt
I've never used it myself, but there are some interesting and (hopefully) helpful pages returned by Google [google.com].
You probably can set the cookie to any domain, but then that cookie will only be readable by that domain.
- although i do very much appreciate your try, i have already been through NUMEROUS sites trying to figure this one out (as stated in my primary post). i'm trying to get some advice from someone who has had personal experience. thanks for your help otherwise.
-Matt
I'm new here but maybe I can help.
REM *** Begin Example ***
Response.Cookies("MyCookieName") = "This is the value to be stored"
Response.Cookies("MyCookieName").Domain = ".mydomain.com"
Response.Cookies("MyCookieName").Path = "/"
Response.Cookies("MyCookieName").Expires = date+365
REM *** End Example ***
This example will set a cookie named "MyCookieName" valid
for all sub domains of mydomain.com for one year from the date it was set.
If you want the cookie to only be valid for www.mydomain.com
set that to be the cookie domain.
As its set up in the example the cookie will be sent to your server even if you're using something like
www1.mydomain.com
www2.mydomain.com
foo.mydomain.com
Hope this helps,
Elky
[edited by: Woz at 5:42 am (utc) on May 10, 2003]
[edit reason] no sigs please. [/edit]
can you get it to work having .domain = "notyourdomain.com"?
that's the main thing i'm trying to figure out. i don't need it to read from MY domain, i need it to read from a totally different domain. just wondering if anyone's made this work, or if it's even possible.
-Matt
4.3.4 Sending Cookies to the Origin Server
When it sends a request to an origin server, the user agent sends a Cookie request header to the origin server if it has cookies that are applicable to the request, based on
Domain Selection
The origin server's fully-qualified host name must domain-match the Domain attribute of the cookie.
What I think you're trying to do can not be done.You can not read cookies set by other domains.
Just my humble opinion based on the information you provided.
Elky
Domain Selection
The origin server's fully-qualified host name must domain-match the Domain attribute of the cookie.
nothing in there says that you cannot write a cookie to be read by another domain, or that you cannot read a cookie written by another domain. all it says is that the host-name must match the domain attribute of the cookie.
as you can see, this is a tough topic to resolve, which is the whole reason i have posted here. you almost got it Elky, but not quite :)
-Matt
[softartisans.com...]