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>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy