I dealing with one problem. I have user idle timer built in jQuery so that if user is not active for 30 minutes he's been logged out of the app. This works perfectly on one browser tab open. Now I would like to have the same thing just for multiple tabs. So, if user open few tabs and work in only one of them he's still active for all app, my current set up logs him out from other tabs which he didn't use for 30 minutes. How can I communicate with all tabs at the same time? Thanks in advance, Wolf.
问问题
428 次
1 回答
0
- 为所有页面创建一个通用计时器。单个函数即可。将此函数放在单独的 js 文件中
在 window.onload 上启动计时器。在window.blur上暂停计时器。在window.focus上重新启动计时器
- 在您的应用程序的每个页面上都包含此内容。
如果您显示您的代码,您可以获得更多帮助。
于 2013-07-30T10:24:18.827 回答