[Zope] Session data in URL *or* in cookie

Lubos Culen mirsoft@systinet.com
Tue, 25 Feb 2003 15:10:39 +0100


Hello!

As I found how Zope's sessions work, I'd like to write script which would 
handle this:

1. If user comes to the website and he has cookies DISABLED, he will have 
the session data stored in URLs, as I have set up in "browser_id_manager" 
object checking the "Automatically Encode Zope-Generated
URLs With A Browser Id" option - so his URL www.mysite.com/mypage will be 
encoded to http://www.mysite.com/_ZopeId/38936190A0sgFZ2i4l0/mypage for 
example.

2. BUT (and here comes the point) - if user browses the web and he has 
cookies ENABLED, he will browse with *classic* URLs without encoded session 
data, so for example www.mysite.com/mypage (he doesn't need to have session 
data in URLs, because they will be read from cookies).

So the question is - is there a way how system could detect if user has or 
hasn't cookies and would encode Zope-Generated URLs *only* if user has 
cookies disabled? Or does some session tracking product for Zope exist 
which does it handle this way?

Thank you for answer,

Lubos.