[Zope] Simple Persistent Cookie

Luis Cortes news@conquered.org
Sat, 1 Mar 2003 13:43:14 -0700


I thought this would work, does anybody have a clue why it doesn't?

<dtml-call
expr=3D"RESPONSE.setHeader('Set-Cookie','lastVisited=3D1999/01/01;expires=
=3D2003/0
3/03')">
<dtml-var lastVisited>




-----Original Message-----
From: Chris Muldrow [mailto:muldrow@mac.com]=20
Sent: Saturday, March 01, 2003 12:47 PM
To: Luis Cortes
Cc: Zope Mailing List
Subject: Re: [Zope] Simple Persistent Cookie


We've had the most luck cross-browser with setheader calls like so:
<dtml-call =20
"RESPONSE.setHeader('Set-=20
Cookie','sessionid=3Dsomevalue;domain=3D.fredericksburg.com;path=3D/')">

setCookie wasn't playing nice across some browsers for some reason--i =20
think there are archived message on the list about it.
On Saturday, March 1, 2003, at 02:38 PM, Luis Cortes wrote:

> Yep,
>
>   this is true, but does anyone have a simple example of usage.  I'm
> too
> used to:
>
> Set-Cookie: NAME=3DVALUE; expires=3DDATE; path=3DPATH; =
domain=3DDOMAIN_NAME;
> secure
>
> Do you just repeatly call:
>
> setCookie with the different values, like:
>
> <dtml-call expr=3D"RESPONSE.setCookie('NAME', v1)">
> <dtml-call expr=3D"RESPONSE.setCookie('Expires', v2)"> <dtml-call=20
> expr=3D"RESPONSE.setCookie('Domain', v3)">
>
> ???
>
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of J=20
> Cameron Cooper
> Sent: Saturday, March 01, 2003 11:49 AM
> To: zope@zope.org
> Subject: Re: [Zope] Simple Persistent Cookie
>
>
>>
>>
>> How do I create one with Zope, easily?
>>
>> How do I include the expires, domain, etc?
>>
>>
> The RESPONSE object has cookie methods. Check the API section of the=20
> Zope online help docs.
>
>         --jcc
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>