我被告知Orbited团队有抑制这个的黑客,但通过Orbited.js代码我无法弄清楚它们是什么.任何帮助将不胜感激.
这是我使用的一些代码..它使用jQuery,但我认为你可以弄清楚你需要什么,并使用你的库来做同样的事情.
<script type="text/javascript"> function poll(){ $.getJSON('/updates',function(json){ //reconnect since we successfully received data and disconnected poll(); //add something here to do whatever with the recieved data }); } /*call the poll function after document has loaded with setTimeout if called before the document finishes loading completely it will cause a constant loading indication*/ setTimeout(poll,1); </script>