[Zope] Cookies
Kevin Dangoor
kid@kendermedia.com
Tue, 2 Nov 1999 09:00:41 -0500
Yep, you can do it. Cookies require a very specific expiration time format:
'%a, %d-%b-%Y %H:%M:%S GMT'
So, to set the expiration to one week in the future, you can use something
like (untested):
<dtml-call "REQUEST.set('expires', ZopeTime() + 7)">
<dtml-call "RESPONSE.setCookie('mycookie', 'myvalue',
expires=expires.strftime('%a, %d-%b-%Y %H:%M:%S GMT'))">
Kevin
-----Original Message-----
From: Chui Tey <teyc@bigfoot.com>
To: zope@zope.org <zope@zope.org>
Date: Tuesday, November 02, 1999 4:26 AM
Subject: [Zope] Cookies
Hi everyone,
I must be dense. I have tried and failed to make cookies persist beyond
the current browser session. Is this option available?
Thanks in advance.
Chui