Rails v2.3 : Difference between session and cookies

后端 未结 4 913
野趣味
野趣味 2020-12-31 04:58

I am learning Rails by reading the online guide(for Rails v2.3). The guide is great, however, there is a confusion for me, that\'s:

there is a chapt

4条回答
  •  天命终不由人
    2020-12-31 05:52

    And typically the session only persists until the user shuts down their browser. That's useful for typical logins. Whereas if you needed information to persist between sessions you could use a cookie with a longer duration, for example a 'remember me' flag that persists even after the browser is restarted.

提交回复
热议问题