Angus Lees wrote: > > On Thu, Oct 11, 2001 at 08:01:58PM +0200, Gerald Richter wrote: > > It will even be possible that Embperl checks if cookies are > > supported and use URL based id only when cookies doesn't work. > > how do you intend to do this?
Its fairly simple to check if cookies are supported or not. The only place I've ever seen this done is in acmemail [1], Leon Brocard's former perl webmail project. 1. On the first page that's called, send them a sessionid cookie back. 2. At this point you still aren't sure whether they support cookies, so include the sessionid in the GET/POST URLs as well. 2. The user does stuff, and submits back (GET/POST) to another Embperl page. 3. If the browser sent a sessionid cookie back... they have cookie support enabled, so only the sessionid needs to be sent, and not the URL based way. This assumes that Embperl has a way of processing all links and adding "&session_id=$session_id" to every URL (if sessions are being used in that page). Acmemail actually does this by using a "bait" cookie called "cantakecookies". Search for "cantakecookies", "session-id", and "sessionid" in acmemail.cgi [2] for see how it does it. Note that the this version of acmemail has been rewritten as sparkle, which doesn't have this cookie auto-detection mechanism (I'm going to add it in as an option though). I was told that PHP has some sort of autodetection in its session handling, so that it'll use cookies when possible, otherwise add it to every href and action in the page. I had a quick look at their site, but couldn't find it. 1. sourceforge.net/projects/acmemail 2. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/acmemail/acmemail/acmemail.cgi?rev=1.38&content-type=text/vnd.viewcvs-markup --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
