How Do Client Variables Work?

Client variables work like this:

  1. The first time a particular user visits your site, ColdFusion generates a unique ID number to identify the user’s browser.

  2. ColdFusion sets this ID number as a cookie called CFID on the user’s browser. From that point on, the browser identifies itself to ColdFusion by presenting this ID.

  3. When you set a client variable in your code, ColdFusion stores the value for you on the server side, without sending anything to the browser machine. It stores the CFID number along with the variable, to keep them associated internally.

  4. Later, when you access or output the variable, ColdFusion simply retrieves the value based on the variable name and the CFID number.

For the most part, this process is ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.