Add timeouts to XhttpGet requests

This commit is contained in:
logicog
2025-10-22 08:05:44 +02:00
parent ba902a68d4
commit e5f5955f71
3 changed files with 7 additions and 23 deletions
+2 -2
View File
@@ -51,10 +51,10 @@ function update() {
}
};
xhttp.open("GET", "/status.json", true);
xhttp.send();
xhttp.timeout = 5000; xhttp.send();
}
window.addEventListener("load", function() {
update();
const interval = setInterval(update, 1000);
const interval = setInterval(update, 2000);
});