- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between session and cookies?
Cookies and Sessions are used to store information. Cookies are only stored on the client-side machine, while sessions get stored on the client as well as a server.
A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit.
A session ends when the user closes the browser or after leaving the site, the server will terminate the session after a predetermined period of time, commonly 30 minutes duration.
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.
When next time browser sends any request to web server then it sends those cookies information to the server and server uses that information to identify the user.
- What is the difference between local storage vs cookies?
- Difference Between Cache and Cookies
- What is the relationship between Cookies and Cybersecurity?
- Difference between Cache and Cookies in Computer Network?
- What is the session layer?
- Difference between Session Storage and Local Storage in HTML5
- What is the difference between jQuery.prop() and jQuery.attr()?
- What is the difference between jQuery.size() and jQuery.length?
- What is the difference between jQuery and AngularJS?
- What is the difference between jQuery.show() and jQuery.hide()?
- What is the difference between jQuery.fadeout() and jQuery.hide()?
- What is the difference between jQuery.animate() and jQuery.hide()?
- What is the difference between JRE and JDK?