-
Notifications
You must be signed in to change notification settings - Fork 0
/
clearLocalStorage.html
66 lines (48 loc) · 1.71 KB
/
clearLocalStorage.html
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="favicon.ico">
<link rel="icon" type="image/png" sizes="512x512" href="images/mycuttie-512.png">
<link rel="icon" type="image/png" sizes="256x256" href="images/mycuttie-256.png">
<link rel="icon" type="image/png" sizes="192x192" href="images/mycuttie-192.png">
<link rel="icon" type="image/png" sizes="128x128" href="images/mycuttie-128.png">
<link rel="icon" type="image/png" sizes="64x64" href="images/mycuttie-64.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/mycuttie-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/mycuttie-16.png">
<link rel="apple-touch-icon" sizes="128x128" href="images/mycuttie-128.png">
<link rel="stylesheet" href="3rdparty/css/w3.css">
<link rel="stylesheet" href="css/w3-theme-mycuttie.css">
<script src="3rdparty/js/vue.js"></script>
<title>Clear local storage</title>
</head>
<body>
<div id="app">
Items in local browser storage for this domain:
<ul id="example-1">
<li v-for="key in localStorageKeys">
{{ key }}
</li>
</ul>
<button v-on:click="clearLocalStorage">Clear local storage</button>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
localStorageKeys: Object.keys(localStorage)
},
computed: {
},
methods: {
clearLocalStorage: function() {
localStorage.clear();
this.localStorageKeys= Object.keys(localStorage);
}
}
});
</script>
</body>
</html>