At 09:06 AM 12/19/00 -0500, Ryan Wood wrote:
>Can your set certain client variables (stored as cookies) to expire at the
>end of a session and others to remain on the client for a certain length of
>time as you can with the CFCOOKIE tag?
>
>Ryan
Hi Ryan,
1) I hope you know that client variables aren't really stored on the client
(unless you are implementing them as cookies)
2) There is a special client variable called "Client.LastVisit" which
generally exists (I think there is some setting in CF Admin to turn them
on/off, but I forgot where. Then use some code like this:
IF THE USER HAS NOT VISITED THE PAGE IN MORE THAN 20 MINUTES, PURGE
SPECIFIC CLIENT VARIABLES
<CFSET PurgeClientVarList = "UserID,MemberID,ShopptingCartList,Preferences">
<!--- IF THE USER HAS NOT VISITED THE PAGE IN MORE THAN 20 MINUTES --->
<CFIF DateDiff('n',Now(),Client.LastVisit) GT 20>
<CFLOOP list="#PurgeClientVarList#" index="CurVar">
<!--- TO MAKE IT NON-EXISTANT --->
<CFSET Temp = DeleteClientVariable(CurVar)>
<!--- OR IF YOU WANT IT TO EXIST BUT BE EMPTY --->
<CFSET Client.#CurVar# = "">
</cfloop>
</cfif>
Cheers,
Douglas Smith
====================================================
Douglas M. Smith - Application Architect
====================================================
TERATECH, INC. - TOOLS FOR PROGRAMMERS(tm)
Web (ColdFusion and ASP), Access, VisualBasic, Math and Statistics
SQL, programming tools & consulting
100 Park Ave, Suite 360, Rockville MD 20850 USA
Voice 301-424-3903, Fax 301-762-8185
http//www.teratech.com
====================================================
Email [EMAIL PROTECTED]
Mobil/Cell Phone (240) 601-5520
ICQ 41044319
====================================================
<http://eudora.voicecontact.com/vc3/index.html?douglas%40teratech.com>Online
Status:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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