Getting A List Of Client Variables; Deleting Client Variables - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

192
the client ID (CFID)and the client security token (CFTOKEN) between pages, either in
hidden form fields or appended to URLs. You accomplish this using the variable
Client.URLTOKEN or Session.URLTOKEN.
Note

Getting a list of client variables

To obtain a list of the custom client parameters associated with a particular client, use
the GetClientVariablesList function.
<CFOUTPUT>#GetClientVariablesList()#</CFOUTPUT>
The GetClientVariablesList function returns a comma-separated list of variable names
defined for the application context declared by CFAPPLICATION, if any. The standard
system-provided client variables (CFID, CFToken, URLToken, HitCount, TimeCreated,
and LastVisit) are not returned in the list.

Deleting client variables

Unlike normal variables, client variables and their values persist over time. (In this
fashion they are akin to cookies.) To delete a client variable, use the
DeleteClientVariable function. For example:
<CFSET IsDeleteSuccessful=DeleteClientVariable("MyClientVariable")>
The DeleteClientVariable function operates only on variables within the scope
declared by CFAPPLICATION, if any. See the CFML Language Reference for more
information on this function.
Also, through the Variables page of the ColdFusion Administrator, you can edit the
client variable storage to remove client variables after a set number of days. (The
default value is 90 days when client variables are stored in the registry, ten days when
stored in a data source.)
See Administering ColdFusion Server for more information about setting time-out
values.
Note
Client variables with CFLOCATION behavior
When using CFLOCATION to redirect to a path that contains .DBM or .CFM, the
Client.URLToken is automatically appended to the URL. This behavior can be
suppressed by adding the attribute ADDTOKEN="No" to the CFLOCATION tag.
In ColdFusion, client state management is explicitly designed to work
with cookies, the standard tool for identifying clients. Using client state
management without cookies requires careful programming to ensure
that the URLToken is always passed between application pages.
The system-provided client variables (CFID, CFToken, URLToken,
HitCount, TimeCreated, and LastVisit) cannot be deleted.
Developing Web Applications with ColdFusion

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents