>
>     1. i am using session to transfer user's input from first page to 
> second page via 'redirect', but i don't want to maintain session in 
> filesystem or DB, while seems it's not feasible for web2py, as i tested, 
> there are session files in session directory. so, is it possible to use 
> cookies or session without store the session info?


If you prefer session data be stored in cookies, from the book:

To *store sessions in cookies* instead you can do:

session.connect(request,response,cookie_key='yoursecret',compression_level=None)

Here cookie_key is a symmetric encryption key. compression_level is an 
optional zlib encryption level.

While sessions in cookie are often recommended for scalability reason they 
are limited in size. Large sessions will result in broken cookies.

 

>     2. The parameters of the first ajax call in 2nd page come from user's 
> input from the first page, then store and update these parameters to 
> cookies after the ajax call succeeds. continuously, the later ajax calls 
> will use the dynamically-updated parameters which stay in cookies from 
> previous call. So, the problem is: ajax call will use parameters from first 
> page and then use parameters from cookies later. tried to set cookies in 
> the 2nd page with info from 1st page, obviously, it doesn't work.
>

It might be more clear if you show some code. Are you setting and 
retrieving cookie values on the client side via Javascript, or is all that 
happening on the server (in which case, sessions in cookies as noted above 
should work)?

Anthony

-- 

--- 
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/groups/opt_out.


Reply via email to