Deleting a Cookie in Javascript


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function deleteCookie(name) {
  2. var aCookie = getCookie(name);
  3. if (aCookie) {
  4. document.cookie = aCookie + '; expires=Thu, 01-Jan-70 00:00:01 GMT';
  5. return name;
  6. }
  7. }

URL: http://www.arachna.com/edu/tutorials/mini/cookies/javascript.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.