1. What do you mean by sessions and Cookies?
2. Which one is secure?
Answer to the Question no-1
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.Answer to the Question no-2
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.Session: A session creates a file in a temporary directory on the server where registered session variables and their values are stored.
Cookies: Cookies are text files stored on the client computer and they are kept of use tracking purpose. Server script sends a set of cookies to the browser. For example name, age, or identification number etc. The browser stores this information on a local machine for future use.
Which one is secure?
Ans: Sessions are more secure than cookies, since they're normally protected by some kind of server-side security. You can generally rest assured that your information will be safe on the server side.