[thelist] reading cookies
Jeremy Ashcraft
ashcraft at 13monkeys.com
Wed Apr 5 20:14:23 2000
> I really don't know about this point....
> But i think (i'm pretty sure) that by setting the path to / it includes all
> the directories
> above that ie all the subdirectories...
>
> HELPPPP anyone out there can give us a hint?
He's right. If you set the path to "/" on a cookie, it can only be read
by files placed in "/". Ex. -- One script in "/" sets a cookie with the
path "/". A script in /foo/ can't see the cookie because it isn't
explicitly in "/" but "/foo/".
What you want to do is set the domain to be http://www.mydomain.com, not
set the path. You could even get away with not setting the domain,
because I believe that a cookie will default to the domain of the script
that set it.
--
Jeremy Ashcraft
web developer/geek
ashcraft@13monkeys.com
http://www.13monkeys.com