How much information should you store in cookies?
How do you specify how long a cookie will last?
Where does Rails normally store the information you put in the cookie object?
What does calling flash.now
do?
You should store as little information in cookies as your application can manage.
Cookie lifespans default to expiring when the user quits the
browser, but can be set to more specific lengths of time with the
:expires
parameter.
By default, Rails stores the cookie objects information directly in the cookie, on the user’s browser, but note that you can change this by modifying your config/environment.rb file.
The flash.now
method lets you set a value to be sent to the user,
but ensures that the value will be cleared before any reloads or
redirects.