[ic] Cookies not persistent

G Guttero interchange-users@interchange.redhat.com
Sun Jun 2 12:51:01 2002


 >> Ok, I checked and my browser is set to accept persistent cookies.  
 >>Here is
>>the code that sets and reads the cookies:
>>
>>[set-cookie name=loginu value="[value mv_username]" expire="Mon, 
>>03->>Jun-2005 12:00:00 GMT"][set-cookie name=loginp value="[value 
>>mv_password]" expire="Mon, 03-Jun-2005 12:00:00 GMT"]
>>
>>[set name=autologin interpolate=1][read-cookie loginu][/set]
>>[if scratch autologin ne ]
>><font face="Verdana" size="2"><b>Hello [scratchd autologin]!>></b></font>
>>[/if]
>>
>>This code works perfectly to set and read the cookie until the >>browser 
>>is closed and reopened.  No cookie is read then and [read-cookie >>loginu] 
>>returns nothing.  I've been over and over this and I can't figure it 
>> >>out.  Thanks!

>Grant - FWIW, I enabled persistent cookies in my browser, set >CookieLogin 
>to yes in a standard 4.8.3. foundation store, and boom - cookie auto->login 
>works, even after closing and starting an new browser session. The >code 
>that actually writes this cookie is located in Userdb.pm and I would 
>recommend you let it do it's thing rather than trying to roll your >own. 
>All you have to is add a checkbox which (when checked) will set 
>mv_cookie_password to 1 on the login and/or new_account forms one you >have 
>verified that the user's browser will accept cookies...

Ed- I was going to try to make the AutoLogin feature work, but after 
checking out the way it works in the Foundation demo, I decided I really 
didn't like it that way.  You aren't logged in when you hit the first page 
of the site, you have to click on a link before you are logged in.  I 
decided I wanted to have the cookie read upon entrance, which enables a 
greeting which offers to log you in with a "Click here to be automatically 
logged in." which then logs you in.  That makes more sense to me.

>I can't see anything wrong.  Have you verified that your browser is
>receiving all of the cookie data, including the expiry date?
>
>I think it may be a browser problem.  Have you tried another browser
>to see what happens?

Kevin- I changed my browser settings from Enable "Cookies that are stored on 
your computer" to Prompt, and it still sets and reads as long as I don't 
close and re-open the browser.  The funny thing is I am never prompted.  It 
seems to me that that must be the way IC is setting the cookie.  How can I 
verify that the browser is receiving the expiration date?  I sure get a nice 
greeting at Amazon.com so I know persistent cookies are working on the 
browser.  I've tried IE 6 and 5 on two different computers with the same 
result.

>Could it be that the browser does not accept a wrong weekday? 3 of >June 
>2005
>is a Friday, not Monday...

Rene- Thanks for the idea, but still no persistence.

- Grant

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com