blob: c38f805cc4ca5d45faaaa1f035b743afde99bcaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>localStorage and sessionStorage Test</title>
<script>
"use strict";
/* eslint-disable no-unused-vars */
function init() {
// We use the value key to ensure we cover an issue with iterating through
// storage entries... please leave this key as "key"
localStorage.setItem("key", "value1");
localStorage.setItem("key2", "value2");
// We use the value key to ensure we cover an issue with iterating through
// storage entries... please leave this key as "key"
sessionStorage.setItem("key", "value3");
sessionStorage.setItem("key2", "value4");
}
</script>
</head>
<body onload="init()">
<h1>localStorage and sessionStorage Test</h1>
</body>
</html>
|