Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 312

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
• The support for session cookies to be
• For Tomcat/JBoss,
httpOnly
• On JRun, add the system property, Dcoldfusion.sessioncookie.httponly=true , in the jvm.config file
• For other application servers, see the relevant documentation for details on
cookies.
Configuring and using client variables
Use client variables for data that is associated with a particular client and application and that must be saved between
user sessions. Use client variables for long-term information such as user display or content preferences.
Enabling client variables
To enable client variables, you specify This.clientmanagement="True" in the Application.cfc initialization code, or set
the
tag
cfapplication
clientmanagement
variables in an application named SearchApp, you can use the following line in the application's Application.cfm page:
<cfapplication NAME="SearchApp" clientmanagement="Yes">
Choosing a client variable storage method
By default, ColdFusion stores client variables in the Registry. In most cases, however, it is more appropriate to store
the information as client cookies or in a SQL database.
The ColdFusion Administrator Client Variables page controls the default client variable location. You can override the
default location by specifying a This.clientStorage value in Application.cfc or by setting the
in the
tag.
cfapplication
You can specify the following values for the client storage method:
(default). Client variables are stored under the key HKEY_LOCAL_MACHINE\
Registry
SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients.
• Name of a data source configured in ColdFusion Administrator
Cookie
Generally, it is most efficient to store client variables in a database. Although the Registry option is the default, the
Registry has significant limitations for client data storage. The Registry cannot be used in clustered systems and its use
for client variables on UNIX is not supported in ColdFusion.
Using cookie storage
When you set the client storage method to Cookie, the cookie that ColdFusion creates has the application's name.
Storing client data in a cookie is scalable to large numbers of clients, but this storage mechanism has some limitations.
In particular, if the client turns off cookies in the browser, client variables do not work.
Consider the following additional limitations before implementing cookie storage for client variables:
• Any Client variable that you set after a
saved.
• Some browsers allow only 20 cookies to be set from a particular host. ColdFusion uses two of these cookies for the
and
identifiers, and also creates a cookie named
CFID
CFToken
as
,
HitCount
TimeCreated
depends on the application server you use:
httpOnly
is not supported for JSESSIONID
attribute to Yes in the Application.cfm file. For example, to enable client
tag is not sent to the browser, so the variable value does not get
cfflush
, and
. This limits you to 17 unique applications per client-host pair.
LastVisit
Last updated 1/20/2012
support for session
httpOnly
clientStorage
to hold global data about the client, such
cfglobals
307
attribute

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents