Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get all items in localstorage

function allStorage() {

    var values = [],
        keys = Object.keys(localStorage),
        i = keys.length;

    while ( i-- ) {
        values.push( localStorage.getItem(keys[i]) );
    }

    return values;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #items #localstorage
ADD COMMENT
Topic
Name
9+5 =