Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

save to local storage

localStorage.setItem('myCat', 'Tom');

var cat = localStorage.getItem('myCat');

localStorage.removeItem('myCat');

// Clear all items
localStorage.clear();
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #save #local #storage
ADD COMMENT
Topic
Name
6+2 =