diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js index 98688560a..3d8fd4bef 100644 --- a/www/pgm2/fhemweb.js +++ b/www/pgm2/fhemweb.js @@ -916,7 +916,7 @@ FW_longpoll() var loc = (""+location).replace(/\?.*/,""); if(typeof WebSocket == "function" && FW_longpollType == "websocket") { - FW_pollConn = new WebSocket((loc+query).replace(/^http/i, "ws")); + FW_pollConn = new WebSocket(loc.replace(/[&?].*/,'').replace(/^http/i, "ws")+query); FW_pollConn.onclose = FW_pollConn.onerror = FW_pollConn.onmessage = FW_doUpdate;