Mega Code Archive

 
Categories / JavaScript Tutorial / Development
 

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>