[Zope] Look for browser id name in forms only

Chris McDonough chrism@zope.com
Thu, 25 Jul 2002 17:30:13 -0400

Dieter Maurer wrote:
> Carlo Giomini writes:
>  > 	1. do I have to manually code the form hidden fields containing
>  > 		the _ZopeId value?
> Sure.

Yes.  Use the getBrowserId and getBrowserIdName methods of the browser 
id manager something like:

<input type="hidden" name="<dtml-var 
"browser_id_manager.getBrowserIdName()">" value="<dtml-var 

>  > 	2. why do I still get _ZopeId in the cookies, when I set the
>  > 		'Look for browser id name in' checkbox to 'forms only'?
> I do not know the answer.

You already had a cookie set named _ZopeId in your browser (probably 
while you were testing with cookies enabled) and your browser sent it to 
Zope, as it should have.

>   Maybe, because it was already there.
>   Maybe, because the implementer thought, it would not harm to
>   set the cookie (I understand, that you do not want that).

No, if cookies are not enabled in the browser id manager, a cookie is 
not set.  It was set before he switched from cookies to form-only.

Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"