As we have discussed before, one of the main problems with the Web is that it is “stateless.” The web server doesn’t have a concept of who a user is and what the user is doing; it simply accepts an incoming request and returns the parsed information. Most variable scopes within ColdFusion are destroyed after the template has finished being processed. The point of persistent variables is to allow you to create a variable once and have that variable persist (not be destroyed) for a specified duration. One benefit of this is the ability to uniquely identify visitors to your web site. Performance is the other benefit; performance improves because variables do not have to be recreated on each request or even for each visitor to the site. In this chapter we focus primarily on the former benefit: the ability to track users on your site and to associate values with a user.
KeywordsRace Condition Content Management System Application Scope Application Variable Session Management
Unable to display preview. Download preview PDF.