屏幕中如何滚动会话过期消息. [英] How to scroll session expire message in the screen.

查看:101
本文介绍了屏幕中如何滚动会话过期消息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在会话中遇到问题.

当会话清除后,它将保持相同的页面.因此用户尝试在不知道会话到期的情况下访问同一页面.

我想在3分钟前向用户显示滚动"消息(以图形方式).

如果页面仍然不活动,则滚动消息会显示您的帐户是安全的!因此您的会话将在3分钟内过期".

I am getting problem in the session.

when the session cleared then it will be maintain the same page. so user trying to access the same page without knowing the session expiration.

I want to display to the user as "Scrolling" message (graphically) 3 minutes before to the user.

The Scrolling message says "Your Account is secure!. So your session will expire within 3 Minutes" if the page still not active.

How to display message using scrolling to the user...?

推荐答案

记住网络是无状态的野兽.将页面呈现给浏览器后,它便无法与服务器建立连接,服务器不知道用户是否仍在浏览页面,导航或午餐.您可能需要某种类型的轮询以偶尔联系服务器以检查状态.

会话到期后,如果用户刷新页面,则应重新进行身份验证并刷新页面,以使页面保持不变.
Remember the web is a stateless beast. Once the page is rendered to the browser it has no connection to the server, which doesn''t know if the user is still viewing the page, has navigated away or gone to lunch. You would need some type of polling to occasionally contact the server to check the status.

After the session expires if the user refreshes the page it should re-authenticate and refresh the page so it should not remain the same.


请尝试使用时间;
表示获取服务器或系统的时间,并在指定的时间后显示消息;
使用计时器控制

试试这个链接:-

http://ajax.net-tutorials.com/controls/timer-control [ ^ ]

或使用此javascript功能
作为您的要求``settimeout()''

试试这个链接:-
http://www.w3schools.com/jsref/met_win_settimeout.asp [
try using the time ;
means fetch the time of the server or system and after specified time you displayed the message;
use timer control

try this link:-

http://ajax.net-tutorials.com/controls/timer-control[^]

or use this javascript fuction
as your requirement ''settimeout()''

try this link:-
http://www.w3schools.com/jsref/met_win_settimeout.asp[^]


这篇关于屏幕中如何滚动会话过期消息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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