(auto) session expire



This is a very common issue. I searched and found many sites talking
about this. but no good solution.
Well the problem is I want to set my session will expire after 10
minutes of inactivity. Just like an banking site.
When user is inactive for 10 minutes the session will expire. In fact
the browser will delete the cookie.
The browser will delete the cookie because it was told by the server.
I used these lines

session_cache_expire(APP_SESSION_TIMEOUT);
session_set_cookie_params(APP_SESSION_TIMEOUT*60);
ini_set("session.gc_maxlifetime", APP_SESSION_TIMEOUT * 60);
session_start();

It runs at the very beginning of my application. APP_SESSION_TIMEOUT
has value 10 which is in minutes.

The problem is it works good in FF3. But not in IE.

Any Idea how to resolve it? or any standard way to fix it?

--
Blog: http://talk.cmyweb.net/
Follow me: http://twitter.com/shiplu
.



Relevant Pages

  • Re: Question about cookies.
    ... Hey Roland, Have a look at this article, ... destroyed when the user closes his/her browser. ... destroy the cookie. ... > Sessions do not expire when the client closes the browser. ...
    (microsoft.public.scripting.vbscript)
  • Re: deleting cookies and local browser time versus server time
    ... based on what *it* thinks the time is, not what the server thinks the ... looks to be 3 or 4 hours in the past to my browser. ... give a cookie to expire at 4PM today, which is the time in Seattle, ...
    (comp.lang.php)
  • Re: Viewing contents of a cookie
    ... Then I redirect the browser to cookiecheck.php, ... But that page is not displaying the username. ... Is this a question of setting the path where the cookie is supposed to ... you'll most likely set this with the timefunction plus the number of seconds before you want it to expire. ...
    (comp.lang.php)
  • Re: Batch php to loggoff web site
    ... In your scripts, check if the time is between, say 08:00 and 21:00. ... If the user has closed their browser or does not refresh the page, ... can't remove the cookie. ... cookie to expire ten minutes ahead. ...
    (comp.lang.php)
  • Re: timing out the asp.net web application when not in use for 15 minutes
    ... Have you tried setting the timeout attribute to 15? ... This will expire ... the cookie after 15 minutes of inactivity. ...
    (microsoft.public.dotnet.framework.aspnet)