Maintaining State

Jen deHaan, Peter deHaan, Simon Horwith, Curtis Hermann, Massimo Foti, Eduardo Zubler · Apress eBooks · 2004

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. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik