Delete cookies - Node.js Environment

Node.js examples for Environment:Cookie

Description

Delete cookies

Demo Code

function deleteCookie(name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }/*w  ww .j  ava 2  s.  c om*/
}

Related Tutorials