Forum: Ruby on Rails Will session object be send to the user browser each time a

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
14b7344777a56ac9a1fad849f5d6da2a?d=identicon&s=25 sayoyo Sayoyo (sayoyo)
on 2006-02-13 18:02
(Received via mailing list)
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
D7f35c4eeff902adf48cfb4c46d6655b?d=identicon&s=25 Mage (Guest)
on 2006-02-13 18:18
(Received via mailing list)
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
119af50160cabfe1fb6f2f05f5018c64?d=identicon&s=25 James Ludlow (Guest)
on 2006-02-13 18:51
(Received via mailing list)
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
This topic is locked and can not be replied to.