[cgiapp] Persistence

Ron Savage ron at savage.net.au
Tue Feb 5 16:18:02 EST 2008


On Tue, 2008-02-05 at 10:44 +0000, Mark Knoop wrote:

Hi Mark

> I have read through lots of docs but I seem to be missing this key point... 
> if there is a doc specifically related to this that would be a huge help.

On top of the other responses, I'd add:
Your application must keep track of a 'session'. The main ways to do
that are:

o Add a hidden field to each CGI form, in which you send out to the
client the id of their session, so that when the use submits the form
you get back their id. This is my preferred alternative

o Add the session id to a cookie sent from your code, which you get back
later from the client. This is a commonly-used method

o Add the session id to the URL. This method has the most problems, and
is not recommended.

The session id is generated by CGI::Session.
-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list