MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 245

Table of Contents

Advertisement

Configuring and Using Client Variables
The following example shows how to use the
of a client parameter and to set a default value if the parameter does not already
exist:
<cfparam name="Client.FavoriteColor" default="Red">
Accessing and changing Client variables
You use the same syntax to access a Client variable as other types of variables. You
can use Client variables anywhere other ColdFusion variables are used.
To display the favorite color that has been set for a specific user, use the following
code:
<cfoutput>
</cfoutput>
Standard Client variables
The Client scope has six built-in, read-only variables that your application can use:
Variable
Client.CFID
Client.CFToken
Client.URLToken
Client.HitCount
Client.LastVisit
Client.TimeCreated
You can use the
behavior, depending 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>
</cfoutput>
Your favorite color is #Client.FavoriteColor#.
Description
The client ID, normally stored on the client system as a
cookie.
The client security token, normally stored on the client system
as a cookie.
A combination of the CFID and CFToken in the form
CFID=IDNum&CFTOKEN=tokenNum
client does not support cookies and you must pass the
and
The number of page requests made by the client.
The last time the client visited the application.
The time the
client to ColdFusion were first created.
Client.HitCount
Welcome back to the Web SuperShop. Your last
visit was on #DateFormat(Client.LastVisit)#.
cfparam
variables from page to page.
CFToken
and
CFID
CFToken
and time information variables in customizing
tag to check for the existence
. This variable is useful if the
variables that identify the
225
CFID

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents