Reputation: 16896
I am trying to delete the clientside session cookie when I access a certain page. How do I do this?
Upvotes: 3
Views: 3714
Reputation: 32885
See slide 34: http://slidesix.com/view/ColdFusion-Application-Security-The-Next-Step
Upvotes: 1
Reputation: 4555
Do you mean the CFID and CFTOKEN cookies? Or the Sessions struct? You can expire the cookies like this:
<cfcookie name="CFID" value="" expires="NOW" />
<cfcookie name="CFTOKEN" value="" expires="NOW" />
but if you want to clear the session scope you should do this:
<cfscript>
structClear(Session);
</cfscript>
Upvotes: 11
Reputation: 112150
Set the cookie again, with blank data and an expiry date of now.
<cfcookie name="cookie_name" value="" expires="now" />
It will remain for the rest of the request, and then it should go.
Upvotes: 1