[nycphp-talk] eating cookies in IE on XP?
Chris Shiflett
shiflett at php.net
Fri Aug 1 14:46:58 EDT 2003
--- Brian Pang <bpang at bpang.com> wrote:
> yes, I understand how cookies work... I assume you are asking
> if I know that the changes won't take effect until the next page
> load.
Well, that and a dozen other questions, yes. I didn't want to offend you by
asking a bunch of questions that were not the least bit helpful or insulted
your intelligence. I'm just trying to gauge the question.
Given that, there are a few methods of getting a closer look into what is going
on. If you have ethereal, tcpdump, or something like that, you can snoop the
HTTP transaction(s) in question. Because "setting" a cookie really just means
that you send a Set-Cookie response header in your HTTP response, it is
possible that you are actually setting a different cookie that is immediately
expired rather than modifying the existing cookie. The browser determines
whether the cookie identified in the Set-Cookie header is a new cookie or the
same old one, so that might account for some slight differences with regard to
different browsers, platforms, etc.
Another thing that would be helpful to do would be to examine the cookie store
of the browser. Instead of trying to expire the cookie, change the date you are
sending to be in the future (rather than the past - use the same exact code
otherwise). If the browser is in fact updating the existing cookie like you
want, you should be able to observe the change in expiration. Otherwise, there
should be an additional cookie created (which you wouldn't notice if it was
immediately expired), and you'll know that some of the cookie restrictions
aren't matching up, so the browser considers it a new cookie.
Those are some ideas. Hope that helps.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
More information about the talk
mailing list