
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
What is the difference between local storage vs cookies?
On client and server, the following storages are available: local storage, session storage, and cookies.
The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons. Cookies do not handle this case well because they are transmitted with every request.
Local Storage is available for every page and remains even when the web browser is closed, but you cannot read it on the server.
The stored data has no expiration date in local storage. With cookies, you can set the expiration duration.
If you want to clear local storage, then do it by clearing the browser cache. You can also use JavaScript for this. Local Storage is for client side, whereas cookies are for the client as well as server side.
- Related Articles
- Difference between Local Storage, Session Storage, and Cookies in JavaScript
- Difference between Session Storage and Local Storage in HTML5
- What is the difference between session and cookies?
- What is difference between vs. ?
- What is the Difference between Git Vs Subversion?
- What is the difference between global and local variables in Python?
- What is the difference between global and local Variables in JavaScript?
- Thread-local storage (TLS)
- Difference Between Cache and Cookies
- What is the difference between pairs() vs. ipairs() in Lua?
- What is the difference between Local Events and Global Events in jQuery?
- Volatile Storage vs Non-Volatile Storage
- Storing Credentials in Local Storage
- What is the relationship between Cookies and Cybersecurity?
- Difference between Memory and Storage
