Session storage - It should be used when you need to store something that changes frequently.
Local storage - It should be used for long term use where data won't get changed often.
I don't see why this should be the case. The use cases for each have nothing to do with frequency of changes and everything to do with whether the data needs to persist between tab sessions.
For very frequent writes, especially if they involve large volumes of data, IndexedDB is a better tool as it's asynchronous (non-blocking) and can store many types of structured data without serializing them first.
Unfortunately the IndexedDB API is horrendously designed, so a tiny wrapper library such as idb is advisable.
Optimistic human 🧍 and trying hard not to procrastinate things!!!😜 Passionate about Web Development and have a keen interest in learning new technologies.
I don't see why this should be the case. The use cases for each have nothing to do with frequency of changes and everything to do with whether the data needs to persist between tab sessions.
For very frequent writes, especially if they involve large volumes of data, IndexedDB is a better tool as it's asynchronous (non-blocking) and can store many types of structured data without serializing them first.
Unfortunately the IndexedDB API is horrendously designed, so a tiny wrapper library such as idb is advisable.
Thanks for the insight 🙂.