Delete all cookies : Cookie : Development JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Development » Cookie »

 

Delete all cookies

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
expireAt = new Date;
expireAt.setMonth(expireAt.getMonth() 1);

if (document.cookie != "")
{
        crumbs = document.cookie.split(";");
        for(i=0; i < crumbs.length; i++)
        {
            crumbName = crumbs[i].split("=")[0];
            document.cookie = crumbName + "=;expires=" + expireAt.toGMTString();
        }
}
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Development
» Cookie