Local Storage Manager — Reference
Persist JSON-compatible browser state for the current origin.
Persist JSON-compatible browser state for the current origin.
Before you begin
Section titled “Before you begin”- An App Connect page with the State Management component included. Use a dedicated test key for experiments.
Local Storage Manager
Section titled “Local Storage Manager”Persist JSON-compatible browser state for the current origin.
Properties, data and actions
Section titled “Properties, data and actions”| Part | Meaning |
|---|---|
| ID | The component name, for example localState. |
| Define Local Storage Items | Declares names/types for the editor’s data/action pickers. Defining an item does not write its value. |
| Values | Use localState.data.name, such as localState.data.wappler_docs_preference. The data property contains the stored values. |
| Set: Name / Value | JSON-serializes a value into a storage key beginning dmxState-. Strings, numbers, booleans, arrays and plain objects can be represented. Object prototypes and functions do not survive JSON storage. |
| Data | Additional controls may reflect the selected item schema when configuring an object value. They still build the value passed to Set. |
| Remove | Removes the one named dmxState- key and refreshes this component’s data. |
| Remove All | Removes every local-storage key starting dmxState- for this origin. It is not limited by the component ID and does not clear unrelated storage keys. |
Worked example
Section titled “Worked example”Use localState.set(‘wappler_docs_preference’, ‘compact’), then bind a label to localState.data.wappler_docs_preference. Reload the page and confirm the value remains. Remove just wappler_docs_preference after testing rather than clearing other settings.
Lifetime and boundaries
Section titled “Lifetime and boundaries”Local storage is browser/origin-scoped convenience state, not a database or synchronization service. Components on the same origin share the dmxState- key space. Browser policy, user clearing and storage failures can remove or block values; do not store authorization decisions or assume data survives indefinitely.
Choose the right storage
Section titled “Choose the right storage”Compare URL, cookie, session and local state before choosing where application data belongs. Browser state never replaces server-side access checks.
Check your result
Section titled “Check your result”You can use the correct data path, configure a value and verify the storage/removal scope.