I think that to maintain the state, you can store the session in db,
(someone puts a link about it )

If there is a cookie, web2py checks if the session data exists
automatically.



2010/8/6 Bruno Rocha <[email protected]>

> If I understand, he wants to save session values, even the user closes the
> browser and returns after.
>
> if you set e.g one week to the cookie time limit, this will keep the
> reference to the session ID, but I dont think this will automaticaly keep
> the session values. ( what if the server restarts?)
>
> To maintain the state, I guess you have to store the values anywhere, even
> inside the cookie. Then you have to check if the cookie exists.... Am I
> wrong?
>
>
>
> 2010/8/6 Alexandre Andrade <[email protected]>
>
> You just have to set a time limit to your session/cookie, like a week,
>> month or year.
>>
>> I'm sure massimo answer how to set a diferent time limit to a cookie
>> before.
>>
>>
>>
>> 2010/8/5 Cody <[email protected]>
>>
>>> Hello,
>>>
>>>
>>> I just started using web2py this summer to create a website.
>>>
>>> Currently, I am having an issue with sessions. I am trying to store
>>> information in session variables without having the user login, but
>>> whenever the browser closes and reopens all the session variables are
>>> reset. I am only storing strings and integers, and the code works as
>>> long as the browser does not close.
>>>
>>> Is there anyway to prevent this? Also, how long do sessions last, and
>>> how can I change that?
>>>
>>
>>
>>
>> --
>> Atenciosamente
>>
>> --
>> =========================
>> Alexandre Andrade
>> Hipercenter.com
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 
Atenciosamente

-- 
=========================
Alexandre Andrade
Hipercenter.com

Reply via email to