Add automatic detection of websocket
authorymh <ymh.work@gmail.com>
Wed, 20 Feb 2013 12:14:10 +0100
changeset 63 c8ea79397dfe
parent 62 f9019462465a
child 65 3389e6c46936
Add automatic detection of websocket
server/src/main/webapp/static/js/config.js
--- a/server/src/main/webapp/static/js/config.js	Thu Feb 14 17:39:52 2013 +0100
+++ b/server/src/main/webapp/static/js/config.js	Wed Feb 20 12:14:10 2013 +0100
@@ -23,9 +23,9 @@
 };
 
 var cowebConfig = {
-    baseUrl: window.location.protocol + '//' +window.location.host,
+    baseUrl: window.location.protocol + '//' + window.location.host,
 	adminUrl : dojoConfig.baseUrl+'admin',
 	debug: false,
-	useWebSockets: true
+	useWebSockets: "WebSocket" in window,
 };