Multiple storages using localStorage
- by Blondie
Hey,
Is it possible that the same name used can have many different values stored separately and to be shown in a list?
e.g.
function save()
{
var inputfield = document.getElementById('field').innerHTML;
localStorage['justified'] = inputfield;
}
<input type="text" id="field" onclick="save();" />
Everytime someone enters something in the input field, and click on save, the localstorage will only save the value in the same name, however, does this conflict the way storage are saved, like being replaced with the latest input value?
Also, is there anyway to prevent clearing the localstorage when clearing the cache?
Thanks.