Oracle Apex 中应用程序级别的会话超时 [英] Session Timeout on Application level in Oracle Apex

查看:59
本文介绍了Oracle Apex 中应用程序级别的会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序 ID 中,我更改了安全属性 ->最大会话空闲时间(以秒为单位)为 900 秒,但问题是如果我在相同的页码上,它会给我会话超时消息.

In my Application ID I changed in security attributes -> Maximum Session Idle Time in Seconds as 900 seconds, but issue is if I am on same page number it gives me session timeout message.

我希望用户在页面或其他选项卡上移动时的会话超时不应受到限制,因为我的所有应用程序工作大部分都在一页中.

I want session timeout on user's movement over the page or other tabs it should not be restricted because all my application work is in mostly one page.

推荐答案

Session timeout 是由 Web 应用服务器管理的,它需要一个请求或表单提交来告诉他,嘿我还活着,伙计请不要杀会话,因此您需要创建一个 ajax 请求来告诉 Web 服务器您仍然在那里.

Session timeout is managed by the web application server and it needs a request or form submission to tell him, hey I'm alive, dude please don't kill the session, so for that reason you need to create an ajax request to tell web server you are still there.

您可以使用此脚本来检测用户不活动

You can use this script to detect user inactivity

var IDLE_TIMEOUT = 60; //seconds
var _idleSecondsCounter = 0;
document.onclick = function() {
    _idleSecondsCounter = 0;
};
document.onmousemove = function() {
    _idleSecondsCounter = 0;
};
document.onkeypress = function() {
    _idleSecondsCounter = 0;
};
window.setInterval(CheckIdleTime, 1000);

function CheckIdleTime() {
    _idleSecondsCounter++;
    var oPanel = document.getElementById("SecondsUntilExpire");
    if (oPanel)
        oPanel.innerHTML = (IDLE_TIMEOUT - _idleSecondsCounter) + "";
    if (_idleSecondsCounter >= IDLE_TIMEOUT) {
        alert("Time expired!");
        document.location.href = "logout.html";
    }
}

检查这篇文章 通过浏览器检测用户不活动 - 纯粹通过javascript

这篇关于Oracle Apex 中应用程序级别的会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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