Permalink
Browse files

All right. Disable websockets on client side in order to speed up con…

…nection process.
  • Loading branch information...
1 parent 395d5ca commit ad11cbe6e82df63dbc7f73660fc9cab6d83d1a28 @majek majek committed Nov 3, 2011
Showing with 8 additions and 1 deletion.
  1. +7 −0 mud/core/templates/index.html
  2. +1 −1 mud/static/main.js
@@ -17,6 +17,13 @@
<body>
<script>
var sockjs_url = "{{ sockjs_url }}";
+ // Disable websockets. Set to `undefined` for defaults.
+ var sockjs_protocols = ['xhr-streaming',
+ 'iframe-eventsource',
+ 'iframe-htmlfile',
+ 'xhr-polling',
+ 'iframe-xhr-polling',
+ 'jsonp-polling'];
</script>
<div id="maincolumn">
<div id="box">
View
@@ -21,7 +21,7 @@ $(function () {
$(function () {
var opts = {debug: true};
- var conn = new SockJS(sockjs_url, undefined, opts);
+ var conn = new SockJS(sockjs_url, sockjs_protocols, opts);
var to = null;
var ping = function() {

0 comments on commit ad11cbe

Please sign in to comment.