MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 322

Developing coldfusion mx applications
Table of Contents

Advertisement

The ColdFusion MX Administrator Client Variables page controls the default client variable
location. You can override the default location by specifying a
cfapplication
You can specify the following values in the
(default)
Registry
Name of a data source configured in ColdFusion MX 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 MX.
Using cookie storage
When you set the
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
value does not get saved.
Some browsers allow only 20 cookies to be set from a particular host. ColdFusion uses two of
these cookies for the
to hold global data about the client, such as
limits you to 17 unique applications per client-host pair.
Some browsers set a size limit of 4K bytes per cookie. ColdFusion encodes nonalphanumeric
data in cookies with a URL encoding scheme that expands at a 3-1 ratio, which means you
should not store large amounts of data per client. ColdFusion throws an error if you try to
store more than 4,000 encoded bytes of data for a client.
Configuring database storage
When you specify a database for client variable storage, do not always have to manually create the
data tables that store the client variables.
If ColdFusion can identify that the database you are using supports SQL creation of database
tables, you only need to create the database in advance. When you click the Add button on the
Select Data Source to Add as Client Store box on the Memory Variables page, the Administrator
displays a Add/Edit Client Store page which contains a Create Client Database Tables selection
box. Select this option to have ColdFusion create the necessary tables in your database. (The
option does not appear if the database already has the required tables.)
If your database does not support SQL creation of tables, or if you are using the ODBC socket
[Macromedia] driver to access your database, you must use your database tool to create the client
variable tables. Create the CDATA and CGLOBAL tables.
322
Chapter 15: Using Persistent Data and Locking
tag.
tag
cfapplication
and
CFID
CFToken
attribute:
clientStorage
clientstorage="Cookie"
tag is not sent to the browser, so the variable
cfflush
identifiers, and also creates a cookie named
,
HitCount
TimeCreated
attribute in the
clientStorage
attribute, the cookie that
, and
LastVisit
cfglobals
. This

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Coldfusion mx

Table of Contents