In order to create my own "Cookie Check" method, I was doing some tests. If I set a simple cookie, like <@assign cookie$myTest "This is a test.">, I can verify the cookie is set through my browser prefs, and then read it back with <@var cookie$myTest>.
However, If I verify that the Witango_UserReference cookie is set in my browser, if I try to read it out with <@var cookie$Witango_UserReference>, I get nothing. I don't want to use <@userreference> because that will not necessarily verify if the cookie is written.
Any ideas?
Robert.
On Jan 20, 2004, at 5:15 AM, Robert Garcia wrote:
I have been working through cookie issues and loss of state issues for months, and I have been able to reproduce the problem. I am using 065 on windows by the way.
It seems that the <@userreferencecookie> tag is supposed to check the instance of the userref either as a search arg, or in a cookie, and only write a cookie if none present.
However, sometimes, even with no userref in the search arg or cookie, sometimes the cookie is not written ( this usually happens when a user first hits the site). What makes it worse is that I use the <@userreferenceargument> in every link on the site, and since it gets created on the first hit, and the cookie didn't get written, the cookie definitely doesn't get written in subsequent hits, because the search arg userref is always there.
As a quick test I replaced the default header:
HTTP/1.1 <@HTTPSTATUSCODE> <@HTTPREASONPHRASE><@CRLF>Content-Type: text/html<@CRLF><@SETCOOKIES><@userreferencecookie><@CRLF>
With:
HTTP/1.1 <@HTTPSTATUSCODE> <@HTTPREASONPHRASE><@CRLF>Content-Type: text/html<@CRLF><@SETCOOKIES>Set-Cookie: Witango_UserReference=<@USERREFERENCE>;path=/<@CRLF><@CRLF>
This manually sets the cookie on every hit, and seems to solve all my problems. Until I build a class to check first then write the cookie, I will keep this, it doesn't seem to hurt performance to much.
This definitely seems to be a bug, and a pretty significant one. I am super busy, but I will try to send this up to witango this weekend unless someone already has.
It would seem to me that it would be better to check if the cookie exists, and write it if it doesn't regardless if the search arg userref is there. I am thinking through how this may be affected if someone bookmarks a page with a search arg userref, and then uses it. So I am going to work on a method, any thoughts would be great.
--
Robert Garcia President - BigHead Technology VP Application Development - eventpix.com 5910 Clark Rd Suite G Paradise, Ca 95969 ph: 530.645.4040 x222 fax: 530.645.4040 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--
Robert Garcia President - BigHead Technology VP Application Development - eventpix.com 5910 Clark Rd Suite G Paradise, Ca 95969 ph: 530.645.4040 x222 fax: 530.645.4040 [EMAIL PROTECTED] - [EMAIL PROTECTED] http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf