----- Original Message -----
From: "FlashGuy" <[EMAIL PROTECTED]>
> How can I stop session variables from timing out until the browser is
closed or the user logs out?
---------------------------

1. Session variables shouldn't be timing out when you close the browser,
unless you've added code to do so, a la the 'Closing sessions on browser
close' tutorial at:
http://www.halhelms.com/index.cfm?fuseaction=tutorials.detail

2. You can *specify* the timeout in your CFAPPLICATION tag:

<cfapplication name="appName" sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0, 1, 0, 0)#">

This sets the timeout to 1 hour. However, while what you put in
CFAPPLICATION *will* override the "default session timeout" set on the
server via CF Admin, it *won't* override the "maximum session timeout" set
on the server - if you've no control over the server, you're stuck with what
that is set at (on install, usually 20 mins).

3. If you want sessions to persist indefinitely (i.e. the "Remember login on
this computer") option, you need to look into setting persistent cookies or
using client variables. CF client variables can be set as cookies, but they
can also be stored in the server registry or in a datasource, and bound to a
particular client via the CFID/CFTOKEN cookies that are automatically set by
the server on the client browser when you've got the CFAPPLICATION tag set
right (check documentation!).

HTH,

Gyrus
[EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
PGP key available

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to