User Guide

Table Of Contents
Configuring and using client variables 351
Deleting client variables
To delete a client variable, use the
StructDelete function or the DeleteClientVariable
function. For example, the following lines are equivalent:
<cfset IsDeleteSuccessful=DeleteClientVariable("MyClientVariable")>
<cfset IsDeleteSuccessful=StructDelete(Client, "MyClientVariable")>
The Client Variables page in the ColdFusion MX Administrator lets you set a time-out period of
inactivity after which ColdFusion removes client variables stored in either the Registry or a data
source. (The default value is 10 days for client variables stored in the Registry, and 90 days for
client variables stored in a data source.)
Note: You cannot delete the system-provided client variables (CFID, CFToken, URLToken, HitCount,
TimeCreated, and LastVisit).
Using client variables with cflocation
If you use the
cflocation tag to redirect ColdFusion to a path that ends with .dbm or .cfm, the
Client.URLToken variable is automatically appended to the URL. You can prevent this behavior
by adding the attribute
addtoken="No" to the cflocation tag.
Caching client variable
When ColdFusion reads or writes client variables, it caches the variables in memory to help
decrease the overhead of accessing the client data. As a result, ColdFusion only accesses the client
data store when you read its value for the first time or, for values you set, when the request ends.
Additional references to the client variable use the cached value in ColdFusion memory, thereby
processing the page more quickly.
Exporting the client variable database
If your client variable database is stored in the Windows system Registry and you need to move it
to another machine, you can export the Registry key that stores your client variables and take it to
your new server. The system Registry lets you export and import Registry entries.
To export your client variable database from the Registry in Windows:
1.
Open the Registry editor.
2.
Find and select the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\
Clients
3.
On the Registry menu, click Export Registry File.
4.
Enter a name for the Registry file.
After you create a Registry file, you can copy it to a new machine and import it by clicking
Import Registry File on the Registry editor Registry menu.
Note: On UNIX systems, the registry entries are kept in /opt/coldfusion/registry/cf.registry, a text file
that you can copy and edit directly.