top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Cookies and sessions and their differences with reference to rails.

0 votes
48 views

Can anybody please explain?

posted Jul 7, 2014 by Arjuna

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Cookies are stored key/value pairs (with other attributes such as expiry, domain, path and ssl requirements) in the clients browser. The specification for them is in the HTTP specification and these can (generally) be read by back-end languages such as Rails or front-end technologies such as JavaScript.

Sessions are an unrestricted storage area for applications, generally used by the back-end 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 back-end server.

answer Jul 7, 2014 by Meenal Mishra
Similar Questions
+1 vote

I'm trying to figure out how I can create custom session cookies. I've found the Manager interface for creating the sessions, but there's nothing about the actual session cookie. I don't see anything in the Valve interface that will let me do this either. Is this possible in Tomcat 7 (or 8?).

+1 vote

I have a project model which I'd like to set the default_scope to filter out projects where the user doesn't have permission to view them.

Think something along the lines of the projects having a list of teams and companies that the user must be in to access the data.

default_scope seems to work well if I hard code it as I really don't want a dev to accidentally not have these permissions filters in use. The lists of teams and companies a user is in is stored in the session.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...