Perfect. Thank you!

On Tuesday, October 28, 2014 4:49:22 PM UTC, Toby wrote:
>
> Hi,
>
> How do I make session cookies persistent, so that a session is continued 
> when a user closes their browser and re-opens it again?
>
> I've tried putting this in the first line of a controller function:
> response.cookies[response.session_id_name]['expires'] = 24 * 3600
> When I inspect the session cookie in Chrome I can see that it indeed has 
> the correct expiry. So far so good.
>
> The problem I'm running into is that it seems like every time you call a 
> new function, the 'expires' key of the session cookie is removed. So, 
> unless I remember to set the cookie expiry in every single controller 
> function, the cookie will lose it's expiry attribute. Is there a way around 
> this?
>
> Thanks in advance for any guidance
>
> Tobias
>
> P.S. For the record, here are links to relevant forum threads:
> https://groups.google.com/forum/#!msg/web2py/71VrGIH_B3o/Qte4NFAv8IcJ
> https://groups.google.com/forum/m/#!topic/web2py/9bpsYzaT8lk 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to