Jetty Websockets: share connection among many tabs

社会主义新天地 提交于 2019-12-13 07:11:11

问题


What I have: I use Jetty Websockets and jquery + backbone.js on my client side. Each time user open a new tab, he get new websocket connection and must to log in again.

What I want: I want user haven't to log in each time he open new tab. Instead if he's already logged in one tab, new tabs will automatically log in him and redirect him to the home page.

Questions:

  1. What is better: share the same websocket connection between many tabs or store user credentials and automatically relogin on new tab opening?
  2. How can I do that? Provide a little example please?

来源:https://stackoverflow.com/questions/21749338/jetty-websockets-share-connection-among-many-tabs

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