Yikes! The key differences between client and session variables are:
session variables must be locked, or have automatic locking set. client variables can be stored in a database, allowing much better scalability with your apps. client variables can only store "simple" datatypes. And yes, client variables DO "time out". Bottom line: session variables suck. I hate them. They are the bane of CF. I hate how people put gigantic structures in session variables and then use them like simple variables. I hate how people forget to lock session variables. I hate how people don't know when to use type="exclusive" vs. type="readonly". I hate all the workarounds so that you don't have to lock session vars (talk about doing extra work to be lazy). I hate how they make deployment of scalable apps a huge headache. Session variables. Just say no. -----Original Message----- From: Kinley Pon [mailto:[EMAIL PROTECTED]] Sent: November 14, 2001 5:38 PM To: CF-Talk Subject: Re: Session and Client Variables sounds about right! - Kinley >From: "Gyrus" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: Re: Session and Client Variables >Date: Wed, 14 Nov 2001 18:26:41 -0000 > > > Hi Folks, i'm prepping for the cf exam and i'm lacking a good >understanding > > of the difference between client and session variables. It seems that >they > > both are capable of doing the same thing. When and why should/would i >use > > one or the other? What apps have you used client vars for and not >session > > vars for and visa versa and why? Thanks for any help. > >As I understand it, the key difference is that session variables >timeout. Client variables are tied to a specific client, session variables >are tied to a specific client *and last for a specific period of time after >the last request from that client to a specific application*. This >timeout period is controlled in CF Admin, or in the CFAPPLICATION >tag in application.cfm. > >I use session variables mostly for password-protected areas (usually >backend CMS's) that need the finite login time for security reasons. >I never really used client variables. I suppose I could provide the >option to "remember me next time" when users login, and this is a >good example of the difference I suppose: > >- Normal login = session variables, and if you leave the app for >20 mins (or whatever), you will have to login again. > >- "Remember me" login = client variables, and as long as the connected >cookies remain on the client, you won't have to login to get into >the app. > >hth, > >- Gyrus > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

