43 users using DBSP now!
home -> documentation -> environment guide -> Deleting variables


Sometimes is necessary to kill a variable when is no longer used. The KILLCOOKIE tag eliminates any variable stored as a cookie. Regardless if the variable is a session variable or a cookie set on the browser, the KILLCOOKIE will delete it.

The following code shows how to use the KILLCOOKIE element. The variable "TOTALAMOUNT" is first created and assigned a 0 as the value. After using it inside the code, is no longer needed, so it's deleted from the variables using the KILLCOOKIE tag.


<#SETCOOKIE NAME="TOTALAMOUNT" VALUE="0"/>
.
.
.
<!-- This will delete the variable on memory !-->
<#KILLCOOKIE NAME="TOTALAMOUNT"/>

Related topics

If you want to know all the features of the KILLCOOKIE tag, click on the following link:
DBSP language reference: KILLCOOKIE tag.

 

Previous | Next