- If we didn't have cookies and sessions, what would happen?
- We would not have a convenient way to store data from users
- What is a cookie?
- Cookies are small files which are stored on a user's computer very similar to a hash
- They are designed to hold data specific to a particular client and website.
- What's the difference between a cookie and a session?
- Session data is stored on the server
- Cookies data is stored on visitor's browser
- What's serialization and how does it come into play with sessions?
- It encrypts the data stored and prevent human tampering
- Why would we want to store a user id in a session?
- To keep specific data saved to that user
- What is a flash? How long does a flash have before it expires?
- A flash is a hash you can store messages in and have appear on screen to tell the user something
- A flash has until it's used before it's expired
- What syntax would I use to add a user_id key and value to the session?
- session[:user_id] = value
- What does "HTTP is stateless" mean?
- Connection between the browser and the server is lost