Meteor, Modulus and secure websockets

泄露秘密 提交于 2019-12-06 08:02:12

No matter what you do it's likely at least a small subset of your users will fall back to XHR. WebSockets are still not fully supported everywhere, especially on mobile. Using SSL gets you much broader support, but still not ubiquitous.

As long as WebSockets appear to be working for you, there's not much else you can do. XHR, by design, will have very long response times. XHR works by opening long (~30s) connections to the server. If the server has nothing to say it will close the connection and do it again. This allows the server to immediately respond at anytime in that 30s window. These XHR polls show up as long response times but are perfectly normal.

Disclaiming: I'm a Modulus employee

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!