en-ca 1999-12-31 0.1 Doc_Builder DM Solutions Group Inc. chameleon@lists.maptools.org Christopher R. Thorne DM Solutions Group Inc. chameleon@lists.maptools.org Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org KeepSessionAlive TBD Utility Widget 2.0 2005-01-10 TECHRELEASE Paul Spencer DM Solutions Group Inc. chameleon@lists.maptools.org Chameleon applications remember the current state of the application by saving some settings in a server-side session. By default, server-side sessions are configured to expire after some pre-determined period of inactivity (typically, 30 minutes). The KeepSessionAlive widget is used to ensure that a user's session never expires while the application is open in a browser window. This "invisible" widget needs to be placed somewhere inside the body of the application page. It represents itself in the Web page as a transparent 1x1 pixel image that refreshes its contents on a regular (configurable) basis in order to keep the associated PHP session alive. Expiration of sessions is intended to reduce server stress by allowing cleanup of extraneous session files on a regular basis. Some applications may be intended to be long-lived, particularly those built for an internal or closed audience. In these cases, it is sometimes desirable to keep the application's session alive even though the user may not be using it constantly. It is not recommended that the KeepSessionAlive widget be used on high-load servers with restricted temporary space or in applications that don't specifically require this functionality. <CWC2 TYPE="KeepSessionAlive" ENABLED="[TRUE|FALSE]" FORMINDEX="[0 < integer]" VISIBLE="[TRUE|FALSE]" <!-- KeepSessionAlive Attributes --> TIMEOUT="[0 < integer < 1800]"/> The following example tag keeps the session alive every 300 seconds or 5 minutes. <cwc2 type="KeepSessionAlive" timeout="300"/> Hawaii Demo www.mapsherpa.com/hawaii2/ The Hawaii Demo uses the latest 1.99 Chameleon version. Base TIMEOUT integer Widget Only 1800 0 1800 Set the period (in seconds) after which the application automatically connects to the server to keep the session alive. sid unknown KeepSessionAlive_ Private The guts of this widget that refresh the hidden image to prevent the session timing out.