CFAPPLICATION

Defines scoping for a ColdFusion application, enables or disables storing client variables, and specifies a client variable storage mechanism. By default, client variables are disabled. Also, used to enable session variables and to set timeouts for both session and application variables. Session and application variables are stored in memory.

Syntax

<CFAPPLICATION NAME="Name"
    CLIENTMANAGEMENT="Yes/No"
    CLIENTSTORAGE="Storage Type"
    SETCLIENTCOOKIES="Yes/No" >

NAME

The name you want to give your application. This name can be up to 64 characters long. Required for application and session variables to work. Optional for client variables.

CLIENTMANAGEMENT

Optional. Yes or No. Enables client variables. Default is No.

CLIENTSTORAGE

Optional. Specifies the mechanism for storing client variables:

SETCLIENTCOOKIES

Optional. Yes or No. Yes enables client cookies. Default is Yes.

If you set this attribute to "NO", ColdFusion does not automatically send the CFID and CFTOKEN cookies to the client browser; you must manually code CFID and CFTOKEN on the URL for every page that uses Session or Client variables.

Usage

CFAPPLICATION is typically used in the Application.cfm file to set defaults for a specific ColdFusion application.

Example

<!-------------------------------------------------------------
    This example shows how to enable client variables by using the
    CFAPPLICATION tag.
--------------------------------------------------------------->
    <HTML>
    <HEAD>
        <title>Enabling Client Variables</title>
    </HEAD>
    
    <BASEFONT FACE="Arial, Helvetica" SIZE=2>
    <BODY  bgcolor="#FFFFD5">
    
    <H3>CFAPPLICATION Example</H3>
    
    <P>CFAPPLICATION defines scoping for a ColdFusion application and 
    enables or disables the storing of client variables. This tag is 
    placed in a special file called Application.cfm that is run before
    any other CF template in a directory where the Application.cfm file
    appears.
    
    <CFAPPLICATION NAME="ETurtle" CLIENTMANAGEMENT="yes"
    SETCLIENTCOOKIES="yes">
<!--- End of Application.cfm --->