You could always set a session var w/ the current date and have a not
isDefined() making sure it isn't overwritten.

<cfif not isDefined("session.created_at")>
  <cflock scope="session" type="exclusive" timeout=2>
    <cfset session.created_at = now()>
  </cflock>
</cfif>

   If this was thrown into the Application.cfm you'd have a created_at var
initialised w/ the session and valid until it expires. I'm not aware that CF
tracks the absolute creation time, but it might be some undocumented var
(it's not in the session scope if you loop through the struct though).


-----Original Message-----
From: Katrina Chapman [mailto:[EMAIL PROTECTED]]
Sent: January 17, 2001 07:50
To: CF-Talk
Subject: RE: Session age?


Merry Meet Jon,

The way that I understand session variables to work you can't tell when the
var was originally set on the users machine because that time stamp is reset
everytime they access a new page.  If it wasn't updated with the current
time then the user would timeout even if they weren't done with your site.

Blessed Be,
--K

-----Original Message-----
From: Jon Hall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 2:53 AM
To: CF-Talk
Subject: Session age?


Is there a way to tell when a session variable was created?

jon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to