Saiho Yuen
2006-Feb-13 17:02 UTC
[Rails] Will session object be send to the user browser each time a request is sent to server?
Hi, I thinsk the session object will never send to client, it stays at the server side. can some one tell me if I''m right? also it is a good pratice to store data inside the session object???? Thanks you very much Saiho __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Mage
2006-Feb-13 17:18 UTC
[Rails] Will session object be send to the user browser each time a request is sent to server?
Saiho Yuen wrote:>Hi, > >I thinsk the session object will never send to client, >it stays at the server side. can some one tell me if >I''m right? > >You are right.>also it is a good pratice to store data inside the >session object???? > >It depends on the size and type of the data, and the load of your server. Don''t store large or critical data in the session. Store them in the database or fielsystem. Don''t store classes whose definition will change. Mage
James Ludlow
2006-Feb-13 17:51 UTC
[Rails] Will session object be send to the user browser each time a request is sent to server?
On 2/13/06, Saiho Yuen <sayoyo@yahoo.com> wrote:> I thinsk the session object will never send to client, > it stays at the server side. can some one tell me if > I''m right?The session ID is sent to the client. The session object itself is not.> also it is a good pratice to store data inside the > session object????This is a pretty wide open question, with the simple answer being "store as little as possible in the session." Generally you use it for storing user authenication state and messages that need to be passed between requests (i.e. the flash). -- James