A
Alan Silver
Hello,
I've just spent ages debugging some cookie code that wasn't working, and
have finally discovered that the code *was* working, but that the path
used by cookies is case-sensitive. I was setting a cookie for a path
like "/somepath", and trying to read it on a path like "/SomePath". This
was coming back as a non-set cookie.
So now I know what the problem is, I'm stuck with how to get around it.
In an ideal world, users would only ever click on links, not enter URLs
themselves, external sites wouldn't change the case of your URLs and so
on. Unfortunately, this isn't the case.
So, if a user enters http://domain/MyUrl/ and the cookie was set for
"/myurl", can I read it?
I've just spent ages debugging some cookie code that wasn't working, and
have finally discovered that the code *was* working, but that the path
used by cookies is case-sensitive. I was setting a cookie for a path
like "/somepath", and trying to read it on a path like "/SomePath". This
was coming back as a non-set cookie.
So now I know what the problem is, I'm stuck with how to get around it.
In an ideal world, users would only ever click on links, not enter URLs
themselves, external sites wouldn't change the case of your URLs and so
on. Unfortunately, this isn't the case.
So, if a user enters http://domain/MyUrl/ and the cookie was set for
"/myurl", can I read it?