[Zope] Cookie differences between IE and Netscape
Graham Chiu
anon_emouse@hotmail.com
Sun, 20 Jun 1999 10:43:02 +1200
I'm still having problems with using cookies, and there seems to be
differences in the way NS 4.5 and IE 5 respond to the same code.
I am trying to create a session id which I track using cookies. I am
using the following code in the header of each page
<!--#if "REQUEST.cookies.has_key('CK_Session')"-->
<!--#call "REQUEST.cookies['CK_Session']"-->
<!--#else-->
<!--#call "RESPONSE.setCookie('CK_Session',
ZopeTime().timeTime())"-->
<!--#/if-->
<!--#call "RESPONSE.setCookie('CK_Last_Visit', ZopeTime().timeTime(),
expires=(ZopeTime('GMT') + 365).rfc822())"-->
and at the footer of each page, I have the following:
sessionID=
<!--#if CK_Session-->
<!--#var CK_Session-->
<!--#else-->
Session ID not set
<!--#/if-->
With NS4.5, when I first log on, I get the message that the Session ID
is not set. I refresh the page, and then it appears. Thereafter, each
page correctly shows the session ID.
With IE5.0, when I access the home page, I get the same message that the
Session ID is not set. It appears when I reload the page. However,
other pages may not show the footer, or displays a different session ID
( from prior log ons as though it is caching the cookie value from
before ).
I have added
<META HTTP-EQUIV="expires" CONTENT="0">
to the header without any change.
-------
Regards, Graham Chiu
gchiu<at>compkarori.co.nz