In back-end development, storage is a common part of the job. Application data is stored in databases, files in object storage, transient data in caches… there are seemingly endless possibilities for storing any sort of data. But data storage isn’t …
You can make the text inside any HTML element editable by adding the
<div contenteditable> Hey, I'm like a textarea kinda now! </div>
I wouldn’t say there are wheelbarrows full of use-cases for that, but it’s neat. One …
- Good! It’s an incredibly easy API to use.
localStorage.setItem('name', 'Chris'); let name = localStorage.getItem('name');
localStorageis a synchronous API that blocks the main thread, and any time you access it you potentially prevent
There are currently four active methods for storing data on the client side.
- Cookies (old school, still useful because they are sent with server requests)
- Local Storage (very easy to use)
- Session Storage (exactly the same, only