Answers for "clear http cookie with js in client"

1

clearing cookie in js

document.cookie.split(";")
  .forEach(function(c) { 
  	document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
Posted by: Guest on December-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language