User Guide

Table Of Contents
66 Chapter 3: Using ColdFusion Variables
Caution: To prevent data corruption, you lock code that uses Session, Application, or Server scope
variables. For more information, see Chapter 15, “Using Persistent Data and Locking,” on page 339.
Cookie Contains variables maintained in a user’s browser as cookies. Cookies are typically
stored in a file on the browser, so they are available across browser sessions and
applications. You can create memory-only Cookie variables, which are not available
after the user closes the browser. Cookie scope variable names can include periods.
Client Contains variables that are associated with one client. Client variables let you
maintain state as a user moves from page to page in an application, and are available
across browser sessions. By default, Client variables are stored in the system
registry, but you can store them in a cookie or a database. Client variables cannot be
complex data types and can include periods in their names. For more information,
see Chapter 15, “Using Persistent Data and Locking,” on page 339.
Session Contains variables that are associated with one client and persist only as long as the
client maintains a session. They are stored in the server’s memory and can be set to
time out after a period of inactivity. For more information, see Chapter 15, “Using
Persistent Data and Locking,” on page 339.
Application Contains variables that are associated with one, named application on a server. The
cfapplication tag name attribute or the Application.cfc This.name variable setting
specifies the application name. For more information, see Chapter 15, “Using
Persistent Data and Locking,” on page 339.
Server Contains variables that are associated with the current ColdFusion server. This
scope lets you define variables that are available to all your ColdFusion pages,
across multiple applications. For more information, see Chapter 15, “Using
Persistent Data and Locking,” on page 339.
Flash Variables sent by a Macromedia Flash movie to ColdFusion and returned by
ColdFusion to the movie. For more information, see Chapter 33, “Using the Flash
Remoting Service,” on page 807.
Arguments Variables passed in a call to a user-defined function or ColdFusion component
method. For more information, see “About the Arguments scope” on page 181.
This Exists only in ColdFusion components or
cffunction tags that are part of a
containing object such as a ColdFusion Struct. Exists for the duration of the
component instance or containing object. Data in the This scope is accessible from
outside the component or container by using the instance or object name as a prefix.
function local Contains variables that are declared inside a user-defined function or ColdFusion
component method and exist only while a function executes. For more information,
see Chapter 9, “Writing and Calling User-Defined Functions,” on page 171.
Scope Description