blob: dc7cdc0248b6892bb84a8ef256c6a16f5a33ef27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width" />
<body>
<h1>Storage check</h1>
<script type="text/javascript">
if (sessionStorage.getItem("focusSessionTest") == "caterpillar") {
document.write("<p>Session storage has value</p>");
} else {
document.write("<p>Session storage empty</p>");
}
if (localStorage.getItem("focusLocalTest") == "caterpillar") {
document.write("<p>Local storage has value</p>");
} else {
document.write("<p>Local storage empty</p>");
}
</script>
</body>
</html>
|