The variables I'm trying to store are the gamestate and character 
information for a game. If I do this, it exposes that information in the 
source of the page, and could theoretically be editable by the user 
(correct?). Even if it's not editable, it's a sizable amount of code, and 
it also changes (usually) with every ajax call to submit a new command to 
the game. 

I don't know enough about javascript to tell (a) if there's a way to 
disguise the variables, or make them disappear completely, and (b) how to 
update them once the ajax magic happens. I believe my case is a perfect use 
of (current.)session... but I'd prefer to have the gamestate & character 
clear when the user navigates away from the play page, which won't happen 
automatically.

I don't know enough about the scope of current.response and 
current.request... might either of these be used to better advantage than 
current.session?

On Monday, March 16, 2015 at 10:35:57 AM UTC-4, Leonel Câmara wrote:
>
> Why don't you store the variable in a javascript variable and send it in 
> every ajax request instead? 
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to