Knowledgebase
Portal Home > Knowledgebase > Coldfusion > How do I delete a users session cookies when he closes the browser?
How do I delete a users session cookies when he closes the browser?
On ColdFusion pages, you can use the following code to delete a users session cookies when he closes the browser:
<!---Kill user session if user closes browser--->
<cfif IsDefined("Cookie.CFID") AND IsDefined("Cookie.CFTOKEN")>
<cfset Variables.cfid_local = Cookie.CFID>
<cfset Variables.cftoken_local = Cookie.CFTOKEN>
<cfcookie name="CFID" value="#Variables.cfid_local#">
<cfcookie name="CFTOKEN" value="#Variables.cftoken_local#">
</cfif>
Add to Favourites Print this Article
* ASP is only available on Windows
Home Page |
||
* ASP is only available on Windows. |