JavaScript Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Java-Script Tutorial
Introduction Introduction
Variables Variables
Operators Operators
Statements Statements
Loops Loops
Functions Functions
Objects Objects
Arrays Arrays
Cookies JS Cookies
Browser Objects Browser Objects
Form DOM Form DOM
Style Objects DOM Style Objects
Forums Ask Your Doubts
Scraps More about Javascript
Feedback Feedback
 




del_cookie() Function


Tutorials Javascript

Topic

How to delete the cookies in javascript?
(or) del_cookie() function?



Explanation
The del_cookie() function is used to delete the cookie in javascript. Deleting cookies is extremely simple, (i.e)set the cookie with an expiry date of one day ago.

Example
function del_cookie(name)
{
document.cookie = name +
'=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}

The above function deletes the name of the cookie which has been set already by setting the expiry date of the cookies one day before.





A Note
Javascript (JS) is one of the most used languages in the world. Some times spelled as Java Script. Hope you enjoy this tutorial. Do send your feedback or suggestions on this javascript or java script tutorial. This is a copyright content.

Other Links

web hosting