自动会话超时发生时绕过浏览器弹出窗口阻止 [英] Bypassing Browser popup blocking when automatic session timeout occurs

查看:152
本文介绍了自动会话超时发生时绕过浏览器弹出窗口阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助解决以下问题.

我已经在浏览器中启用了阻止弹出窗口"选项.我们正在使用后台ajax调用进行会话验证,以检查会话是否处于活动状态.如果会话在期望的时间间隔内未处于活动状态,则会弹出一个窗口以进行通知.

I have enabled the "Block popup" option in browser. We are doing a session validation using a background ajax call to check the session is active or not. If the session is not active for a desired interval a popup window will come for notification.

现在是问题所在.由于会话通知弹出窗口将在没有任何客户端交互的情况下自动出现,因此该弹出窗口被浏览器阻止.但是,如果客户单击该弹出窗口的形式的任何其他弹出窗口,该弹出窗口将不会被浏览器阻止.

Now comming to the problem . since the session notification popup is comming automatically without any client interaction, This popup is blocked by the browser. But if a client clicks anyother popup window in the form that popup window will not be blocked by the browser.

即使启用了浏览器的阻止弹出窗口"选项,我也希望会话通知弹出窗口也不会被浏览器阻止.

I want the session notification popup window also not to be blocked by the browser even if the browser "Block popup" option is enabled.

推荐答案

弹出窗口阻止程序用于阻止弹出窗口.如果有解决的办法,那将是完全没有用的.

A popup blocker is used to block popups. If there was a way around it, it would be completely useless.

您可以:

  1. 在弹出窗口阻止程序的设置中为您的域添加例外
  2. 不使用弹出窗口来通知您,而是通过javascript将其显示在页面上

这篇关于自动会话超时发生时绕过浏览器弹出窗口阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆