Posted By

madr on 04/14/11


Tagged

javascript textmate cookie


Versions (?)

anonymous function to unset a cookie


 / Published in: Other
 

  1. // unset cookie
  2. function(name){
  3. return function(expires) {
  4. return document.cookie = escape(name) + '=' + expires + '; path=/';
  5. }((function(d){
  6. d.setTime(d.getTime() + (86400000 * -1));
  7. return '; expires=' + d.toGMTString();
  8. }(new Date())));
  9. }('name-of-cookie');
  10.  

Report this snippet  

You need to login to post a comment.