localStorage vs sessionStorage
See original GitHub issueI think it might be good to provide an option to set the storage type (or switch between the two)
localStorage
is persistent and per domainsessionStorage
is non-persistent and per tab/page
Both have their own applications.
Suggested API change:
// type -- str, either "localStorage" or sessionStorage"
store.use(type)
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Introduction to localStorage and sessionStorage
localStorage and sessionStorage are almost identical and have the same API. The difference is that with sessionStorage , the data is persisted ...
Read more >HTML5 Local storage vs. Session storage - javascript
The main difference between localStorage and sessionStorage is that sessionStorage is unique per tab. If ...
Read more >Difference Between Local Storage, Session Storage And ...
Session Storage objects can be accessed using the sessionStorage read-only property. The difference between sessionStorage and localStorage ...
Read more >Local Storage vs Session Storage vs Cookie
Both storage provide a large memory capacity. To be more specific, local Storage stores up to 10 megabytes and session storage stores up...
Read more >Session Storage vs. Local Storage: What Are the ...
Remember that while local storage stores data across several tabs, session storage is unique to each tab, for the most part. You should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
store.js v2 is almost complete, and has a session storage option (among a bunch of additional addon features - see https://github.com/marcuswestin/store.js/tree/v2-dev/storage & https://github.com/marcuswestin/store.js/tree/v2-dev/addon)
The docs explain how to create a custom build - to get one that only uses sessionStorage, you can do this: