session_cache_expire

Description

session_cache_expire
([ string$new_cache_expire
] ) : int

session_cache_expire() returns the current setting of
session.cache_expire.

The cache expire is reset to the default value of 180 stored in
session.cache_expire
at request startup time. Thus,
you need to call session_cache_expire() for every
request (and before session_start() is called).

Parameters

new_cache_expire

If new_cache_expire is given, the current cache
expire is replaced with new_cache_expire.

Note:
Setting new_cache_expire is of value only, if
session.cache_limiter is set to a value
different from nocache.

Return Values

Returns the current setting of session.cache_expire.
The value returned should be read in minutes, defaults to 180.

User Contributed Notes 3 notes

Whatever you set this setting to, it won't change how long sessions live on your server.

This only changes HTTP cache expiration time (Expires: and Cache-Control: max-age headers), which advise browser for how long it can keep pages cached in user's cache without having to reload them from the server.

I've encountered the same problem of loosing focus when using IE and a javascript window.location.refresh/replace().

After fusing around I found that a <meta http-equiv="refresh" content="600"> works without move the focus on the parent frame's form. The down side is loading up the browser history and an annoying 'click' in IE on the page load.