Last updated on
Apr 27, 2021
Before you begin, see Storage Functions.
Setting/getting an item
<cfclientsettings enableDeviceAPI=true> <cfclient> <cfset cfclient.localstorage.setItem("key1","value1")> <cfset keyVal = cfclient.localstorage.getItem("key1")> </cfclient>
Removing an item
<cfclientsettings enableDeviceAPI=true> <cfclient> <cfset cfclient.localstorage.setItem("key1","value1")> <cfset keyVal = #cfclient.localstorage.getItem("key1")> <cfset cfclient.localstorage.removeItem("key1")> </cfclient>