The localStorage object
Store and retrieve data in the browser.
Use localStorage
to save data locally to the browser.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
localStorage.clear
Clear all values.
Definition
localStorage.clear()
Examples
Clear the value of localStorage
.
localStorage.clear();
localStorage.setValue
Set the current value.
Definition
localStorage.setValue(key, value)
Examples
Set the current value of localStorage
to userValue
.
localStorage.setValue(userValue);