📎 Webclip
How To Use LocalStorage to Store Data in the Browser
LocalStorage lets web apps save temporary user-specific data in the browser as string values. It uses key-value storage, so data is retrieved and set through keys, and anything that is not a string is converted before it is stored.
Saved data remains until it is deleted, either by key or all at once. Apps on the same domain can access the same stored data, which makes it possible to split an app into smaller apps without losing browser data access.
Reading notes#
- Stores browser data as strings in a key-value format
- Converts non-string data to strings before saving
- Keeps data until it is deleted
- Allows removing one key or all stored data at once
- Data on the same domain is available to every app hosted there
- Unlike cookies, local-storage data has no expiration time
