使用Chrome Frame而不是SockJS

huangapple go评论88阅读模式
英文:

Using chrome frame instead of SockJS

问题

我正在使用Go编程语言创建Web应用程序。

在我的项目中,我需要支持IE>=8,Firefox>=13,Opera>=12等浏览器。
项目的一部分依赖于实时推送通知。Go对于抽象出HTTP推送方法的Socket.IO或SockJS支持不好,但它内置了对Websockets的支持。

我想使用Go Websockets在HTTP Web应用程序中实现实时推送模块,而不是创建使用SockJS的其他语言的其他服务。这将需要IE8和IE9用户安装chrome frame插件。

Q: 除了强制IE8和IE9用户安装chrome frame之外,这种解决方案还有什么缺点吗?

Q2 除了具有更好的浏览器兼容性之外,是否有为推送通知设置单独服务的优点?

优点是我不需要维护单独的服务,并且可以重用Go代码。

英文:

I'm creating web application using Go programming language.

In my project I need to support IE>=8, Firefox >=13 Opera >=12 ... <br />
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.

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. This will require IE8, IE9 users to install chrome frame plugin.

Q: Are there any drawbacks of this solution, besides forcing IE8 and IE9 users to install chrome frame?

Q2 Are there any pros for having separate service for push notification? (besides having better browser compatibility)?

The pros is that I don't need to maintain separate service and I can reuse Go code.

答案1

得分: 1

听起来你对权衡有一个很好的想法。只有你自己才能知道是否安装Chrome Frame对你的用户来说是可接受的。

如果你只/主要需要向用户推送数据,那么还可以看看EventSource API。它得到了更广泛的支持,并且在服务器上实现起来非常简单。

英文:

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.

If you only/mostly need to push data TO the users then also look at the EventSource API. It is more widely supported and very simple to implement on the server.

huangapple
  • 本文由 发表于 2013年4月22日 18:19:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/16144682.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定