# Managing Client Variables

ColdFusion includes a number of options designed to give you a great deal of flexibility in managing client variables. Client variables in ColdFusion give you the ability to determine the identity of a client visiting your site. Identifying clients and customizing page content for users requires the ability to manage client state.

ColdFusion allows the following ways of managing client variables:

- Using the system Registry to store client variables
- Using browser cookies
- Using an external data source of your choice

## Planning client state management

The method you choose to store client variables will depend on a number of factors. Among the most important factors is whether your site is currently using, or will be using server clustering to provide load balancing and fail-over support. In addition, there are a number of other factors to consider:

Client Variable Storage
Storage Type | Advantages | Disadvantages
--- | --- | ---
System registry | Simple implementation Good performance Registry can be exported easily to other systems Server-side control | Need to be aware of the registry's maximum size limit as defined in the System Control Panel (Windows NT only) Tied to the host system: Not practical for clustered servers or a round-robin DNS configuration
Browser cookies | Simple implementation Good performance Can be set to automatically expire Client-side control | Users can configure browsers to disallow cookies ColdFusion limits individual cookie data to 4 KB Netscape Navigator allows only 20 cookies from any one host; ColdFusion uses three cookies to store read-only data, leaving only 17 additional cookies available for use
External repository | Can use existing data source Portability: Not tied to a single server OS portability in a mixed environment | Requires database transaction to read/write variables Somewhat more involved to implement

### Increasing maximum registry size (Windows NT)

Windows NT notifies you if your registry data is approaching the limit defined for registry size in the System Properties dialog. If you receive this message, you can open the System Properties dialog and increase the size of your system registry.

| To increase maximum registry size:

1. Open the System Control Panel and click the Performance tab.
2. In the Virtual Memory group box, click the Change button to open the Virtual Memory dialog.

3. At the bottom of the dialog, the current registry size is reported. Specify a new maximum registry size in MB.

### Checking registry size (UNIX)

Unlike Windows NT, ColdFusion for UNIX does not impose limits on the size of the registry. However, it's still a good idea to be aware of the size of your registry. Registry data is stored in the following file:

    <installdir>/coldfusion/.windu.hostname/windu_reg.dat