Hello,
If I need to store a persistant variable across multiple pages why not just
use a cookie? A cookie could be set in various ways to accomplish this.
I am wondering what the reason or advantages of using session variables are
vs. just using client side cookies for client "session" variables.
What can you advise?
Thanks,
Michael
mpwoodward - 23 Oct 2004 20:18 GMT
On 10/23/04 12:25 PM, in article cle45v$m1e$1@forums.macromedia.com,
> Hello,
>
[quoted text clipped - 9 lines]
>
> Michael
The main advantage of Session variables is the amount of type of data you
can store. You'd have a tough time trying to shove a query object into a
cookie. There is also the issue of users having cookies disabled in their
browser. By default session variables rely on a cookie anyway, but if a
user has cookies disabled you can pass CFTOKEN and CFID in the URL string on
every page. If you're relying 100% on cookies, other than the inability to
store larger and more complex data for the user, you would find yourself in
trouble if the user has cookies disabled.
Matt

Signature
Matt Woodward
Team Macromedia Member - ColdFusion
OldCFer - 25 Oct 2004 16:58 GMT
You can use cookies for persistant variables. Actually, it's one of the
options, although not
recommended as the best method, of storing client variables. Both client and
session vars are
normally tracked using cookie cfid/cftoken values. Using cookies gets fairly
cumbersome when
you start using arrays, structures etc. which are common in more complicated
applications
TheFunnyMonkey - 27 Oct 2004 16:07 GMT
with session, client just receive a random string of characters. with cookie,
client receive what you sned. session safer than cookie. variable stored on
server, not client with session. not able to changed be by client.