Remembering Settings


One way to make your application more helpful is to have it remember certain settings or actions as users interact with it. For instance, in Chapter 20, ColdFusion's Client Management feature was used to remember the words the user searched for last. When the user later returns to the search page, their most recent search phrase is already filled in. This improves their experience by saving time and making them feel at home.

Remembering User Names and Passwords

If your application requires visitors to log in by providing a user name and password, consider adding some type of "remember me" option on the login form. This would cause the user name to be prefilled when they next log in. You can use the same basic technique used in the SearchForm1.cfm and SearchForm2.cfm templates from Chapter 20. Instead of using the CLIENT scope to remember the last search phrase, use it to remember and prefill the user name.

Of course, this makes your application less secure, because anyone with physical access to the machine could see the person's user name. Do whatever makes sense for your application.

Other Helpful Settings to Remember

Many other things can be remembered between visits to save the user time and make them feel more at home:

  • If the user has indicated which country they live in, you could show them content relevant to their country each time they return to your site, perhaps even translated into the appropriate language.

  • If the user has a favorite color, you could store the color in the CLIENT scope and use it to set the bgcolor for the <body> tags at the top of each page.

Avoid the "Big Brother" Effect

Once you start thinking about remembering settings for users, it becomes clear that you probably could retain information on just about everything they do, on which pages, and when. However, if your application begins to flaunt its knowledge of users' actions, you may start to lose their trust. People enjoy having sites personalized for them, but no one likes to feel as if their every move is being watched and recorded. Also, be sure you aren't violating your client or company's privacy policy.



Macromedia Coldfusion MX 7 Web Application Construction Kit
Macromedia Coldfusion MX 7 Web Application Construction Kit
ISBN: 321223675
EAN: N/A
Year: 2006
Pages: 282

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net