Re: [Rails] Difference between Cookies and Sessions

Cookies are stored key/value pairs (with other attributes such as expiry, domain, path and ssl requirements) in the client's browser.  The specification for them is in the HTTP specification and these can (generally) be read by backend languages such as Rails or frontend technologies such as Javascript.

Sessions are an unrestricted storage area for applications, generally used by the backend language only (due to encryption and hash protection with server side secrets), although they may be stored in their entirety in a client-side cookie for convenience to avoid "sticky sessions" where requests have to come back to the same backend server.

Hope this helps.

Cheers,


Andy

Andy Jeffries Ruby on Rails, RubyMotion, jQuery Developer & Taekwondo 6th Dan Instructor
andyjeffries.co.uk +44 7939 164853 @andyjeffries fb.com/andyjeffries


On 7 July 2014 10:21, Praveen BK <lists@ruby-forum.com> wrote:
Hello,

     Can anybody please define cookies and sessions and their
differences in detail with reference to rails.


Thank you,
Praveen

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6c917df7bf555a6e49a8fbfb68cd6144%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CANRNWfgM%3DN4eEuPKW7NN4DGHNL3O%3D9%2BNcHZgWTWvm0dFEW%2Bbdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.