Return to Snippet

Revision: 44608
at April 14, 2011 22:01 by madr


Initial Code
  // unset cookie
  function(name){
    return function(expires) {
      return document.cookie = escape(name) + '=' + expires + '; path=/';
    }((function(d){
      d.setTime(d.getTime() + (86400000 * -1));
      return '; expires=' + d.toGMTString();
    }(new Date())));
  }('name-of-cookie');

Initial URL

                                

Initial Description

                                

Initial Title
anonymous function to unset a cookie

Initial Tags
javascript, textmate

Initial Language
Other