I was working on this http://mootools.net/shell/b2csd/ (B and D don't
work) and thought path did not work.

But then I realized if I change the path, the document can not see the
cookie.

The problem in my example is this. If I open the page at
http://mywebserver/CookieTest/, with slash, a cookie with path: /
CookieTest/ is written. Document.cookie contains this information.
If I then open the page at http://mywebserver/CookieTest, without the
slash, a cookie with path : / is written. Document.cookie contains
this information also.
Now document.cookie has two cookies with the same name and different
paths. But both cookies are visible to the current page (which is
always http://mywebserver/CookieTest/index.html).

Solution:
1. Use always the slash at the end of the url (how do I force this?)
or
2. Use cookie.write always with path information (/ or /CookieTest/).

I still consider this as a workaround, but the problem might be
related to the way the webbrowser stores the cookie information.

Reply via email to