On Wednesday 10 Mar 2004 9:27 pm, B. Fongo wrote: > I'm trying to implement cgi sessions with Apache::Session and found > myself contemplating on a method to pass session id to my script. > > I'll appreciate if someone experienced could help me out of that - by > giving any pros and cons on the following methods: > > 1. URL > 2. Hidden fields > 3. Cookies > > Thanks guys > > Babs
Hi Babs, I've never used Apache::Session, but tend to use a session table on a database. However, the same problem exists. Cookies provide the simplest when it works. However many people, me included, automatically reject cookies, which then stuffs your session. This leaves the other 2 options. Personally, I use a combination of the two, using whichever is the best for the page I'm working on, i,e, if I'm working on a form anyway I use a hidden field, otherwise I include it in the URL. Of course, there's no reason not to use all three, which is what I use as a fallback. If you have an explanation of the cookie's use and make it a session cookie (deleted automatically when the browser is closed) then there's more chance of people accepting it. However, even if you FORCE people to accept the cookie, i.e. prevent access to the site if the reject it, you'll simply lose custom. I hope that lack of an answer helps. Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>