localStorage
A key-value local storage mechanism provided by browsers. Data is kept on the user's device and is not sent to the server with requests, with a capacity typically of around 5 MB.
Timeline (last 90 days)
The cost of storing the API Key locally in the browser is that it must be re-entered after switching browsers or clearing the cache, and the frontend code must avoid writing the Key to a location readable by third-party scripts.
In a UXSS vulnerability, the malicious script runs under the victim page's origin and can read that origin's cookies, localStorage and DOM content, thereby hijacking sessions or stealing sensitive data.
Chat record import involves data format and privacy issues: the imported file may contain a large amount of personal conversation content, and if the frontend stores it in browser local storage (localStorage / IndexedDB), any script in the same browser environment can read it.
In the demo, Gemini CLI completed package.json creation, dependency installation, HTML/CSS/JS code generation, and unit test execution within a few minutes, and the final generated application supports adding and deleting tasks, marking completion, filtering by status, and persisting data via localStorage.
Browser storage (localStorage, sessionStorage, IndexedDB) requires no backend at all, with data existing only in the current browser; localStorage capacity is typically 5-10MB, sessionStorage is cleared when the tab is closed, making them suitable for standalone prototypes.
Storing it in localStorage allows the frontend to restore the conversation display after a refresh, but backend memory is still associated via memoryId, and the two need to stay consistent, otherwise there will be a disconnect where the interface shows records but the model does not remember them.
InvoiceSnap AI's frontend uses vanilla JavaScript for upload, table interaction, browser storage, and CSV export, with expense records stored in the browser's localStorage.
DishReactions uses browser localStorage to store all data, so feedback never leaves the device.
Common ways to achieve data persistence include browser-side localStorage or IndexedDB, as well as cloud sync and multi-device access via a backend or BaaS (such as Firebase, Supabase).
Data in localStorage and IndexedDB is bound to a specific domain and browser instance, and clearing browser data or changing browsers or devices will make the data inaccessible; they do not participate in the Service Worker caching mechanism and cannot automatically sync to the server.
13 more timeline events
All Facts (20)
浏览器localStorage的容量约为5-10MB
80%UnverifiedBrowser local storage is typically implemented using localStorage or IndexedDB technology, with data stored on the user's own machine without being transmitted through a server.
60%UnverifiedlocalStorage can only store string types; complex data must be serialized via JSON.stringify before storage and deserialized with JSON.parse when read.
60%UnverifiedlocalStorage is a client-side storage mechanism defined by the HTML5 specification that persists data in the browser as key-value pairs, with a capacity typically of 5–10 MB, and data is not lost when the page is refreshed or the browser is closed.
60%UnverifiedAn inherent limitation of the local-first architecture is that clearing site data or using private browsing mode causes data loss, and native synchronization across different browsers is not possible.
60%UnverifiedThe cost of storing the API Key locally in the browser is that it must be re-entered after switching browsers or clearing the cache, and the frontend code must avoid writing the Key to a location readable by third-party scripts.
50%UnverifiedIn a UXSS vulnerability, the malicious script runs under the victim page's origin and can read that origin's cookies, localStorage and DOM content, thereby hijacking sessions or stealing sensitive data.
50%UnverifiedChat record import involves data format and privacy issues: the imported file may contain a large amount of personal conversation content, and if the frontend stores it in browser local storage (localStorage / IndexedDB), any script in the same browser environment can read it.
50%UnverifiedBrowser storage (localStorage, sessionStorage, IndexedDB) requires no backend at all, with data existing only in the current browser; localStorage capacity is typically 5-10MB, sessionStorage is cleared when the tab is closed, making them suitable for standalone prototypes.
50%UnverifiedStoring it in localStorage allows the frontend to restore the conversation display after a refresh, but backend memory is still associated via memoryId, and the two need to stay consistent, otherwise there will be a disconnect where the interface shows records but the model does not remember them.
50%UnverifiedInvoiceSnap AI's frontend uses vanilla JavaScript for upload, table interaction, browser storage, and CSV export, with expense records stored in the browser's localStorage.
50%UnverifiedDishReactions uses browser localStorage to store all data, so feedback never leaves the device.
50%UnverifiedCommon ways to achieve data persistence include browser-side localStorage or IndexedDB, as well as cloud sync and multi-device access via a backend or BaaS (such as Firebase, Supabase).
50%UnverifiedAfter the Service Worker caches static resources, the app can be used fully offline, but the core data of the bookkeeping app is in localStorage, the Service Worker does not cache the data itself, and because there is no server, transactions entered offline will not automatically sync after the network is restored.
50%UnverifiedlocalStorage stores strings as key-value pairs, with capacity typically around 5MB, and its API is synchronous and simple; IndexedDB is an asynchronous transactional object database whose capacity is constrained by the disk quota, and it can store binary data and supports index and cursor queries.
50%UnverifiedData in localStorage and IndexedDB is bound to a specific domain and browser instance, and clearing browser data or changing browsers or devices will make the data inaccessible; they do not participate in the Service Worker caching mechanism and cannot automatically sync to the server.
50%UnverifiedThis zero-dependency PWA bookkeeping app is built with pure HTML, CSS, and native JavaScript, requires no registration, and stores all data locally in the browser (localStorage or IndexedDB); changing devices or clearing browser data will cause the records to be lost.
50%UnverifiedlocalStorage is a key-value local storage mechanism provided by browsers, with data kept on the user's device, a capacity typically around 5MB, and data inaccessible after switching devices or browsers.
50%UnverifiedDukaanAI's inventory data is initially stored in the browser's localStorage, and once multi-device sync or multi-person collaboration is needed, it must be migrated to a cloud database.
50%UnverifiedDukaanAI's initial version stores inventory data in the browser's localStorage, making it a local-first prototype rather than a cloud-based multi-user system.
50%