diff --git a/internal/webserver/web/templates/html_end2end.tmpl b/internal/webserver/web/templates/html_end2end.tmpl
index f254681..afad5e6 100644
--- a/internal/webserver/web/templates/html_end2end.tmpl
+++ b/internal/webserver/web/templates/html_end2end.tmpl
@@ -45,9 +45,14 @@
writer.close()
}
+
+ function clearKeys() {
+ localStorage.removeItem("e2ekey");
+ }
+
function newKey() {
- localStorage.clear();
+ clearKeys();
let key;
try {
key = GokapiE2EGetNewCipher(true);
@@ -102,7 +107,7 @@