From a1710cba4a5789be8b6cad21e6c7d3480f9a1448 Mon Sep 17 00:00:00 2001 From: Stefan Rupp Date: Thu, 21 May 2020 20:17:24 +0200 Subject: [PATCH] preparing to send other commands than 'reload' to clients --- templates/shared/_layout.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/shared/_layout.html b/templates/shared/_layout.html index bdccb0c..cb32ae2 100644 --- a/templates/shared/_layout.html +++ b/templates/shared/_layout.html @@ -33,7 +33,12 @@ socket.onmessage = function(event) { //alert(`[message] Data received from server: ${event.data}`); - location.reload(true) + if (event.data == "reload") { + location.reload(true); + } + else { + alert('unknown command: '+event.data); + } }; socket.onclose = function(event) {