i was able to assign and delete all the cookies using the following code.
Notice the use of the cfloop over a collection so you are sure that all
cookie the site might have assigned are expired (deleted). Remember that the
cookies don't actually get "deleted" from the user hardrive until after the
page is executed. So if you notice that the first time you execute
index2.cfm you will not get an error about the cookies not being there. if
you refresh the page though, you will get the error. the first time the page
executes the second set of outputing the cookie values return empty strings.



index.cfm
=========
<cfcookie name="test" value="test" expires="NEVER">
<cfcookie name="test1" value="test1" expires="NEVER">
<cfcookie name="test2" value="test2" expires="NEVER">

<a href="index2.cfm">next</a>




index2.cfm
==========
<cfoutput>
#cookie.test#<br>
#cookie.test1#<br>
#cookie.test2#
</cfoutput>
<cfloop collection="#cookie#" item="i">
        <cfcookie name="#i#" value="" expires="NOW">
</cfloop>
<cfoutput>
#cookie.test#<br>
#cookie.test1#<br>
#cookie.test2#<br>
</cfoutput>




Anthony Petruzzi
Webmaster
954-321-4703
[EMAIL PROTECTED]
http://www.sheriff.org


-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 12:04 PM
To: CF-Talk
Subject: Re: Cookies


I imagine you used something like the code below to expire the cookies. The
only
thing I can think of is that it is expiring one of the cookies and leaving
the
other intact. then they login again and it sets another to their browser.
Maybe
looping through somehow to check


<cfloop from="1" to="10" index="count">
    <cfif IsDefined("Cookie.cookieName")>
            <cfoutput>#count#&nbsp;</cfoutput>I am still here<br>
            <CFCOOKIE NAME="cookieName" EXPIRES="NOW">
    <cfelse>
        <cfoutput>#count#&nbsp;</cfoutput>I am now gone<br>
    </cfif>
</cfloop>




"Success is a journey, not a destination!!"



Doug Brown
----- Original Message -----
From: "J L" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 8:17 AM
Subject: Cookies


> hi all,
>
> What is the best way to delete all the cookies in clients' browsers?
> Somehow many of our clients' browsers have a pair of cookies which are
> exactly the same (Same name and same value). And I have tried expiring
> two times of that cookie and it does not work.
>
> Thanks,
> J
> _______________________________________________________________
> Get the FREE email that has everyone talking at
> http://www.mail2world.com
>
> 

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to