session-timeout

How to keep alive a user's session while they are posting on a forum?

北城余情 提交于 2019-11-27 01:10:31
问题 I have a site with a session timeout of 15 minutes. On some pages a user occasionally spends longer than 15 minutes filling in a reply. What is the best solution to keep alive the session in this case? I already use JQuery on these pages, so possibly pinging a server, but on what events? The backend is a Struts on Tomcat . 回答1: Given you don't want to change the site's session timeout.. Set a timeout/interval (< 15min) event in javascript and decide what to do when the event triggers. If you

Is there a way to combine behavior of SESSION_EXPIRE_AT_BROWSER_CLOSE and SESSION_COOKIE_AGE

邮差的信 提交于 2019-11-27 00:40:01
问题 For security reasons I set SESSION_EXPIRE_AT_BROWSER_CLOSE to true. But, browser-length cookies (cookies that expire as soon as the user closes his or her browser) don't have a expire time, then SESSION_COOKIE_AGE has no effects (Yes, I check it). But I want to set a logout/timeout on inactivity plus to logout on browse closing. My question is, What is the best way to implement inactivity timeout/logout in browser-length cookies scenario? 回答1: As you explains, SESSION_EXPIRE_AT_BROWSER_CLOSE

Angular session timeout and management [duplicate]

谁说我不能喝 提交于 2019-11-27 00:00:54
问题 This question already has an answer here: Auto logout with Angularjs based on idle user 10 answers Is there any way to manage user session using Angularjs?, I mean:: Session timeout - when system is idle. Alerts when session is near to expire with option to resume session. Redirect (or any other action) when trying to make a request if session has expired. Could be Interceptors one good option to solve this problem? Can you provide an example? Thanks in advance. 回答1: Try ng-idle. It's simple

How to configure a session timeout for Grails application?

房东的猫 提交于 2019-11-26 22:35:30
问题 In one of controllers in my Grails application I'm preserving a parameter value in a session variable like this: session.myVariable = params.myValue After that, I can access the saved value from different controllers/GSP-pages as long as I actively use the app. However, if I don't use my app for a while, even though my browser window is still open, the session variable looses it's value. Does this happens because the session expires? I was under impression that a session lives until the

How to handle session expiration and ViewExpiredException in JSF 2?

可紊 提交于 2019-11-26 21:26:10
Consider the following scenario. I am clicking the submit button of a JSF form, after the session has timed out(expired). The browser displays some exception message: ViewExpiredException: view context could not be restored What I want to do is, to automatically redirect to the homepage of the website after the session has expired. What is the mechanism to do this? Any help would be much appreciated. BalusC To handle the exception whenever the user invokes a synchronous POST request on a page while the HTTP session has been expired and the JSF view state saving method is set to server , add an

ASP.NET - Javascript timeOut Warning based on sessionState timeOut in web.config

坚强是说给别人听的谎言 提交于 2019-11-26 21:26:01
问题 Problem: I am looking to create a time-out warning message on an asp.net page with a c# code behind based off my webconfig sessionState TimeOut Attribute. Code on web.config: <configuration> <system.web> <sessionState timeout="20"></sessionState> </system.web> </configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="EchoSignDocumentService10HttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies=

IIS Session Timeout vs ASP.NET Session Timeout

蓝咒 提交于 2019-11-26 19:56:59
问题 In IIS 6 (and other versions too afaik), there is a Session Timeout setting in Properties -> Home Directory Tab -> Configuration button -> Options tab. Looks like this: And in the ASP.NET web.config there is a SessionState setting, looks like this: <system.web> <sessionState timeout="120" /> <!-- etc .. --> </system.web> Are they, by any chance, related? Do they set the same thing, or different things? 回答1: They are not the same. The IIS session timeout is for clasic ASP pages. The web.config

SessionTimeout: web.xml vs session.maxInactiveInterval()

僤鯓⒐⒋嵵緔 提交于 2019-11-26 19:36:51
I'm trying to timeout an HttpSession in Java. My container is WebLogic. Currently, we have our session timeout set in the web.xml file, like this <session-config> <session-timeout>15</session-timeout> </session-config> Now, I'm being told that this will terminate the session (or is it all sessions?) in the 15th minute of use, regardless their activity. I'm wondering if this approach is the correct one, or should I programatically set the time limit of inactivity by session.setMaxInactiveInterval(15 * 60); //15 minutes I don't want to drop all sessions at 15 minutes, only those that have been

Detecting user inactivity over a browser - purely through javascript [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-11-26 15:21:08
问题 This question already has answers here : How to know browser idle time? (5 answers) Closed 4 years ago . In building a monitor, which would monitor any activity on the browser by the user, like click of a button or typing on a textbox (not mouse hovering on document). So if there is no activity from the user for a long time, the session will time out. We need to do it without jquery or anything such. I may use ajax. java servlet in other end is preferable. 回答1: Here is pure JavaScript way to

Session timeouts in PHP: best practices

风格不统一 提交于 2019-11-26 11:54:16
问题 What is the actual difference between session.gc_maxlifetime and session_cache_expire() ? Suppose I want the users session to be invalid after 15 minutes of non-activity (and not 15 after it was first opened). Which one of these will help me there? I also know I can do session_set_cookie_params() which can set the user\'s cookie to expire in some amount of time. However, the cookie expiring and the actual session expiring on the server side are not the same; does this also delete the session