Forum: Ruby on Rails Problem with session cookie expire time

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.
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2005-11-20 15:40
Hi,

I have set the cookie expire time to 1 year, and Rails seems to send the
correct header line:
Set-Cookie: _session_id=ffd03d0308c0b5059b9e13448468d91c; path=/;
expires=Mon, 20 Nov 2006 20:32:02 GMT

Still every time I quit Firefox the cookie is gone, and in the cookie
list in the preferences it says "valid until end of session".

Any idea why this happens?

Thanks
Andreas
82476266af9d460415d8f1fc16bb54ed?d=identicon&s=25 Jarkko Laine (jarkko)
on 2005-11-21 09:03
(Received via mailing list)
On 20.11.2005, at 16.40, Andreas Schwarz wrote:

>
> Any idea why this happens?

Because it's a session, not a normal cookie. According to this thread
they are always stored in memory and thus only persistent inside a
single browser _session_: http://article.gmane.org/
gmane.comp.lang.ruby.rails/11288/

//jarkko
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2005-11-25 11:59
jarkko wrote:
> On 20.11.2005, at 16.40, Andreas Schwarz wrote:
>
>>
>> Any idea why this happens?
>
> Because it's a session, not a normal cookie.

No, it's a regular cookie with an expire time:
Set-Cookie: _session_id=ffd03d0308c0b5059b9e13448468d91c; path=/;
expires=Mon, 20 Nov 2006 20:32:02 GMT

It's working now, probably was some weird problem with my browser.
This topic is locked and can not be replied to.