[AWS] AWS - maintain state between server and client

Thomas Løcke thomas.granvej6 at gmail.com
Thu Apr 8 20:49:04 CEST 2010


On Thu, Apr 8, 2010 at 4:31 PM, Pascal Obry <pascal at obry.net> wrote:
> I missed the *between session* :)
>
> This is not directly supported by AWS. You could either add an expiration date
> to the cookie (see AWS.Server.HTTP_Utils.Send_General_Header) or
> send your own cookie for this.


To my great surprise, I actually understand some of the code in
Send_General_Header, so while I feel fairly confident I could add an
expiration date, I wouldn't know how to update the date on subsequent
visits.

Sending my own cookie sounds very interesting, except for the fact
that I have no idea how to do that. Also, how would I read the cookie
afterwards?


>
> Note that anyway the session data will be lost on the server if
> restarted (obvious
> but seems safe to state it clearly at this point). So the Web browser session
> cookie will not correspond to anything on the server. But maybe you plan to
> have support for persistency.


That is exactly one of the great advantages of regular cookies: Almost
free persistency, no matter what happens serverside.


>
> Anyway, it would probably be nice if AWS would provide a way to control the
> lifetime of the session cookie! This should be easy to add...

Being able to control the lifetime of the session cookie would indeed
alleviate some of the problems that arise because of the missing
support for regular cookies, but I still think the best thing would be
actual support for cookies. They are such an integral part of
web-apps, that it is almost impossible to live without them. Just as
Polly wants a cracker, Thomas wants a cookie.  :D

Thomas Løcke


More information about the AWS mailing list