Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

localstorage

localStorage.setItem('name', 'Bob') // make/set a key/value
var username = localStorage.getItem('name') // get the key
console.log(username) // log the key
// This data will be saved even after you close the page
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #localstorage
ADD COMMENT
Topic
Name
7+5 =