You use the
Client.CFID
supports browsers that do not allow cookies. For more information on supporting browsers that
do not allow cookies, see
You can use the
Client.HitCount
depends on how often users visit your site and when they last visited. For example, the following
code shows the date of a user's last visit to your site:
<cfoutput>
Welcome back to the Web SuperShop. Your last
visit was on #DateFormat(Client.LastVisit)#.
</cfoutput>
Getting a list of client variables
To obtain a list of the custom client parameters associated with a particular client, use the
GetClientVariablesList
<cfoutput>#GetClientVariablesList()#</cfoutput>
The
GetClientVariablesList
client variables for the current application. The standard system-provided client variables (
,
,
CFToken
URLToken
HitCount
Deleting client variables
To delete a client variable, use the
function. For example, the following lines are equivalent:
<cfset IsDeleteSuccessful=DeleteClientVariable("MyClientVariable")>
<cfset IsDeleteSuccessful=StructDelete(Client, "MyClientVariable")>
The Client Variables page of 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 (
, and
TimeCreated
LastVisit
Using client variables with cflocation
If you use the
cflocation
variable is automatically appended to the URL. You can prevent this behavior
Client.URLToken
by adding the attribute
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.
,
, and
Client.CFToken
"Using client and session variables without cookies" on page
and time information variables to customize behavior that
function, as follows:
function returns a comma-separated list of the names of the
,
TimeCreated
StructDelete
).
tag to redirect ColdFusion to a path that ends with .dbm or .cfm, the
to the
addtoken="No"
Client.URLToken
, and
) are not returned in the list.
LastVisit
function or the
DeleteClientVariable
,
CFID
CFToken
tag.
cflocation
Configuring and using client variables
variables if your application
319.
CFID
,
,
URLToken
HitCount
,
,
325
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers