Posted By

abwaters on 06/07/09


Tagged

cookies


Versions (?)

Deleting a Cookie in Javascript


 / Published in: JavaScript
 

URL: http://www.arachna.com/edu/tutorials/mini/cookies/javascript.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. }

Report this snippet  

You need to login to post a comment.