# Session

**URL:** <https://www.ruby-forum.com/t/session/193186>\
**Category:** Rails\
**Created:** [August 12, 2010, 6:09pm UTC](https://www.ruby-forum.com/t/session/193186 "2010-08-12T18:09:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 12, 2010, 6:09pm UTC](https://www.ruby-forum.com/t/session/193186/1 "2010-08-12T18:09:14Z")

</div>

I tried to understand what a “session” means in Ruby on Rails, and found  
this site:

> **[Ruby on Rails - Session and Cookies](http://www.tutorialspoint.com/ruby-on-rails/rails-session-cookies.htm)**
>
> Ruby on Rails Session and Cookies - To save data across multiple requests, you can use either the session or the flash hashes. A flash stores a value (normally text) until the next request, while a session stores data during the complete session.

But, really, I couldn’t get the idea well yet. Can you just explain what  
“session” means mire further?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 12, 2010, 6:19pm UTC](https://www.ruby-forum.com/t/session/193186/2 "2010-08-12T18:19:18Z")

</div>

Heys,

a Session is a semi-permanent interactive information interchange, it is  
usually created upon the entry or login on the website, and destroyed  
upon  
levaing or logout,  
in rails by convention you may save the session id on the database, but  
basically once someone enters the website it has a session and in the  
session you can store values like session[:xkcd] = “funny cartoon” in  
one  
page, and after a few actions and interactions over the website , you  
can  
acess it for example like, a=session[:xkcd].

a Session normally is statefull and is unique for each user and its  
token  
serves as a unique identifier that is sent from a  
server[http://en.wikipedia.org/wiki/Server\_(computing)](http://en.wikipedia.org/wiki/Server_%28computing%29)to a  
client [http://en.wikipedia.org/wiki/Client\_(computing)](http://en.wikipedia.org/wiki/Client_%28computing%29) to identify  
the  
current interaction session.

erg… hope it’s usefull information.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 12, 2010, 7:52pm UTC](https://www.ruby-forum.com/t/session/193186/3 "2010-08-12T19:52:15Z")

</div>

Thanks a lot Rui for your message.
