# Non-persistent sessions? session\_options?

**URL:** <https://www.ruby-forum.com/t/non-persistent-sessions-session-options/179213>\
**Category:** Rails\
**Created:** [November 19, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/non-persistent-sessions-session-options/179213 "2009-11-19T19:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [November 19, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/non-persistent-sessions-session-options/179213/1 "2009-11-19T19:42:46Z")

</div>

How can I set my Rails sessions to not be persistent accross browser  
restarts? That, the cookies involved with sessions/session tokens  
should be set to have an empty “expires” attribute, I think.

It looks like maybe the method session\_options is what you might use for  
this, but I can’t figure out where, if anywhere, the meaningful keys to  
the session\_options hash are documented.

Any hints?

Jonathan
