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.
sayoyo S. (Guest)
on 2006-02-13 19: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
Mage (Guest)
on 2006-02-13 19:18
(Received via mailing list)
Saiho Y. 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 L. (Guest)
on 2006-02-13 19:51
(Received via mailing list)
On 2/13/06, Saiho Y. <removed_email_address@domain.invalid> 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.