17
rated 0 times
[
20]
[
3]
/ answers: 1 / hits: 54555
/ 14 Years ago, sun, january 16, 2011, 12:00:00
G'day guys,
I'm trying to figure out the best way to check for empty storageSession
in HTML5.
I noticed that some browser returns null and some return just empty space if you clear or did not set any values to the sessionStorage
.
I've tried the following
if (sessionStorage.getItem('value1') == null && sessionStorage.getItem('value2') == null) {
But it doesn't seem to work.
Anyone got a better way to check if a sessionStorage
is empty?
Appreciate your help on this and thank you in advance.
More From » html