抑制本机 Android 会话超时警告

发布于 2024-12-29 12:15:57 字数 178 浏览 2 评论 0原文

所以我只是想知道是否有人知道一种方法来抑制 Android 浏览器中出现的会话超时对话框。

基本上,我正在使用 Jquery Mobile 编写一个 Web 应用程序,并自己处理会话检查,如果它不再有效,则将它们重定向到登录页面。我希望弹出的警告不显示,或者我可以使用 Javascript 覆盖该行为?有人有什么想法吗?谢谢

SO I was just wondering if anyone knows of a way to suppress the session timeout dialog that comes up in the android browser.

Basically, I am writing a web app using Jquery Mobile and handle the session check myself, and redirect them to a login page if it's not longer valid. I would like that warning that pops up not display, or perhaps I could override the behavior using Javascript? Anyone have any ideas? Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

虐人心 2025-01-05 12:15:57

我想通了。我最终向该函数添加了一个回调来处理用户的会话超时。

// if the user's session has timed out, redirect to login
$("body").bind("signin", mobileHomePage.redirectToLogin);

因此,如果会话过期,则会触发登录事件并重定向它们。

I figured it out. I ended up adding a callback to the function to handle the user's session timeout.

// if the user's session has timed out, redirect to login
$("body").bind("signin", mobileHomePage.redirectToLogin);

So if the session is expired, the signin event is triggered and they are redirected.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文