preparing to send other commands than 'reload' to clients

This commit is contained in:
Stefan Rupp 2020-05-21 20:17:24 +02:00
parent 644c28ae75
commit a1710cba4a

View File

@ -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) {