Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clearing cookie in js

document.cookie.split(";")
  .forEach(function(c) { 
  	document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clearing #cookie #js
ADD COMMENT
Topic
Name
8+8 =