Re: Client Session variables?

2000-09-30 Thread Bud

--_-1241802732==_ma
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

On 9/29/00, W Luke penned:
   Use client variables, written to a database, whenever possible.

Is there any documentation about writing client variables to a database?  Or
do you have any "starter for tens"?!

What kind of documentation? CF will create the necessary tables if 
you just give it an empty database. The tables and columns it creates 
are, in Access, I can't remember off the top of my head what the 
matching data types are in SQL:

CDATA
cfid (text, 20 characters, no index)
app (text, 64 characters, indexed, duplicates OK)
data (memo)
CGLOBAL
cfid (text, 20 characters, indexed, duplicates OK)
data (memo)
lvisit (date/time, indexed, duplicates OK)

The biggest difference in the setup is, if you have complex objects 
other than simple strings you have to serialize them into WDDX 
packets. Then deserialize them into a local variable.

I do it like this:

To create the initial variable if it hasn't been created (my shopping 
cart for example, this will probably wrap bad):

cfif not isDefined("client.basket")
cfset variables.basket = queryNew("SearchRow, NewProduct_ID, 
Product_ID, Product_Name, Quantity, Size, Style, Color, Order_Date, 
Price_Per_Unit, Weight, Backordered, OptionTo")
CFWDDX INPUT="#variables.basket#" OUTPUT="MyBasket" ACTION="CFML2WDDX"
cfset client.basket = MyBasket
cfelse
CFWDDX INPUT="#client.basket#" OUTPUT="variables.basket" ACTION="WDDX2CFML"
/cfif

Then when adding something to the basket, whereas with sessions I 
would just create a new basket called newbasket then set that to 
session.basket, it's a tad more complex:

!--- set the basket to the new values ---
CFWDDX INPUT="#newbasket#" OUTPUT="MyBasket" ACTION="CFML2WDDX"
cfset client.basket = MyBasket
CFWDDX INPUT="#client.basket#" OUTPUT="variables.basket" ACTION="WDDX2CFML"

But well worth it. Clustered server ready and NO CFLOCKS! YIPEEE!

Then I can just cfoutput or loop on variables.basket and access the 
different items with variables.basket.product_id, etc. instead of 
session.basket.etc

Oh, and if you want to give it a timeout, you can't just do it like 
sessiontimeout=. You have to create a start time, then update it at 
every click and delete the client variables if it's past the allotted 
timeout (30 minutes in the example below). I do it like this:

CFIF not isDefined('client.initialize_session')
cfset client.initialize_session = now()
cfelse
cfset app_timeout = now() - createtimespan(0,0,30,0)
 CFIF client.initialize_session GTE app_timeout
 cfset client.initialize_session = now()
 CFELSE
 cfset clientlist = GetClientVariablesList()
 cfloop index="i" list="#clientlist#"
cfset temp = DeleteClientVariable('#i#')
 /cfloop
 cfset client.initialize_session = now()
 /CFIF
/CFIF
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--_-1241802732==_ma
Content-Type: text/html; charset="us-ascii"

!doctype html public "-//W3C//DTD W3 HTML//EN"
htmlheadstyle type="text/css"!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
 --/styletitleRe: Client amp; Session
variables?/title/headbody
divOn 9/29/00, W Luke penned:/div
blockquote type="cite" citegt; Use client variables, written to a
database, whenever possible.br
br
Is there any documentation about writing client variables to a
database?nbsp; Or/blockquote
blockquote type="cite" citedo you have any quot;starter for
tensquot;?!/blockquote
divbr/div
divWhat kind of documentation? CF will create the necessary tables
if you just give it an empty database. The tables and columns it
creates are, in Access, I can't remember off the top of my head what
the matching data types are in SQL:/div
divbr/div
divCDATA/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tabcfid
(text, 20 characters, no index)/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tabapp
(text, 64 characters, indexed, duplicates OK)/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tabdata
(memo)/div
divCGLOBAL/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tabcfid
(text, 20 characters, indexed, duplicates OK)/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tabdata
(memo)/div
divx-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /x-tablvisit
(date/time, indexed, duplicates OK)/div
divbr/div
divThe biggest difference in the setup is, if you have complex
objects other than simple strings you have to serialize them into
WDDX packets. Then deserialize them into a local variable./div
divbr/div
divI do it like this:/div
divbr/div
divTo create the initial variable if it hasn't been created (my
shopping cart for example, this will probably wrap bad):/div
divbr/div
divfont size="-2"lt;cfif not
isDefined(quot;client.basketquot;)gt;br

Re: Client Session variables?

2000-09-30 Thread paul smith

Detailed docs on setting up client vars in a DB and more are here:

http://www.advantex.net/ColdFusion/CFClusteringDoc.htm

best,  paul

At 09:15 AM 9/30/00 -0400, you wrote:
On 9/29/00, W Luke penned:
Use client variables, written to a database, whenever possible.
 
 Is there any documentation about writing client variables to a database?  Or
 do you have any "starter for tens"?!

What kind of documentation? CF will create the necessary tables if
you just give it an empty database. The tables and columns it creates
are, in Access, I can't remember off the top of my head what the
matching data types are in SQL:

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread Bud

On 9/30/00, paul smith penned:
Detailed docs on setting up client vars in a DB and more are here:

http://www.advantex.net/ColdFusion/CFClusteringDoc.htm

Good article, but it doesn't impress the point that session variables 
must be locked. Which is why I switched to client variables. The fact 
that the application becomes clusterable is simply a nice side-effect 
for me. :)

I do like the idea of adding the timeout query as a stored procedure.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread paul smith

Yeah, it was written in March before CFLOCKing exploded around here ;-)

best,  paul

At 12:52 PM 9/30/00 -0400, you wrote:
Good article, but it doesn't impress the point that session variables
must be locked.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread W Luke

Thanks for that Paul.

Now as a complete beginner with Session Management (never had to use it).
I've followed instructions on the site below, and it's working fine afaik.
But how about implementing it straight into a site?

For example on one of my sites I have a Members section which they can
personalise - they login in using their username and password...

 cfif NOT #login.recordcount# IS 0

So if the user and pass is OK, the rest of the page is displayed.  What I'd
like to do is after successful validation, use client vars in a DB so that
they will be logged in automatically next time.

How should I do this?

Thanks

Will


- Original Message -
From: "paul smith" [EMAIL PROTECTED]
Newsgroups: cf-talk
Sent: Saturday, September 30, 2000 4:36 PM
Subject: Re: Client  Session variables?


 Detailed docs on setting up client vars in a DB and more are here:

 http://www.advantex.net/ColdFusion/CFClusteringDoc.htm

 best,  paul

 At 09:15 AM 9/30/00 -0400, you wrote:
 On 9/29/00, W Luke penned:
 Use client variables, written to a database, whenever possible.
  
  Is there any documentation about writing client variables to a
database?  Or
  do you have any "starter for tens"?!
 
 What kind of documentation? CF will create the necessary tables if
 you just give it an empty database. The tables and columns it creates
 are, in Access, I can't remember off the top of my head what the
 matching data types are in SQL:

 --

 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread paul smith

I just noticed the URLed article contains the following:


Personally, I require cookies on all of my sites, and I then provide 
adequate security and cookie information to the users who are refusing or 
unable to accept cookies so they know why we require them.  I prefer 
setting CFID and CFTOKEN to a "session-only" cookie so that the session is 
destroyed when the user closes their browser:

CFCOOKIE NAME="CFID" VALUE="#CFID#"
CFCOOKIE NAME="CFTOKEN" VALUE="#CFTOKEN#"

I then detect whether the user is able/willing to accept cookies, and 
redirect them to an information page if they are not, using some 
permutation of:
===

I did some testing recently, and found if the browser was set to NOT accept 
cookies, that the above session-only/browser-only cookies were accepted.

Did I screw up in my test?

best,  paul

At 12:52 PM 9/30/00 -0400, you wrote:
On 9/30/00, paul smith penned:
 Detailed docs on setting up client vars in a DB and more are here:
 
 http://www.advantex.net/ColdFusion/CFClusteringDoc.htm

Good article, but it doesn't impress the point that session variables
must be locked. Which is why I switched to client variables. The fact
that the application becomes clusterable is simply a nice side-effect
for me. :)

I do like the idea of adding the timeout query as a stored procedure.
--

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or 
send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: [Re: Client Session variables?]

2000-09-30 Thread JL

Good articles.  But it's almost the same as the one in Cold Fusion Journal. 
I'm not sure which one was written first.

Also, some of the query will not work in this article.  For instance, those
ideas about checking client.LastVisit are wrong.  Also, you need to do
something to the User on the login page.  Otherwise those two tables in CVR DB
are wrong.


[EMAIL PROTECTED] (paul smith) wrote:
 Detailed docs on setting up client vars in a DB and more are here:
 
 http://www.advantex.net/ColdFusion/CFClusteringDoc.htm
 
 best,  paul
 
 At 09:15 AM 9/30/00 -0400, you wrote:
 On 9/29/00, W Luke penned:
 Use client variables, written to a database, whenever possible.
  
  Is there any documentation about writing client variables to a database? 
Or
  do you have any "starter for tens"?!
 
 What kind of documentation? CF will create the necessary tables if
 you just give it an empty database. The tables and columns it creates
 are, in Access, I can't remember off the top of my head what the
 matching data types are in SQL:
 

--
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.



Get free email and a permanent address at http://www.netaddress.com/?N=1
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread Bud

--_-1241783480==_ma
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

On 9/30/00, W Luke penned:
For example on one of my sites I have a Members section which they can
personalise - they login in using their username and password...

  cfif NOT #login.recordcount# IS 0

So if the user and pass is OK, the rest of the page is displayed.  What I'd
like to do is after successful validation, use client vars in a DB so that
they will be logged in automatically next time.

How should I do this?

The problem with this, client variables can be set to be purged from 
the database after a set period, so unless you have your own server, 
you're at the mercy of the host. I believe the default is 10 days. I 
have my server set to expunge after one day because that's all I need 
for any app on my server. Now if someone requested I keep them 
longer, I may give them a week, but not much more than that because 
then the database just gets larger and larger. And I don't think 
there's any guarantee that the person will have the same cfid and 
cftoken generated by their browser (still a little confused by that 
one) if they've shut it down and come back a few days later.

I use cookies. Then they can click a checkbox if they want their 
password to be stored. Then you check like this (just an example from 
one of my apps):

cfif not isdefined('client.mem_id')cfset client.mem_id = ""/cfif

cfif (isDefined('cookie.member_id') and
isdefined('cookie.member_password') and
client.mem_id is "") or (isdefined('form.member_id') and
(isdefined('form.member_password'))

cfif isdefined('form.member_password')
cfset variables.member_password = form.member_password
cfelse
cfset variables.member_password = cookie.member_password
/cfif

cfif isdefined('form.member_id')
cfset variables.member_id = form.member_id
cfelse
cfset variables.member_id = cookie.member_id
/cfif

CFQUERY DATASOURCE="#request.DSN#" NAME="Get_ID"
SELECT Cust_ID,Cust_FirstName
FROM Customers
WHERE Cust_ID = '#variables.member_id#' and password = 
'#variables.member_password#'
/CFQUERY

cfif Get_ID.recordcount is "1"
cfset client.mem_id = Get_ID.Cust_ID
Welcome Back cfoutput#Get_Id.Cust_FirstName#/cfouput!p
cfelse
cfset badlogin = 1
/cfif

/cfif

cfif client.mem_id is ""
cfif isdefined('badlogin')Login Failedbr/cfif
Show Login Form/cfif

Then as long as client.mem_id is not "" then they are logged in.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--_-1241783480==_ma
Content-Type: text/html; charset="us-ascii"

!doctype html public "-//W3C//DTD W3 HTML//EN"
htmlheadstyle type="text/css"!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
 --/styletitleRe: Client amp; Session
variables?/title/headbody
divOn 9/30/00, W Luke penned:/div
blockquote type="cite" citeFor example on one of my sites I have a
Members section which they canbr
personalise - they login in using their username and password...br
br
nbsp;lt;cfif NOT #login.recordcount# IS 0gt;br
br
So if the user and pass is OK, the rest of the page is
displayed.nbsp; What I'dbr
like to do is after successful validation, use client vars in a DB so
thatbr
they will be logged in automatically next time.br
/blockquote
blockquote type="cite" citeHow should I do this?/blockquote
divbr/div
divThe problem with this, client variables can be set to be purged
from the database after a set period, so unless you have your own
server, you're at the mercy of the host. I believe the default is 10
days. I have my server set to expunge after one day because that's
all I need for any app on my server. Now if someone requested I keep
them longer, I may give them a week, but not much more than that
because then the database just gets larger and larger. And I don't
think there's any guarantee that the person will have the same cfid
and cftoken generated by their browser (still a little confused by
that one) if they've shut it down and come back a few days
later./div
divbr/div
divI use cookies. Then they can click a checkbox if they want their
password to be stored. Then you check like this (just an example from
one of my apps):/div
divbr/div
divfont size="-1"lt;cfif not
isdefined('client.mem_id')gt;lt;cfset client.mem_id =
quot;quot;gt;lt;/cfifgt;/font/div
divbr/div
divfont size="-1"lt;cfif (isDefined('cookie.member_id')
and/font/div
divfont size="-1"isdefined('cookie.member_password')
and/font/div
divfont size="-1"client.mem_id is quot;quot;) or
(isdefined('form.member_id') and/font/div
divfont
size="-1"(isdefined('form.member_password'))gt;/font/div
divfont size="-1"br/font/div
divfont size="-1"lt;cfif
isdefined('form.member_password')gt;/font/div
divfont size="-1"lt;cfset variables.member_password =
form.member_passwordgt;/font/div
divfont size="-1"lt;cfelsegt;/font/div
divfont size="-1"lt;cfset variables.member_password 

Re: Client Session variables?

2000-09-30 Thread W Luke


 The problem with this, client variables can be set to be purged from
 the database after a set period, so unless you have your own server,
 you're at the mercy of the host.

Am I right in saying that using the database as the Client Storage method,
if the user doesn't have Cookies enabled it will still work? (i.e. pull
client's token from database, and client. variables).  Or am I way off the
mark?

I believe the default is 10 days. I
 have my server set to expunge after one day because that's all I need
 for any app on my server. Now if someone requested I keep them
 longer

But why would you need to allow them to keep them longer?  If you set a
reasonably satisfactory limit (7 days seems fine to me), then the database
doesn't clog up, and 7 days is long enough.

 I use cookies. Then they can click a checkbox if they want their
 password to be stored. Then you check like this (just an example from
 one of my apps):

Could the same not be done with Database Client Storage means?  To me it
seems the best way - I don't have any figures on Cookie usage at hand
(anyone?) but some people are scared of the cookie monster, even nowadays.

Will

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread Bud

On 9/30/00, W Luke penned:
Am I right in saying that using the database as the Client Storage method,
if the user doesn't have Cookies enabled it will still work? (i.e. pull
client's token from database, and client. variables).  Or am I way off the
mark?

As long as you pass cfid and cftoken in every link, just like with 
session variables. :)

  I believe the default is 10 days. I
  have my server set to expunge after one day because that's all I need
  for any app on my server. Now if someone requested I keep them
  longer

But why would you need to allow them to keep them longer?  If you set a
reasonably satisfactory limit (7 days seems fine to me), then the database
doesn't clog up, and 7 days is long enough.

Sure, but like I said. You are at the mercy of the host if it's not 
your machine. I have mine set to die in one day.

   I use cookies. Then they can click a checkbox if they want their
  password to be stored. Then you check like this (just an example from
  one of my apps):

Could the same not be done with Database Client Storage means?  To me it
seems the best way - I don't have any figures on Cookie usage at hand
(anyone?) but some people are scared of the cookie monster, even nowadays.

If they don't have cookies enabled, then I believe a new cfid and 
cftoken will be created on every click since CF won't know that it's 
the same person clicking. Even if you pass cfid and cftoken, it's 
only going to be good until they leave the site. Next visit they will 
be given a NEW cfid and cftoken.

So to summarize, as long as they have cookies enabled and come back 
before the client variables are deleted from the database, then yes, 
your method will work. If they don't have cookies enabled or come 
back after the data is purged, it won't.


-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread paul smith

Right.  New cfid/cftoken every click (in IE).

However, if the user selects the following in Netscrape:

"Accept only cookies that get sent back to the originating server"

Then state is maintained from one click to the next (and I assume no cookie 
is set on the users machine).

best,  paul

At 05:46 PM 9/30/00 -0400, you wrote:
If they don't have cookies enabled, then I believe a new cfid and
cftoken will be created on every click since CF won't know that it's
the same person clicking. Even if you pass cfid and cftoken, it's
only going to be good until they leave the site. Next visit they will
be given a NEW cfid and cftoken.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread paul smith

I just noticed that a comma-delimited List of numerals can be stored as a 
Client variable in a database without having to be 
WDDX-serialized.  Cool.  This saves some processing overhead.

best,  paul

At 09:15 AM 9/30/00 -0400, you wrote:
The biggest difference in the setup is, if you have complex objects
other than simple strings you have to serialize them into WDDX
packets. Then deserialize them into a local variable.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread Bud

On 9/30/00, paul smith penned:
"Accept only cookies that get sent back to the originating server"

Then state is maintained from one click to the next (and I assume no cookie
is set on the users machine).

Really? If they can maintain state from one click to the next without 
cookies and without variables being passed, why isn't that done all 
the time?
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread Bud

On 9/30/00, paul smith penned:
I just noticed that a comma-delimited List of numerals can be stored as a
Client variable in a database without having to be
WDDX-serialized.  Cool.  This saves some processing overhead.

Anything that's a string can be stored as a client variable without 
WDDX. If you can type it, you can store it. Arrays, structures, etc, 
no.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-30 Thread paul smith

Well, there are cookies.  They're in the browser only, and not
set on the user's machine.  So they can maintain state in a
session, but not be useful from one session to another.

best,  paul

At 08:56 PM 9/30/00 -0400, you wrote:
On 9/30/00, paul smith penned:
 "Accept only cookies that get sent back to the originating server"
 
 Then state is maintained from one click to the next (and I assume no cookie
 is set on the users machine).

Really? If they can maintain state from one click to the next without
cookies and without variables being passed, why isn't that done all
the time?
-

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Client Session variables?

2000-09-29 Thread Rif Kiamil

Dear All, What is the different between Client  Session variables?

From Rif
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Client Session variables?

2000-09-29 Thread Won Lee

Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables? 


Dear All, What is the different between Client  Session variables?

From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-29 Thread Bud

On 9/29/00, Rif Kiamil penned:
Dear All, What is the different between Client  Session variables?

From Rif

Dear Rif.

They pretty much accomplish the same thing. Client variables are 
unique to each client, may be stored in cookies (if they are turned 
on), the registry (bad bad idea), or a database (best method). They 
will persist across sessions (if the server reboots, you don't lose 
the stuff in your shopping cart, etc.) and across servers in a 
clustered environment.

Session variables are the same thing, unique to each client, but are 
stored in RAM. No good across servers or if the server crashes. There 
is a whole cflock debacle with session and application variables 
(which are similar to session variables in the way they are stored, 
but are available to everyone using the application). I still haven't 
figured that one out, so the easiest thing for me was to swear off 
session variables for good. The upside is, now everything I build 
will work in a clustered environment.

Use client variables, written to a database, whenever possible.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: RE: Client Session variables?

2000-09-29 Thread Gregory Harris

More or less, but session variable can hold after you immediately exit a browser, here 
is better description:

Session: Is stored in memory, and while faster is extremely volatile 'cuz if the 
server shuts down, all the variables go

Client: Stored in registry (whether database, NT, or otherwise) and while slower, is 
less volatile 'cuz they're on the hard disk.  If server shuts down, variables will be 
there when server comes back up.

Just remember this when coding your application.

Gregory Harris
Los Angeles Information Technology Agency (ITA)
[EMAIL PROTECTED]


 [EMAIL PROTECTED] 09/29 9:24 AM 
Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables? 


Dear All, What is the different between Client  Session variables?

From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ 
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Client Session variables?

2000-09-29 Thread Andy Ewings

Client variables persist across sessions but Session variables do not
necessarilly persist only for the life of the browser They persist until the
pre-determined timeout expires (set in the CF server or overwritten in
application.cfm)

--
Andrew Ewings
Project Manager
Thoughtbubble Ltd
--


-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: 29 September 2000 17:25
To: CF-Talk
Subject: RE: Client  Session variables? 


Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables? 


Dear All, What is the different between Client  Session variables?

From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Client Session variables?

2000-09-29 Thread Robert Everland III

WEll if you don't kill the sessions though and come back, you keep your
session. I think the difference is client variables use a database whereas
session variables use memory.


Bob Everland

-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 12:25 PM
To: CF-Talk
Subject: RE: Client  Session variables?


Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables?


Dear All, What is the different between Client  Session variables?

From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Client Session variables?

2000-09-29 Thread Simon Horwith

could do

-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 1:22 PM
To: CF-Talk
Subject: RE: Client  Session variables? 


If I was to uses Hardware Load Balancing. Should I uses client variables and
store them on a database?

-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: 29 September 2000 17:25
To: CF-Talk
Subject: RE: Client  Session variables? 


Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables? 


Dear All, What is the different between Client  Session variables?

From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Client Session variables?

2000-09-29 Thread Peter Theobald

Definitely!
We are setting up a CoyotePoint Equalizer to balance the load between the servers and 
we are being very careful to keep everything about the user's session in 
database-stored Client variables. Session variables are specific to the individual web 
server the user hits.

At 06:22 PM 9/29/00 +0100, Rif Kiamil wrote:
If I was to uses Hardware Load Balancing. Should I uses client variables and
store them on a database?

-Original Message-
From: Won Lee [mailto:[EMAIL PROTECTED]]
Sent: 29 September 2000 17:25
To: CF-Talk
Subject: RE: Client  Session variables? 


Client variables are persistent from session to session for a single user.
Session variables are persistent only from one instance of a broswer being
opened.

Won Lee
Software Engineer, kpe
Allaire Certified ColdFusion Developer
P: 212.609.1145, 212.652.9655






-Original Message-
From: Rif Kiamil [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 10:17 AM
To: CF-Talk
Subject: Client  Session variables? 


Dear All, What is the different between Client  Session variables?

 From Rif

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 


---
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 x204 Fax 1.212.679.8032

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Client Session variables?

2000-09-29 Thread W Luke


 Use client variables, written to a database, whenever possible.

Is there any documentation about writing client variables to a database?  Or
do you have any "starter for tens"?!

Cheers

Will

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Help with cookie/client/session variables.

2000-09-20 Thread Erika Foster

Hi all,

I'm not REALLY clear on how any of the above work, but through trial and
error, I've been able to accomplish the desired result.  I wanted my users
to log into the site once, if authorization takes place, then set a cookie
so that next time they visit, the site will "remember" them and shoot them
past the login page to the homepage.  All works well, but now I have some
people who log in from work, share machines and do not want co-workers to
have access to our private site.

So, how do I erase that cookie?  How do I create a logout script for them?

The code on the frontpage after authorizing the username and password is:

cfset session.userid = #username#
cfset client.userid=#userid#
cfcookie name="userid" value="#client.userid#" expires="NEVER"
cflocation url="frontpage.html" addtoken="No"

The code on the login page that shoots them past to the home page if they
logged in before is:

cfif isdefined("client.userid")
cfset session.userid="#client.userid#"
cfcookie name="userid" value="#client.userid#"
cflocation url="frontpage.html"
/cfif

This works just as I wanted it to, though I know there is som extraneous
code in there that is probably not needed (like I said, I was using trial
and error to get this working.)

If I physically delete the cookie on my machine called:
[EMAIL PROTECTED] the login script escapes the cfif and goes asks
for login information. The contents of this file are:

CFTOKEN
cftoken number
www.bringyourbrain.net/
number
number
number
number
*
CFID
number
www.bringyourbrain.net/
0
number
number
number
number
*

1.  How do I allow my users to "logout" by deleting this cookie?

2. Obviously this isn't the best nor most secure way of doing this... anyone
have suggestions for me?  This is my hobby site, so its pretty small at this
point, but has the potential to get big with lots of users and lots of
privacy to protect.

Thanks!

Erika Foster


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.