400 users using DBSP now!
home -> documentation -> language reference -> KILLCOOKIE tag


Description

This element allows you to remove a value previously stored in a Web Browser cookie.


Syntax

<#KILLCOOKIE NAME="aname" [ALL]/>

NAME Specify on aname the name of the variable. This property is case insensitive.
ALL Use this property to kill all the cookies in the actual session.


Applications

In general terms, a cookie allows us to store values inside the web browser for later use. However, some times this values are not longer necesary and is desirable to remove them from the client. The KILLCOOKIE element is used exactly for this purpose.

Examples

Example 1. Creating, using and deleting a variable.

The following example shows you how to create a header file and use it inside several pages.

Source code

examples/killcookie1.dbsp

  
     <#setcookie name="x" value="10"/>
    

x has been assigned a value of: (<#x/>)


    
   

x has been killed here.


    <#killcookie name="x"/>
    now x contains: (<#x/>)
  


Test example