When to Use Application Variables

Generally, you can use application variables whenever you need a variable to be shared among all pages and all visitors to your application. The variable is kept in ColdFusion’s memory, and any page in your application can access or change its value. If some code on one of your pages changes the value of an application variable, the next hit to any of your application’s pages will reflect the new value.

Note

This means you should not use application variables if you want a separate copy of the variable to exist for each visitor to your site. In other words, application variables shouldn’t be used for anything personalized, because they don’t distinguish between your site’s visitors.

Chapter 20 explains how ...

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.