diff --git a/sd-card/html/index.html b/sd-card/html/index.html
index c13577acc..fa8baf89b 100644
--- a/sd-card/html/index.html
+++ b/sd-card/html/index.html
@@ -28,6 +28,22 @@
el.style.visibility = 'visible';
});
}
+
+ function getCookie(cname) {
+ let name = cname + "=";
+ let decodedCookie = decodeURIComponent(document.cookie);
+ let ca = decodedCookie.split(';');
+ for(let i = 0; i
@@ -88,11 +104,11 @@ An ESP32 all inclusive neural network recognition system for meter digitaliz
LoadFwVersion();
LoadWebUiVersion();
- if (document.cookie == "" || document.cookie == "reboot_page.html") {
- document.cookie = "overview.html";
+ if (getCookie("page") == "" || getCookie("page") == "reboot_page.html") {
+ document.cookie = "page=overview.html";
}
- console.log("Loading page: " + document.cookie);
- document.getElementById('maincontent').src = document.cookie;
+ console.log("Loading page: " + getCookie("page"));
+ document.getElementById('maincontent').src = getCookie("page");
diff --git a/sd-card/html/ota_page.html b/sd-card/html/ota_page.html
index 5a87d44e7..eb58743d1 100644
--- a/sd-card/html/ota_page.html
+++ b/sd-card/html/ota_page.html
@@ -210,7 +210,7 @@ Status: idle
document.getElementById("status").innerText = "Status: Update completed!";
document.getElementById("doUpdate").disabled = true;
document.getElementById("newfile").disabled = false;
- document.cookie = "overview.html"; // Make sure after the reboot we go to the overview page
+ document.cookie = "page=overview.html"; // Make sure after the reboot we go to the overview page
if (xhttp.responseText.startsWith("reboot"))
{