Skip to content

Commit

Permalink
All right. Disable websockets on client side in order to speed up con…
Browse files Browse the repository at this point in the history
…nection process.
  • Loading branch information
majek committed Nov 3, 2011
1 parent 395d5ca commit ad11cbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions mud/core/templates/index.html
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion mud/static/main.js
Expand Up @@ -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() {
Expand Down

0 comments on commit ad11cbe

Please sign in to comment.