Scott,

As far as I know, this is not possible. While the ColdFusion page is
processing, nothing has been flushed to the client browser. It is not
until the headers get flushed that cookies can be set. Therefore, you
cannot check to see if cookies even stick until you start flushing to
the browser. At least, that is what I think??? 


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 11:56 AM
To: CF-Talk
Subject: Detecting lack of cookies/session on same page?

I'm working on some mods on my main app, to do with tracking user clicks
and the path they take through the various mini-sites running in our
app.

Currently I do my own logging - various CGI scope data (including IP),
plus some internal IDs. But I'd like to expand that to further be able
to pull out all data for a given user (don't care who they are) so I can
say "this person clicked HERE, then HERE, then THERE", that sorta thing.

I'm tinkering with unique identifiers - I've added a "UUID" field to my
DB tables used for tracking. I'm generating a UUID and tossing it in a
cookie. In my logging script include, if that cookie's set, I add that
UUID value along with my other tracking data. No sweat if cookies are
enabled.

But what I want to do is NOT log ANYTHING for the page views, UUID-wise,
if cookies aren't enabled.

The trick is, as best I can tell, the only way to detect if cookies
aren't enabled is to do the two-page deal - first page, set cookie,
redirect to second page, check for presence of cookie.

I'm looking for way (if it's possible) to sniff that out on the one
page. Right now, I can do a <cfcookie> set (and I'm doing a session var
as well, as an experiment) and the values stick through the page - so
when it comes to the logging include, it's saying "Oh I've got that
UUID" and logging it, despite that it's a fresh UUID every page when
cookies are off.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta – Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281537
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to