I'm using CFCOOKIE to set a non-expiring cookie on my users' machines.  My
code in my application.cfm file is as follows:

<cfif Not IsDefined("COOKIE.tid")>
        <cfset TEMP_ID = CreateUUID()>
        <CFCOOKIE NAME="tid" VALUE="#TEMP_ID#" EXPIRES="never">
</cfif>


On a subsequent pages (not the first page where the cookie is set) I'm doing
the following:

<cfif IsDefined("COOKIE.tid")>
        <cfset variables.uid = COOKIE.tid>
<cfelse>
        <cfset variables.uid = CGI.REMOTE_ADDR>
</cfif>

so that if they have cookies disabled that I can use their IP instead.

However (and here's the problem), even on a browser with cookies disabled
that's never been to this site (and I've checked the cookies on the machine
to make sure) I'm still getting a page-based cookie set (i.e. one that
changes with every reload of the page).

How can I check if the cookie is defined or not if every time CF thinks it
is?  I thought that if users had cookies disabled cfcookie simply wouldn't
do anything.  Why is it setting this temporary value?  I am specifying an
EXPIRES attribute, so I know it's not that...

Thanks for any insight.

Evan

--
-=-=-=-=-=-=-=-=-=-
Evan Lavidor
Circle.com Boston
Tel: 617-585-3107
Fax: 617-585-3091
-=-=-=-=-=-=-=-=-=-


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to