Ok. How do I check to see if HTML5 localstorage is empty? I don’t need to know what’s inside just if there is anything inside.
if (localStorage !== null) {
alert("not empty!")
};
This is returning empty all the time.
Ok. How do I check to see if HTML5 localstorage is empty? I don’t need to know what’s inside just if there is anything inside.
if (localStorage !== null) {
alert("not empty!")
};
This is returning empty all the time.
window.localStorage.length