简体   繁体   English

使用Chrome框架而不是SockJS

[英]Using chrome frame instead of SockJS

I'm creating web application using Go programming language. 我正在使用Go编程语言创建Web应用程序。

In my project I need to support IE>=8, Firefox >=13 Opera >=12 ... 在我的项目中,我需要支持IE> = 8,Firefox> = 13 Opera> = 12 ...
A part of the project rely on realtime push notification. 项目的一部分依赖于实时推送通知。 Go doesn't have good support for Socket.IO or SockJS to abstract from http push methods, but it has buildin support for websockets. Go对Socket.IO或SockJS从http push方法中抽象没有很好的支持,但是它对websockets具有内置支持。

I want to implement the realtime push module in Go using Go websockets - inside the http web application instead of creating other service in other language which uses SockJS. 我想在Go Websockets中使用Go websockets在Go中实现实时推送模块,而不是使用其他使用SockJS的语言创建其他服务。 This will require IE8, IE9 users to install chrome frame plugin. 这将要求IE8,IE9用户安装chrome框架插件。

Q: Are there any drawbacks of this solution, besides forcing IE8 and IE9 users to install chrome frame? 问:除了强迫IE8和IE9用户安装chrome框架外,此解决方案是否还有其他缺点?

Q2 Are there any pros for having separate service for push notification? Q2是否有为推送通知提供单独服务的优点? (besides having better browser compatibility)? (除了具有更好的浏览器兼容性)?

The pros is that I don't need to maintain separate service and I can reuse Go code. 优点是我不需要维护单独的服务,并且可以重用Go代码。

It sounds like you have a good idea of the trade-off. 听起来您对权衡有个好主意。 Only you can know if installing chrome frame will be acceptable to your users. 只有您知道用户是否可以安装chrome框架。

If you only/mostly need to push data TO the users then also look at the EventSource API. 如果您仅/主要需要将数据推送给用户,则还可以查看EventSource API。 It is more widely supported and very simple to implement on the server. 它得到了更广泛的支持,并且在服务器上实现起来非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Angular5 中使用 SockJS 时出错 - “sockjs_client_1.SockJS 不是构造函数” - Error using SockJS in Angular5 - "sockjs_client_1.SockJS is not a constructor" 在 Magnolia CMS 上使用 Spring + SockJS + STOMP 的 Websockets - Websockets Using Spring + SockJS + STOMP on Magnolia CMS Websockets:是否可以使用SockJS添加多个端点? - Websockets: Is it possible to add multiple Endpoints using SockJS? sockjs什么时候回退到xhr流传输而不是websocket - when do sockjs fallback to xhr streaming transport instead of websocket 在angular2 webapp项目中使用sockjs-client / sockjs创建Websocket - Websocket creation using sockjs-client/sockjs in angular2 webapp project 使用 Spring 踩踏 websocket 并且 sockJS 消息丢失 - Stomp over websocket using Spring and sockJS message lost SockJS使用angular2和弹簧靴进行踩踏 - SockJS over stomp using angular2 and spring boot 使用sockjs的频道(node.js,socket.io) - Channels using sockjs (node.js, socket.io) Websockets + SockJs:使用stompclient时,ConnectCallback无法在客户端执行 - Websockets + SockJs: ConnectCallback not executing on client side when using stompclient 求一个简单的Android示例连接到Spring websocket(使用STOMP和sockjs) - Seeking a simple Android example to connect to Spring websocket (using STOMP and sockjs)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM